Commit Graph

53330 Commits

Author SHA1 Message Date
Rin Kuryloski c7d0427d62
Merge pull request #8084 from rabbitmq/rin/nightly-compare-build-systems
Github Actions pipeline to compare build systems nightly
2023-05-15 17:26:21 +02:00
Michael Klishin 42dbaf8fa6
Merge pull request #8188 from rabbitmq/message-interceptor
Move plugin rabbitmq-message-timestamp to the core
2023-05-15 18:13:40 +04:00
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 1ee8454129
Merge pull request #8196 from rabbitmq/rin/more-gazelle-excludes
Also exclude the .erlang.mk directory in gazelle
2023-05-15 13:33:17 +02:00
Rin Kuryloski 4c9f31473a Also exclude the .erlang.mk directory in gazelle 2023-05-15 13:06:37 +02:00
Michael Klishin e83401fa8a
Merge pull request #8187 from rabbitmq/rin/bazel-exclude-nested-deps
Exclude nested deps fetched by make from gazelle
2023-05-15 14:35:30 +04:00
Michael Klishin ffa65a88db
Merge pull request #8189 from rabbitmq/unsubscribe-response
UnsubscribeResponse in stream protocol doc
2023-05-15 14:35:03 +04:00
David Ansari ddabc35191 Change rabbitmq.conf key to message_interceptors.incoming.*
as it nicer categorises if there will be a future
"message_interceptors.outgoing.*" key.

We leave the advanced config file key because simple single value
settings should not require using the advanced config file.
2023-05-15 10:06:01 +00:00
Alex Blease 8443c761ee
Include UnsubscribeResponse in stream protocol 2023-05-15 10:44:46 +01:00
David Ansari 044f6e3bac Move plugin rabbitmq-message-timestamp to the core
As reported in https://groups.google.com/g/rabbitmq-users/c/x8ACs4dBlkI/
plugins that implement rabbit_channel_interceptor break with
Native MQTT in 3.12 because Native MQTT does not use rabbit_channel anymore.
Specifically, these plugins don't work anymore in 3.12 when sending a message
from an MQTT publisher to an AMQP 0.9.1 consumer.

Two of these plugins are
https://github.com/rabbitmq/rabbitmq-message-timestamp
and
https://github.com/rabbitmq/rabbitmq-routing-node-stamp

This commit moves both plugins into rabbitmq-server.
Therefore, these plugins are deprecated starting in 3.12.

Instead of using these plugins, the user gets the same behaviour by
configuring rabbitmq.conf as follows:
```
incoming_message_interceptors.set_header_timestamp.overwrite = false
incoming_message_interceptors.set_header_routing_node.overwrite = false
```

While both plugins were incompatible to be used together, this commit
allows setting both headers.

We name the top level configuration key `incoming_message_interceptors`
because only incoming messages are intercepted.
Currently, only `set_header_timestamp` and `set_header_routing_node` are
supported. (We might support more in the future.)
Both can set `overwrite` to `false` or `true`.
The meaning of `overwrite` is the same as documented in
https://github.com/rabbitmq/rabbitmq-message-timestamp#always-overwrite-timestamps
i.e. whether headers should be overwritten if they are already present
in the message.

Both `set_header_timestamp` and `set_header_routing_node` behave exactly
to plugins `rabbitmq-message-timestamp` and `rabbitmq-routing-node-stamp`,
respectively.

Upon node boot, the configuration is put into persistent_term to not
cause any performance penalty in the default case where these settings
are disabled.

The channel and MQTT connection process will intercept incoming messages
and - if configured - add the desired AMQP 0.9.1 headers.

For now, this allows using Native MQTT in 3.12 with the old plugins
behaviour.

In the future, once "message containers" are implemented,
we can think about more generic message interceptors where plugins can be
written to modify arbitrary headers or message contents for various protocols.

