Commit Graph

300 Commits

Author SHA1 Message Date
Rin Kuryloski eb94a58bc9 Add a workflow to compare the bazel/erlang.mk output
To catch any drift between the builds
2023-05-15 13:54:14 +02:00
Rin Kuryloski a944439fba Replace globs in bazel with explicit lists of files
As this is preferred in rules_erlang 3.9.14
2023-04-25 17:29:12 +02:00
Rin Kuryloski 854d01d9a5 Restore the original -include_lib statements from before #6466
since this broke erlang_ls

requires rules_erlang 3.9.13
2023-04-20 12:40:45 +02:00
Rin Kuryloski 8de8f59d47 Use gazelle generated bazel files
Bazel build files are now maintained primarily with `bazel run
gazelle`. This will analyze and merge changes into the build files as
necessitated by certain code changes (e.g. the introduction of new
modules).

In some cases there hints to gazelle in the build files, such as `#
gazelle:erlang...` or `# keep` comments. xref checks on plugins that
depend on the cli are a good example.
2023-04-17 18:13:18 +02:00
Rin Kuryloski 8a7eee6a86 Ignore warnings when building plt files for dependencies
As we don't generally care if a dependency has warnings, only the
target
2023-04-17 10:09:24 +02:00
Rin Kuryloski 1bef97af2e Add missing dep to //deps/rabbitmq_aws:eunit test 2023-02-16 12:31:40 +01:00
Alexey Lebedeff 949b53543d Fix all dependencies for the dialyzer
This is the latest commit in the series, it fixes (almost) all the
problems with missing and circular dependencies for typing.

The only 2 unsolved problems are:

- `lg` dependency for `rabbit` - the problem is that it's the only
  dependency that contains NIF. And there is no way to make dialyzer
  ignore it - looks like unknown check is not suppressable by dialyzer
  directives. In the future making `lg` a proper dependency can be a
  good thing anyway.

- some missing elixir function in `rabbitmq_cli` (CSV, JSON and
  logging related).

- `eetcd` dependency for `rabbitmq_peer_discovery_etcd` - this one
  uses sub-directories in `src/`, which confuses dialyzer (or our bazel
  machinery is not able to properly handle it). I've tried the latest
  rules_erlang which flattens directory for .beam files, but it wasn't
  enough for dialyzer - it wasn't able to find core erlang files. This
  is a niche plugin and an unusual dependency, so probably not worth
  investigating further.
2023-02-13 17:37:44 +01:00
Alexey Lebedeff 50ed7ad6f7 Fix all dialyzer warnings in AWS-related plugins 2023-01-20 15:20:26 +01:00
Michael Klishin ec4f1dba7d
(c) year bump: 2022 => 2023 2023-01-01 23:17:36 -05:00
Luke Bakken 7fe159edef
Yolo-replace format strings
Replaces `~s` and `~p` with their unicode-friendly counterparts.

```
git ls-files *.erl | xargs sed -i.ORIG -e s/~s>/~ts/g -e s/~p>/~tp/g
```
2022-10-10 10:32:03 +04:00
Rin Kuryloski 575c5f9975 Remove all of the .travis.yml files
since we no longer use them
2022-08-16 09:46:31 +02:00
Michael Klishin a63248a756
rabbit_aws: adapt for Thoas-based rabbit_json 2022-07-30 03:53:49 +04:00
Philip Kuryloski 15a79466b1 Use the new xref2 macro from rules_erlang
That adopts the modern erlang.mk xref behaviour
2022-06-09 23:18:28 +02:00
Philip Kuryloski 327f075d57 Make rabbitmq-server work with rules_erlang 3
Also rework elixir dependency handling, so we no longer rely on mix to
fetch the rabbitmq_cli deps

Also:

- Specify ra version with a commit rather than a branch
- Fixup compilation options for erlang 23
- Add missing ra reference in MODULE.bazel
- Add missing flag in oci.yaml
- Reduce bazel rbe jobs to try to save memory
- Use bazel built erlang for erlang git master tests
- Use the same cache for all the workflows but windows
- Avoid using `mix local.hex --force` in elixir rules
  - Fetching seems blocked in CI, and this should reduce hex api usage in
    all builds, which is always nice
- Remove xref and dialyze tags since rules_erlang 3 includes them in
  the defaults
2022-06-08 14:04:53 +02:00
Loïc Hoguin dc70cbf281
Update Erlang.mk and switch to new xref code 2022-05-31 13:51:12 +02:00
Michael Klishin 7c47d0925a
Revert "Correct a double quote introduced in #4603"
This reverts commit 6a44e0e2ef.

