Commit Graph

58805 Commits

Author SHA1 Message Date
Michael Klishin 63c9f71294
Merge pull request #13174 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/com.google.code.gson-gson-2.12.0
build(deps-dev): bump com.google.code.gson:gson from 2.11.0 to 2.12.0 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-01-29 16:27:36 -05:00
dependabot[bot] 0a874e266f
build(deps-dev): bump com.google.code.gson:gson
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-29 18:35:31 +00:00
Michal Kuratczyk 8d9aa3ed31
Merge pull request #13171 from rabbitmq/oci-version
Set RABBITMQ_VERSION in the OCI image
2025-01-29 11:35:58 +01:00
Michal Kuratczyk a06114a656
Set RABBITMQ_VERSION in the OCI image 2025-01-29 10:38:08 +01:00
Michal Kuratczyk 6692fcb608
Merge pull request #13160 from rabbitmq/simplified-oci-action
Simplified OCI builds
2025-01-29 09:33:20 +01:00
Michal Kuratczyk 0e7b53c6a8
Use pivotalrabbitmq/rabbitmq 2025-01-29 08:49:18 +01:00
Michael Klishin f3eea915e7
Merge pull request #13170 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-28 23:54:44 -05:00
GitHub 840928de0e bazel run gazelle 2025-01-29 04:02:31 +00:00
Michael Klishin 00be47b828
Merge pull request #13167 from rabbitmq/mk-metadata-store-initialized-health-check
New health checks for metadata store initialization
2025-01-28 22:33:17 -05:00
Michael Klishin 419e14a225
Merge pull request #13166 from rabbitmq/qq-duplicate-members-reported
QQ: make sure there are no duplicates on the list of nodes
2025-01-28 20:21:27 -05:00
Michael Klishin b8fccd96ed
'rabbitmq diagnostics check_if_metadata_store_is_initialized*': support --formatter=json 2025-01-28 19:26:54 -05:00
Michael Klishin 07ec1b4b50
New health check CLI commands 2025-01-28 16:44:37 -05:00
Michael Davis 8969e98819
bazel: Comment out `assert_suites` checks for apps with missing suites
`rabbitmq_management` is missing one suite definition and `rabbit_mqtt`
is missing two. `assert_suites` causes a build failure because of the
missing suites. This change comments out `assert_suites` for these apps
instead of adding the missing suite definitions because Bazel is no
longer used to test these apps.
2025-01-28 16:12:12 -05:00
Michael Davis 61a38d9212
bazel: Update `BUILD.ra` sources
This fixes an error while building `//:broker`. The Ra log v2 changes
(<https://redirect.github.com/rabbitmq/ra/pull/475>) merged with the
update to Ra 2.16.0 changed the set of modules in Ra. This change
reflects the new and deleted sources.
2025-01-28 16:06:21 -05:00
Michael Klishin cb81bb944a
HTTP API: add two new health checks, references #13153 2025-01-28 14:38:51 -05:00
Michal Kuratczyk 198d8f93d3
Make sure there are no duplicates on the nodes list
This is probably more of a CI bug than anything else - in CI we use
a lower tick value, which increases the odds of the periodic
repair triggering very early.

Failure:
https://github.com/rabbitmq/rabbitmq-server/actions/runs/13013004042/job/36295172214?pr=13050
2025-01-28 17:10:13 +01:00
Karl Nilsson 7862c2f501
Merge pull request #12713 from rabbitmq/ra-2.16.0
Ra v2.16.0
2025-01-28 16:00:08 +01:00
Karl Nilsson 70ade9615b bazel 2025-01-28 13:47:09 +00:00
Michael Klishin 2c3ee0eeba
Merge pull request #13164 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-28 07:54:43 -05:00
GitHub a013bb1d1c bazel run gazelle 2025-01-28 04:02:47 +00:00
Michael Klishin 9de2e3b81c
Merge pull request #13163 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/kotlin.version-2.1.10
build(deps): bump kotlin.version from 2.1.0 to 2.1.10 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2025-01-27 14:19:17 -05:00
dependabot[bot] a79ebc6a25
build(deps): bump kotlin.version
Bumps `kotlin.version` from 2.1.0 to 2.1.10.

Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.0 to 2.1.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.1.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.0...v2.1.10)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.0 to 2.1.10

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 18:38:45 +00:00
David Ansari 579c58603e Support AMQP over WebSocket (OSS part) 2025-01-27 17:50:47 +01:00
David Ansari 5a467934e3 Support AMQP over WebSocket in Erlang client
## What?
Implement the AMQP over WebSocket Binding Committee Specification 01 in
the AMQP 1.0 Erlang client:
https://docs.oasis-open.org/amqp-bindmap/amqp-wsb/v1.0/cs01/amqp-wsb-v1.0-cs01.html

 ## Why?