Likewise, in the future, once MQTT 5.0 is implemented, we can think
about an MQTT connection interceptor which could function similar to a
`rabbit_channel_interceptor` allowing to modify any MQTT packet.
2023-05-15 08:37:52 +00:00
Rin Kuryloski 11b79f37a8 Exclude nested deps fetched by make from gazelle 2023-05-15 09:55:33 +02:00
Michael Klishin 92017ac612
Merge pull request #8166 from rabbitmq/bump-otp-25.2
Adopt otp 25.2.3
2023-05-13 11:00:05 +04:00
Michael Klishin 8a05cf9ba6
Merge pull request #8165 from rabbitmq/bump-otp-25.1
Adopt otp 25.1.2.1
2023-05-13 10:59:49 +04:00
Michael Klishin fa1a2c3ce0
Merge pull request #8164 from rabbitmq/bump-otp-25.0
Adopt otp 25.0.4
2023-05-13 10:59:33 +04:00
Michael Klishin 45424300cd
Merge pull request #8167 from rabbitmq/bump-otp-25.3
Adopt otp 25.3.2
2023-05-13 10:59:26 +04:00
Michael Klishin e57d849e1b
Merge pull request #8169 from rabbitmq/gazelle-main
Adopt otp
2023-05-13 10:59:18 +04:00
GitHub c344240d30 bazel run gazelle 2023-05-13 04:02:10 +00:00
GitHub 11b5748f77 Adopt otp 25.3.2 2023-05-13 03:08:24 +00:00
GitHub 8ee197d1a9 Adopt otp 25.2.3 2023-05-13 03:05:35 +00:00
GitHub 5f3cd3d94f Adopt otp 25.1.2.1 2023-05-13 03:04:43 +00:00
GitHub 87e59def54 Adopt otp 25.0.4 2023-05-13 03:04:11 +00:00
Michael Klishin c4d0e0af90
Merge pull request #8160 from rabbitmq/mk-3.11.16-release-notes
3.11.16 release notes
2023-05-12 23:54:41 +04:00
Michael Klishin 66153fdec1 3.11.16 release notes updates 2023-05-12 23:54:16 +04:00
Michael Klishin 0fd635408d 3.11.16 release notes 2023-05-12 23:51:31 +04:00
Michael Klishin 316251a8d6
Merge pull request #8156 from rabbitmq/mk-gazelle-update-repos
bazel run gazelle-update-repos for Ra 2.6
2023-05-12 20:32:50 +04:00
Michael Klishin 0bf4d5168a bazel run gazelle-update-repos for Ra 2.6 2023-05-12 20:25:40 +04:00
Rin Kuryloski c79cb38c7d
Merge pull request #8148 from rabbitmq/rin/rabbitmq_cli-dialyze-enhancements
rabbitmq_cli dialyze enhancements
2023-05-12 15:40:34 +02:00
Rin Kuryloski dad871e86c Update rules_pkg to 0.9.1 2023-05-12 12:45:01 +02:00
Rin Kuryloski 204d0177c2 Fix github actions cache key for the bazel repo-cache 2023-05-12 12:45:01 +02:00
Rin Kuryloski 92b0a81c60 Use rules_erlang 3.10.0 2023-05-12 08:41:01 +02:00
Rin Kuryloski ea895a0023 Account for Elixir containing several core applications
- eex
- elixir
- ex_unit
- iex
- logger
- mix

So that apps (like rabbitmq_cli) can dialyze against the extra
components
2023-05-12 08:26:42 +02:00
Rin Kuryloski 08061144ad Pass csv and json to rabbitmq_cli plt
So that they are no longer reported as unknown in
//deps/rabbitmq_cli:dialyze
2023-05-12 08:26:42 +02:00
Rin Kuryloski 19f4abd55b Build cli deps as .ez archives
This provides an elixir/erlang agnostic way of providing them other
erlang rules
2023-05-12 08:26:42 +02:00
Michael Klishin 45520436e8
Merge pull request #8145 from rabbitmq/mk-update-3.12.0-release-notes
Update 3.12.0 release notes
2023-05-12 02:39:15 +04:00
Michael Klishin ac5948162f
Merge pull request #8143 from rabbitmq/mk-ra-2.6.0
Pin Ra to 2.6.1
2023-05-12 02:38:11 +04:00
Michael Klishin 62f6e4f4c2 Update 3.12.0 release notes 2023-05-12 02:25:45 +04:00
Michael Klishin c9c6730cc5 Pin Ra to 2.6.1 2023-05-12 01:48:47 +04:00
Michael Klishin 441a77f6d0 Pin Ra to 2.6.0-pre.1 2023-05-11 23:25:58 +04:00
Michael Klishin acfc6d8594
Merge pull request #8140 from rabbitmq/synchronise-before-membership-changes
Synchronise feature flags before any changes to Mnesia membership
2023-05-11 21:19:17 +04:00
Diana Parra Corbacho 6bcd73b570 Synchronise feature flags before any changes to Mnesia membership
Left as it was, a failure enabling the feature flags leaves the
cluster in an inconsistent state where the joined nodes think
the joining node is already a member, but the joining node
believes its a standalone node. Thus, later join_cluster commands
fail with an inconsistent cluster error.
2023-05-11 15:48:44 +02:00
Luke Bakken 37dedc97e5
Merge pull request #8130 from rabbitmq/rabbitmq-server-8129
Correctly use AMQP URI query parameter `password`
2023-05-10 09:41:26 -07:00
Luke Bakken 494d171ff2
Correctly use AMQP URI query parameter `password`
Fixes #8129