That wiped a lot of files unintentionally
2022-04-20 16:05:56 +04:00
Michael Klishin 6a44e0e2ef
Correct a double quote introduced in #4603 2022-04-20 16:01:29 +04:00
Philip Kuryloski 65a3ac44a5 Adjust some usages of `erlc_opts` for rules_erlang 2.5.1
(cherry picked from commit d7d2352f10)
2022-04-08 22:06:22 +02:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Philip Kuryloski d8201726ae Ignore dialyzer warnings for most apps 2022-02-21 09:19:56 +01:00
Philip Kuryloski efcd881658 Use rules_erlang v2
bazel-erlang has been renamed rules_erlang. v2 is a substantial
refactor that brings Windows support. While this alone isn't enough to
run all rabbitmq-server suites on windows, one can at least now start
the broker (bazel run broker) and run the tests that do not start a
background broker process
2022-01-18 13:43:46 +01:00
Vy Hong a1a22b2a3c Log response body of failed AWS requests 2021-10-08 14:48:40 -07:00
Philip Kuryloski 5fd9d1f638 Use Ranch 2.1.0 in bazel build
Matches 063d32626d
2021-09-10 14:46:36 +02:00
Michael Klishin 6bf4a99f58
Update a mock expectation 2021-08-21 00:53:42 +03:00
Michael Klishin 59ebb83506
rabbitmq_aws: drop trailing dot in some log messages 2021-08-21 00:45:07 +03:00
Bilal Acar 4d96d4099c
Started using function heads 2021-08-21 00:45:07 +03:00
Bilal Acar ca018ef110
Addressing PR comments 2021-08-21 00:45:07 +03:00
Bilal Acar 50f9bcf504
Adding retries to AWS API calls
Adding retries to AWS API calls
2021-08-21 00:45:07 +03:00
Michael Klishin 300196ea4e
Second attempt at upgrading JSX to 3.1 2021-06-12 08:03:18 +08:00
Philip Kuryloski 30f9a95b9f Add dialyze for remaning tier-1 plugins 2021-06-01 10:19:10 +02:00
Philip Kuryloski 98e71c45d8 Perform xref checks on many tier-1 plugins 2021-05-21 12:03:22 +02:00
Philip Kuryloski c13c2af614 Bazel file refactoring 2021-05-11 12:03:27 +02:00
Philip Kuryloski 072a1c0462 Refactor and dedupe .bazel file content 2021-04-16 10:22:44 +02:00
Michael Klishin ee6b9e4d10
Update a couple of AWS-related license headers 2021-04-08 21:09:18 +03:00
Michael Klishin b05ac3ff71
Merge pull request #2959 from thuandb/imdsv2
fix a typo in the new EC2 IMDSv2 configuration flag name #2
2021-04-08 20:17:52 +03:00
Philip Kuryloski 3ecb291d75 Add rabbitmq_consistent_hash_exchange to bazel
also fixup erlc_opts for some other plugins
2021-04-08 17:24:14 +02:00
Thuan Duong Ba 8dfd6ea87c fix a typo in a config name 2021-04-08 08:21:32 -07:00
Michael Klishin c4d1a914e5
Resolve a rebase artifact
A function ended up duplicated
2021-04-08 13:33:34 +03:00
Michael Klishin d28a4716c0
Merge branch 'thuandb-imdsv2' 2021-04-08 12:29:03 +03:00
Thuan Duong Ba 0b3d10f771
address review feedback 2021-04-08 12:28:59 +03:00
Thuan Duong Ba 0afa9ebbe8
address review feedback 2021-04-08 12:28:59 +03:00
Thuan Duong Ba 6a515871c1
address review feedback 2021-04-08 12:28:59 +03:00
Thuan Duong Ba 5fe7abad88
address review feedback 2021-04-08 12:28:59 +03:00
Stefan Moser 108e09ecdb
introduce the IMDS abbreviation 2021-04-08 12:28:59 +03:00
Stefan Moser 249fc9a465
added section on IMDS version to the readme 2021-04-08 12:28:59 +03:00
Thuan Duong Ba 28f41b1958
address review feedback 2021-04-08 12:28:58 +03:00
Thuan Duong Ba 9634f8205a
address review feedback 2021-04-08 12:28:58 +03:00
Thuan Duong Ba ff78961206
address review feedback 2021-04-08 12:28:58 +03:00
Thuan Duong Ba 01abc4751e
address review feedback 2021-04-08 12:28:58 +03:00
Thuan Duong Ba dd051ca8fb
update parse 4xx responses from instance metadata service 2021-04-08 12:28:58 +03:00