1. This allows writing integration tests for the server implementation
   of AMQP over WebSocket.
2. Erlang and Elixir clients can use AMQP over WebSocket in environments
   where firewalls prohibit access to the AMQP port.

 ## How?
Use gun as WebSocket client.

The new module `amqp10_client_socket` handles socket operations (open, close, send) for:
* TCP sockets
* SSL sockets
* WebSockets

Prior to this commit, the amqp10_client_connection process closed only the
write end of the socket after it sent the AMQP close performative.
This commit removed premature socket closure because:
1. There is no equivalent feature provided in Gun since sending a
   WebSocket close frame causes Gun to cleanly close the connection for
   both writing and reading.
2. It's unnecessary and can result in unexpected and confusing behaviour on the server.
3. It's better practive to keep the TCP connection fully open until
   the AMQP closing handshake completes.
4. When amqp10_client_frame_reader terminates, it will cleanly close
   the socket for both writing and reading.
2025-01-27 17:50:47 +01:00
Karl Nilsson e58b8ebc1d QQ: refactor add_member method to pass dialyzer
And be less confusing around the arguments that add_member/4 actually
takes.
2025-01-27 13:50:38 +00:00
Karl Nilsson 113b16bbc4 Use initial_machine_version config to avoid initalising
from rabbit_fifo version 0.

The same was also implemented for the stream coordinator.

QQ: avoid dead lock in queue federation.

When processing the queue federation startup even the process
may call back into the ra process causing a deadlock. in this
case we spawn a temporary process to avoid this.
2025-01-27 13:50:38 +00:00
Karl Nilsson f2b1f37331 QQ: Use new log_ext effect
This offloads the work of reading messages from on-disk segments
to the interacting process rather than doing this blocking, performance
affecting work in the ra server process.

QQ: ensure opened segments are closed after some time of inactivity

Processes that havea received messages that had to be read from disks
may keep a segment open indefinitely. This introduces a timer which
after some time of inactivity will close all opened segments to ensure
file descriptors are not kept open indefinitely.
2025-01-27 13:50:38 +00:00
Karl Nilsson 3a7a374190 Ra v2.16.0
This version of Ra contains a substantially refactored Ra log
implementation that provides higher throughput and lower
memory use in serveral scenarios.

New features:

* `log_ext` new effect type that instead of immedately reading
entries from the log it will instead provide a read plan for any
entries only located in segments.

* Machine version upgrades can now be be delayed until all
members are confirmed to support the new version.
This will avoid potential consumption pauses during upgrades.
2025-01-27 13:50:38 +00:00
Jean-Sébastien Pédron 75c4c3977d
Merge pull request #13099 from rabbitmq/use-node2-as-cluster-seed-node-in-ci
rabbitmq_ct_helpers: Use node 2 as the cluster seed node
2025-01-27 14:21:27 +01:00
Michal Kuratczyk e796b61f49
Simplified OCI builds
* use the official erlang image as the base
  (no more openssl and erlang recompilation)
* by default, build with OTP27 for x86 only but make it
  easy to request any other OTP version and an ARM64 image
* better docker layer caching
* simplify the workflow and the Dockerfile
2025-01-27 13:54:49 +01:00
Jean-Sébastien Pédron f549425615
rabbitmq_ct_broker_helpers: Use node 2 as the cluster seed node
[Why]
When running mixed-version tests, nodes 1/3/5/... are using the primary
umbrella, so usually the newest version. Nodes 2/4/6/... are using the
secondary umbrella, thus the old version.

When clustering, we used to use node 1 (running a new version) as the
seed node, meaning other nodes would join it.

This complicates things with feature flags because we have to make sure
that we start node 1 with new stable feature flags disabled to allow old
nodes to join.

This is also a problem with Khepri machine versions because the cluster
would start with the latest version, which old nodes might not have.

[How]
This patch changes the logic to use a node running the secondary
umbrella as the seed node instead. If there is no node running it, we
pick the first node as before.

V2: Revert part of "rabbitmq_ct_helpers: Fix how we set
    `$RABBITMQ_FEATURE_FLAGS` in tests" (commit
    57ed962ef6). These changes are no
    longer needed with the new logic.

V3: The check that verifies that the correct metadata store is used has
    a special case for nodes that use the secondary umbrella: if Khepri
    is supposed to be used but it's not, the feature flag is enabled.
    The reason is that the `v4.0.x` branch doesn't know about the `rel`
    configuration of `forced_feature_flags_on_init`. The nodes will
    have ignored thies parameter and booted with the stable feature
    flags only.

    Many testsuites are adapted to the new clustering order. If they
    manage which node joins which node, either the order is changed in
    the testcases, or nodes are started with only required feature
    flags. For testsuites that rely on peer discovery where the order is
    unknown, nodes are started with only required feature flags.