The query parameter `password` in an AMQP URI should only be used to set
a certificate password, *not* the login password. The login password is
set via the `amqp_authority` section as defined here -

https://www.rabbitmq.com/uri-spec.html

* Add test that demonstrates issue in #8129
* Modify code to fix test

Modify amqp_uri so that test passes
2023-05-10 07:13:47 -07:00
Jean-Sébastien Pédron f5c780325e
Merge pull request #8112 from rabbitmq/fix-feature-flags-init-vs-code_server-deadlock
rabbit_feature_flags: Fix possible deadlock when calling the Code server
2023-05-09 11:43:49 +02:00
Michal Kuratczyk a8b00a3298
Try elixir 1.14.3 for Windows tests
Debugging a setup-beam issue:
https://github.com/erlef/setup-beam/issues/189
2023-05-09 11:26:45 +02:00
Jean-Sébastien Pédron e0a2f10272
rabbit_feature_flags: Fix possible deadlock when calling the Code server
[Why]
The Feature flags registry is implemented as a module called
`rabbit_ff_registry` recompiled and reloaded at runtime.

There is a copy on disk which is a stub responsible for triggering the
first initialization of the real registry and please Dialyzer. Once the
initialization is done, this stub calls `rabbit_ff_registry` again to
get an actual return value. This is kind of recursive: the on-disk
`rabbit_ff_registry` copy calls the `rabbit_ff_registry` copy generated
at runtime.

Early during RabbitMQ startup, there could be multiple processes
indirectly calling `rabbit_ff_registry` and possibly triggering that
first initialization concurrently. Unfortunately, there is a slight
chance of race condition and deadlock:

0. No `rabbit_ff_registry` is loaded yet.
1. Both process A and B call `rabbit_ff_registry:something()` indirectly
   which triggers two initializations in parallel.
2. Process A acquires the lock first and finishes the initialization. A
   new registry is loaded and the old `rabbit_ff_registry` module copy
   is marked as "old". At this point, process B still references that
   old copy because `rabbit_ff_registry:something()` is up above in its
   call stack.
3. Process B acquires the lock, prepares the new registry and tries to
   soft-purge the old `rabbit_ff_registry` copy before loading the new
   one.

This is where the deadlock happens: process B requests the Code server
to purge the old copy, but the Code server waits for process B to stop
using it.

[How]
With this commit, process B calls `erlang:check_process_code/2` before
asking for a soft purge. If it is using an old copy, it skips the purge
because it will deadlock anyway.
2023-05-09 10:43:29 +02:00
Michael Klishin 69387b16a5
Merge pull request #8123 from rabbitmq/SimonUnge-shrink_on_node_cleanup
Peer discovery: shrink QQ replicas on forced node removal
2023-05-07 21:55:22 +04:00
Michael Klishin 013628db15 Pass Dialyzer 2023-05-07 21:31:36 +04:00
Michael Klishin 3835a137d6 Intentionally ignore return value here
the node is being removed
2023-05-07 21:25:04 +04:00
Michael Klishin 4da3ae0e05 Wording 2023-05-07 21:21:03 +04:00
Simon Unge 0c649b3687 See #2882. Also call quorum shrink command 2023-05-07 21:21:03 +04:00