Fix publish of libs to hex.pm
@lhoguin noticed that the hex packages for the amqp_client, amqp10_client and related project do not currently work with erlang.mk. This PR fixes this issue.
Tested using this project: https://github.com/lukebakken/amqp-clients-test.git
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
rabbitmq_cli uses some private rules_erlang apis that have changed in
the upcoming release
Additionally:
- Avoid including both standard and test versions of amqp_client in
integration test suites
- Eliminate most of the compilation order hints (explicit first_srcs)
in the bazel build
- Fix an include statement - in bazel, an app is not available to
itself as a library at compilation time
Fixes#2577
Related rabbitmq/rabbitmq-ci#50
Yolo-copy amqp_client targets for dist
Update license short name
Remove unnecessary targets now that hex.pm exists
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
to prevent `amqp_connection:start/2` from logging a warning when we use default
values.
The default for `connection_timeout` is already 60000. When we don't explicitly
set it to a lower value, `amqp_connection:maybe_update_call_timeout/2` adjusts
it to 70000 and logs a warning message, which may appear unexpected, especially
for users upgrading to 3.8.10+ with no config changes.
This change addresses that problem by pre-adjusting it to 70000, making it safe
by default and ensuring our default values don't conflict with each other.
While not all suites strictly require it, those same suites depend on
it via the broker dependency anyway. Thus, there is no penalty, but it
shortens the BUILD.bazel file for deps/rabbit
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
Lager strips trailing newline characters but OTP logger with the default
formatter adds a newline at the end. To avoid unintentional multi-line log
messages we have to revisit most messages logged.
Some log entries are intentionally multiline, others
are printed to stdout directly: newlines are required there
for sensible formatting.
operations. At some point, these have to timeout to
avoid having lingering connection processes attempting
remote connections under unstable conditions.
Improve handling of potential call timeout exceptions
in amqp_gen_connection.
establishment. This guarantees that the effective
call timeouts are always safe, i.e. granting enough
time to the underlying network operations, which must
always timeout first in case of any unexpected
lingering operations leading to timeouts. This eliminates
the chance of leaking connection processes when call
timeouts elapse, while underlying remote cconnection
establishment call was still taking place.
amqp_main_reader:post_init/1 is invoked within
amqp_gen_connection:connect/1 with a timeout of ?CALL_TIMEOUT, so the
same timeout interval cannot be reasonably for both
Specifically, handle and return the error resulting from
`ssl:controlling_process/2` when opening a connection
Also increase the timeout around `ssl:setopts/2` when opening a
connection to the global client timeout
and add a VMware copyright notice.
We did not mean to make this code Incompatible with Secondary Licenses
as defined in [1].
1. https://www.mozilla.org/en-US/MPL/2.0/FAQ/
... in the ssl:connection_information/1 returned proplist. `cipher_suite`
no longer exists in Erlang Git as of this commit (it is deprecated in
the documentation for quite some time). However, `selected_cipher_suite`
is supported in at least Erlang 21+, so let's use this one.
In our testing we observe no meaningfully different peak
memory (carrier size) limit and 18 to 65% lower tail latencies
with small messages, and teen % lower with 50 MB messages.
Throughput is single digit % higher.
CPU usage was not meaningfully different on a four core host.
References rabbitmq/rabbitmq-common#343.