2025-01-27 12:08:12 +01:00
Michael Klishin 28602bea37
scripts/rabbitmqctl: allow standard input reads for 'import_definitions'
It was not listed in 7da7d4e1e, even though the command
accepts definitions via standard input.

References #10268.
Closes #13157.
2025-01-26 18:36:08 -05:00
Michael Klishin 643a58fdce
ctl import definitions: correct usage
it is likely a copy-paste artifact from
'ctl export_definitions' which does use '-'
as a target.

References #13157
2025-01-26 18:06:03 -05:00
Michael Klishin 3f9c92a81b
Merge pull request #13156 from rabbitmq/gazelle-main
bazel run gazelle
2025-01-26 10:36:26 -05:00
GitHub 456d6e9a6e bazel run gazelle 2025-01-26 04:02:33 +00:00
Michael Klishin a3decfa69e
Merge pull request #13115 from rabbitmq/issue-13040
Support exchange federation with MQTT 5.0 subscribers
2025-01-25 16:25:26 -05:00
Michael Klishin a53f051713
Merge pull request #13154 from rabbitmq/su_aws/limit_logging_error_with_tests
Log incorrectly claims the limit is per node, but the component count…
2025-01-24 20:39:47 -05:00
Simon c9f060d921
Merge branch 'main' into su_aws/limit_logging_error_with_tests 2025-01-24 15:55:37 -08:00
Simon Unge 3702b00471 Log incorrectly claims the limit is per node, but the component count is over all vhost in the cluster 2025-01-24 23:54:11 +00:00
Michael Klishin c630fc4281
Merge pull request #13152 from rabbitmq/revert-13149-su_aws/limit_logging_error
Revert "Log incorrectly claims the limit is per node,"
2025-01-24 16:43:27 -05:00
Michael Klishin de088f8947
Revert "Log incorrectly claims the limit is per node," 2025-01-24 16:42:52 -05:00
Michael Klishin 79dd5038f7
Merge pull request #13149 from rabbitmq/su_aws/limit_logging_error
Log incorrectly claims the limit is per node,
2025-01-24 14:10:00 -05:00
Simon Unge c93cacf477 Log incorrectly claims the limit is per node, but the component count is over all vhost in the cluster 2025-01-24 18:22:57 +00:00
Michal Kuratczyk 058856af75
pointless change to refresh the GH action
I pushed a branch with changes to this workflow and now
GH shows that branch as the new action. Hopefully this will reset it
2025-01-24 18:47:33 +01:00
Arnaud Cogoluègnes a67634fcf1
Merge pull request #13146 from rabbitmq/queue-purge-return-not-found-if-queue-does-not-exist
Return 404 in AMQP management queue purge for non-existing queue
2025-01-24 15:59:17 +00:00
Jean-Sébastien Pédron e883df4151
Merge pull request #13147 from rabbitmq/fix-test-flakes-in-amqp_client_SUITE
amqp_client_SUITE: Fix several test flakes
2025-01-24 16:35:28 +01:00
Jean-Sébastien Pédron aeca23c69d
amqp_client_SUITE: Fix several test flakes
[How]
1. Use feature flags correctly: the code shouldn't test if a feature
   flag is enabled, assuming something else enabled it. It should enable
   it and react to an error.
2. Use `close_connection_sync/1` instead of the asynchronous
   `amqp10_client:close_connection/1` to make sure they are really
   closed. The wait in `end_per_testcase/2` was not enough apparently.
3. For the two testcases that flake the most for me, enclose the code in
   a try/after and make sure to close the connection at the end,
   regardless of the result. This should be done for all testcases
   because the testgroup use a single set of RabbitMQ nodes for all
   testcases, therefore testcases are supposed to clean up after them...
2025-01-24 15:38:11 +01:00
Arnaud Cogoluègnes 7bfe2fd66f
Return 404 in AMQP management queue purge for non-existing queue 2025-01-24 14:57:44 +01:00
Michael Klishin 4627e7a360
Merge pull request #13138 from rabbitmq/simplify-direct-reply-to
Simplify Direct Reply-To
2025-01-24 07:31:41 -05:00
Michael Klishin c0bb5fb83f
Merge pull request #13140 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/org.springframework.boot-spring-boot-starter-parent-3.4.2
build(deps): bump org.springframework.boot:spring-boot-starter-parent from 3.4.1 to 3.4.2 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot
2025-01-23 14:12:02 -05:00