Compare commits

...

1372 Commits
v4.1.0 ... main

Author SHA1 Message Date
Michael Davis 1c264fa471
rabbitmq_streams: Check rabbit_queue_types is_enabled/0 during declare (#14699)
Trigger a 4.3.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
`rabbit_amqqueue:declare/7` consults the `is_enabled/0` callback of
`rabbit_queue_type` before attempting to create a queue.
`rabbit_stream_manager` emulates `rabbit_amqqueue:declare/7` rather
than calling it directly. To align with the `is_enabled/0` check in
`rabbit_amqqueue:declare/7`, `rabbit_stream_manager` needs to check
the callback during stream creation.
2025-10-07 00:05:23 +02:00
Arnaud Cogoluègnes cae2b4b038
Make worflow runnable with dispatch
Trigger a 4.3.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
2025-10-06 14:14:43 +02:00
Arnaud Cogoluègnes 3790fa3707
Set up nightly-built Docker image for main and 4.2 2025-10-06 14:12:42 +02:00
Arnaud Cogoluègnes 1faae0aed8
Use 4.3.0+ prefix for Docker image tag 2025-10-06 13:52:01 +02:00
dependabot[bot] da10f30f79
Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 12:33:30 +02:00
Arnaud Cogoluègnes 3dfc390f2f
Merge pull request #14696 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-89ef4725f4
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
2025-10-06 09:29:50 +00:00
Arnaud Cogoluègnes 3f719d53b2
Merge pull request #14672 from rabbitmq/use-timeout-for-leader-record-repair
Use tick-related timeout to repair leader record
2025-10-06 09:28:53 +00:00
dependabot[bot] 2614ed2a74
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 3 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework) and [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 3 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework) and [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.28.0...v1.29.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.28.0...v1.29.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.28.0...v1.29.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 5.14.0
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.4...r5.14.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.14.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 09:05:11 +00:00
Arnaud Cogoluègnes 51309eac3c
Exclude JUnit 6 from dependabot
Requires Java 17.
2025-10-06 10:54:02 +02:00
Arnaud Cogoluègnes 8387d739e0
Use tick-related timeout to repair leader record
A quorum queue tries to repair its record in a tick handler. This can
happen during a network partition and the metadata store may itself be
unavailable, making the update likely to time out.

The default metadata store timeout is usually higher than the tick
interval, so the tick handler may be stuck during several ticks. The
record takes some time to be updated (timeout + tick interval, 30 + 5
seconds by default), significantly longer than it takes the metadata
store to trigger an election and recover.

Client applications may rely on the quorum queue topology to connect to
an appropriate node, so making the system reflect the actual topology
faster is important to them.

This commit makes the record update operations use a timeout 1-second
lower than the tick interval. The tick handler process should finish
earlier in case of metadata datastore unavailability and it should not
take more than a couple of ticks once the datastore is available to
update the record.
2025-10-06 08:43:28 +00:00
Arnaud Cogoluègnes 29618a243e
Add workflow to trigger a 4.3 alpha build 2025-10-06 10:27:44 +02:00
Arnaud Cogoluègnes 55f9cfd433
Update dependabot configuration
Exclude JUnit 6 (requires Java 17), add v4.2.x branch for GitHub actions
and Maven.
2025-10-06 09:38:43 +02:00
Michael Klishin 6261a7d025
Merge pull request #14674 from rabbitmq/Zerpet-patch-1
Cleanup dependabot.yaml by 3.13.x configurations
2025-10-03 16:59:29 -04:00
Aitor Pérez Cedres 7a972e050b
Cleanup dependabot.yaml by 3.13.x configurations
Removed GitHub Actions and Maven dependency configurations for v3.13.x.
2025-10-03 16:50:16 +01:00
Jean-Sébastien Pédron 8ff21c24a6
Merge pull request #14669 from rabbitmq/run-ct-clustering_recovery-outside-of-parallel-set
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
clustering_recovery_SUITE: Run on its own in CI
2025-10-03 12:04:48 +02:00
Michael Klishin 4373543f0d
Merge pull request #14655 from amazon-mq/lukebakken/nuke-cacerts
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Remove all usage of `cacerts` from configuration schemas
2025-10-02 13:43:15 -04:00
Jean-Sébastien Pédron 4917048397
clustering_recovery_SUITE: Run on its own in CI
... instead of as part of a parallel CT group.

[Why]
This testsuite takes quite a lot of time. It affects the time to run the
parallel CT set 2 significantly, especially if it has to be restarted.
2025-10-02 19:34:46 +02:00
Jean-Sébastien Pédron 1d1faffdf2
Merge pull request #14665 from rabbitmq/fix-flaky-tests
clustering_recovery_SUITE: Skip tests that require RabbitMQ 4.2.0 in mixed-version testing
2025-10-02 18:53:28 +02:00
Jean-Sébastien Pédron 69e1703715
clustering_recovery_SUITE: Skip tests that require RabbitMQ 4.2.0 in mixed-version testing
[Why]
The `*_queue_after_partition_recovery_1` testcases rely on the fact that
the queue process retries to delete its queue record in its terminate
function.

RabbitMQ 4.1.x and before don't have that. Thus, depending on the timing
of the election of the Khepri leader after a network partition, the test
might fail.
2025-10-02 17:08:50 +02:00
Michael Klishin 2714c7f506
Merge pull request #14662 from rabbitmq/local-shovel-delete-after
Local shovel: ensure no more messages are published with delete-after
2025-10-02 10:06:05 -04:00
Diana Parra Corbacho 62daba4126 Local shovel: ensure no more messages are published with delete-after
once the limit is reached
2025-10-02 13:55:24 +02:00
Michael Klishin 2303570d90
Merge pull request #14658 from rabbitmq/dependabot/github_actions/main/peter-evans/repository-dispatch-4
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Bump peter-evans/repository-dispatch from 3 to 4
2025-10-01 16:02:36 -04:00
dependabot[bot] 4270620cfb
Bump peter-evans/repository-dispatch from 3 to 4
Bumps [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) from 3 to 4.
- [Release notes](https://github.com/peter-evans/repository-dispatch/releases)
- [Commits](https://github.com/peter-evans/repository-dispatch/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/repository-dispatch
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 18:03:34 +00:00
Michael Klishin 2ccac4e1bf
Merge pull request #14653 from rabbitmq/loic-cowboy-2.14.1
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Update Cowboy to 2.14.1
2025-10-01 11:27:10 -04:00
Luke Bakken ce86fb989e
Remove all usage of `cacerts` from configuration schemas
As mentioned in discussion #14426, the way that `cacerts` is handled by
cuttlefish schemas simply will not work if set.

If `cacerts` were set to a string value containing one X509 certificate,
it would eventually result in a crash because the `cacerts` ssl option
must be of [this type](https://www.erlang.org/doc/apps/ssl/ssl.html#t:client_option_cert/0):

```
{cacerts, CACerts :: [public_key:der_encoded()] | [public_key:combined_cert()]}
```

Neither of those are strings, of course.

This PR removes all use of `cacerts` in cuttlefish schemas. In addition,
it filters out `cacerts` and `certs_keys` from being JSON-encoded by an
HTTP API call to `/api/overview`. It _is_ technically possible to set
`cacerts` via `advanced.config`, so, if set, it would crash this API
call, as would `certs_keys`.
2025-10-01 08:14:14 -07:00
Michael Klishin 40728af80d
Merge pull request #14573 from rabbitmq/fix-exclusive-queues-with-khepri
Keep exclusive/auto-delete queues with Khepri + network partition
2025-10-01 10:37:02 -04:00
Loïc Hoguin 30259b5ae3
Update Cowboy to 2.14.1
The patch release contains a fix for an HTTP/2 Websocket issue.
2025-10-01 15:40:35 +02:00
Michael Klishin a95c3192fc
Merge pull request #14651 from rabbitmq/revert-14414-lukebakken/ldap-validation-api
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Revert "Implement LDAP credentials validation via HTTP API"
2025-09-30 13:10:29 -04:00
Michael Klishin f1595ad781
Revert "Implement LDAP credentials validation via HTTP API" 2025-09-30 13:09:46 -04:00
Michael Klishin c3b064c704
Merge pull request #14648 from rabbitmq/mk-dpc-shovel-fetch-parameters-module-from-registry
Shovel worker: fetch handler module from rabbit_registry
2025-09-30 12:43:40 -04:00
Michael Klishin 270c43fcac
Merge pull request #14637 from rabbitmq/issue-14623
Shovels: fix shovel status and deletion of failed shovels
2025-09-30 12:25:32 -04:00
Diana Parra Corbacho c9697a6b7a Shovels: make changes to shovel status backward compatible 2025-09-30 17:53:51 +02:00
Michael Klishin 2a920a4a32
Shovel worker: fetch handle module from rabbit_registry 2025-09-30 11:38:53 -04:00
Jean-Sébastien Pédron 6f71b54aec
Merge pull request #14646 from rabbitmq/ignore-SIGINFO-and-SIGWINCH
rabbitmq_prelaunch: Ignore SIGINFO and SIGWINCH
2025-09-30 15:59:43 +02:00
Jean-Sébastien Pédron 3a342bc00d
rabbitmq_prelaunch: Ignore SIGINFO and SIGWINCH
[Why]
We don't have handlers for these signals and this causes a message to be
logged.
2025-09-30 15:13:21 +02:00
Jean-Sébastien Pédron 3c4d073405
Keep exclusive/auto-delete queues with Khepri + network partition
[Why]
With Mnesia, when the network partition strategy is set to
`pause_minority`, nodes on the "minority side" are stopped.

Thus, the exclusive queues that were hosted by nodes on that minority
side are lost:
* Consumers connected on these nodes are disconnected because the nodes
  are stopped.
* Queue records on the majority side are deleted from the metadata
  store.

This was ok with Mnesia and how this network partition handling strategy
is implemented. However, it does not work with Khepri because the nodes
on the "minority side" continue to run and serve clients. Therefore the
cluster ends up in a weird situation:
1. The "majority side" deleted the queue records.
2. When the network partition is solved, the "minority side" gets the
   record deletion, but the queue processes continue to run.

This was similar for auto-delete queues.

[How]
With Khepri, we stop to delete transient queue records in general, just
because there is a node going down. Thanks to this, an exclusive or an
auto-delete queue and its consumer(s) are not affected by a network
partition: they continue to work.

However, if a node is really lost, we need to clean up dead queue
records. This was already done for durable queues with both Mnesia and
Khepri. But with Khepri, transient queue records persist in the store
like durable queue records (unlike with Mnesia).

That's why this commit changes the clean-up function,
`rabbit_amqqueue:forget_all_durable/1` into
`rabbit_amqqueue:forget_all/1` which deletes all queue records of queues
that were hosted on the given node, regardless if they are transient or
durable.

In addition to this, the queue process will spawn a temporary process
who will try to delete the underlying record indefinitely if no other
processes are waiting for a reply from the queue process. That's the
case for queues that are deleted because of an internal event (like the
exclusive/auto-delete conditions). The queue process will exit, which
will notify connections that the queue is gone.

Thanks to this, the temporary process will do its best to delete the
record in case of a network partition, whether the consumers go away
during or after that partition. That said, the node monitor drives some
failsafe code that cleans up record if the queue process was killed
before it could delete its own record.

Fixes #12949, #12597, #14527.
2025-09-30 12:58:02 +02:00
Jean-Sébastien Pédron 2c1b75276e
rabbit_node_monitor: Notify `rabbit` is live when handling a `nodeup` message
[Why]
So far, when there was a network partition with Mnesia, the most popular
partition handling strategies restarted RabbitMQ nodes. Therefore,
`rabbit` would execute the boot steps and one of them would notify other
members of the cluster that "this RabbitMQ node is live".

With Khepri, nodes are not restarted anymore and thus, boot steps are
not executed at the end of a network partition. As a consequence, other
members are not notified that a member is back online.

[How]
When the node monitor receives the `nodeup` message (managed by Erlang,
meaning that "a remote Erlang node just connected to this node through
Erlang distribution"), a `node_up` message is sent to all cluster
members (meaning "RabbitMQ is now running on the originating node").
Yeah, very poor naming...

This lets the RabbitMQ node monitor know when other nodes running
RabbitMQ are back online and react accordingly.

If a node is restarted, it means that another node could receive the
`node_up` message twice. The actions behind it must be idempotent.
2025-09-30 11:32:25 +02:00
Diana Parra Corbacho 33a6a20017 Shovels: tests for deletion of failed shovels 2025-09-30 10:10:35 +02:00
Diana Parra Corbacho 13201b2eb0 Shovels: return hosting node in terminated shovel status
Fixes deletion and restart
2025-09-30 08:25:56 +02:00
Michael Klishin 1158aca30e
Merge pull request #14644 from rabbitmq/mk-amqp-091-client-tls-simplification
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
amqp_ssl: simplify
2025-09-29 21:57:35 -04:00
Michael Klishin d4ce44319e
amqp_ssl: simplify
Now that Erlang 26 is the minimum required version.
2025-09-29 20:41:37 -04:00
Michael Klishin 7d8a281b3a
Merge pull request #14642 from rabbitmq/mk-amqp-client-ignore-expected-exceptions-in-node-logs
AMQP 0-9-1 client tests: ignore two expected exceptions in server node logs
2025-09-29 16:18:52 -04:00
Michael Klishin 630da40f5f
AMQP 0-9-1 client: ignore two expected exceptions in server node logs 2025-09-29 16:03:30 -04:00
Diana Parra Corbacho 7f1ceb26fd Shovel: fix deletion of terminated shovels 2025-09-29 21:10:36 +02:00
Michael Klishin 367d0b6407
Merge pull request #14414 from lukebakken/lukebakken/ldap-validation-api
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Implement LDAP credentials validation via HTTP API
2025-09-29 12:06:40 -04:00
Diana Parra Corbacho 99fea41352 Shovels: more detailed error message 2025-09-29 13:42:24 +02:00
Diana Parra Corbacho 9f39f60a3e Shovels: fix shovel status and deletion of failed shovels
These shovels are stuck in a restart loop and need to be listed on
shovel status, which also allows for its deletion
2025-09-29 12:15:39 +02:00
Arnaud Cogoluègnes a09383d1e5
Merge pull request #14628 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-2e0f38c621
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
[skip ci] Bump the dev-deps group across 4 directories with 1 update
2025-09-29 05:59:35 +00:00
Michael Klishin deb64619c3
Merge pull request #14632 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-37581f764a
Peer Discovery AWS Integration Test / Integration Test (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Spring Authorization Server docker image (make) / docker (push) Has been cancelled Details
IBM MQ docker image (make) / docker (push) Has been cancelled Details
[skip ci] Bump the prod-deps group across 4 directories with 2 updates
2025-09-27 14:27:38 -04:00
dependabot[bot] ede10d8978
[skip ci] Bump the prod-deps group across 4 directories with 2 updates
Bumps the prod-deps group with 2 updates in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.14.0 to 3.14.1
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.46.1 to 3.0.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.46.1...lib/3.0.0)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.14.0 to 3.14.1
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.46.1 to 3.0.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.46.1...lib/3.0.0)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.14.0 to 3.14.1
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.46.1 to 3.0.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.46.1...lib/3.0.0)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.14.0 to 3.14.1
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.14.0...maven-compiler-plugin-3.14.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.46.1 to 3.0.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.46.1...lib/3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-27 18:16:00 +00:00
dependabot[bot] 41f2019858
[skip ci] Bump the dev-deps group across 4 directories with 1 update
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).


Updates `org.assertj:assertj-core` from 3.27.5 to 3.27.6
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.5...assertj-build-3.27.6)

Updates `org.assertj:assertj-core` from 3.27.5 to 3.27.6
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.5...assertj-build-3.27.6)

Updates `org.assertj:assertj-core` from 3.27.5 to 3.27.6
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.5...assertj-build-3.27.6)

Updates `org.assertj:assertj-core` from 3.27.5 to 3.27.6
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.5...assertj-build-3.27.6)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-27 18:15:06 +00:00
Michael Klishin d8752471f8
Merge pull request #14624 from rabbitmq/md/configure-queue-type-enable
Allow configuring whether queue types are enabled
2025-09-26 16:50:33 -04:00
Michael Klishin 149b5e30ad
Merge pull request #14622 from rabbitmq/rabbitmq-server-11304
Introduce a configurable directory for 3rd party plugins that's not deleted during the Mnesia => Khepri migration
2025-09-26 16:11:41 -04:00
Michael Davis 976f0cf175
Allow configuring whether queue types are enabled
This change adds config options for controlling the `is_enabled/0`
queue type callback for classic queues, quorum queues and stream
queues. This is useful for operators to be able to control whether
users can declare these queues - i.e. to prevent users from declaring
queue types which cannot be supported operationally.

Setting

    queue_types.stream.enabled = false

In a config file for example prevents stream queues from being declared.
2025-09-26 14:29:46 -04:00
Michael Klishin f2131c6549
Naming #11304
'user_provided_plugins_data_dir' make it immediately
obvious that the data directory is for 3rd party
plugins (user-provided plugins), and it is
not set up or used internally by RabbitMQ.
2025-09-26 12:23:05 -04:00
Péter Gömöri 3442c91986
Introduce "plugins_data_dir" which is preserved during khepri migration
This is mainly for community plugins which want to migrate away from
Mnesia into a new subdir. (They might not even use Khepri, or use
Khepri but a different store id.)

Fixes #11304
2025-09-26 12:23:05 -04:00
David Ansari 5fa6f7ef47
Merge pull request #14616 from rabbitmq/loic-amqp10_client-http2-websocket
AMQP1.0 client: Support HTTP/2 Websocket
2025-09-26 12:40:53 +02:00
Loïc Hoguin 0587a18227
AMQP1.0 client: Support HTTP/2 Websocket 2025-09-26 11:04:13 +02:00
Luke Bakken 2eb8ce5e0a
Add `NON_DETERMINISTIC` make variable (#14577)
Follow-up to:
* #3442
* 93db480bc4
* #13899
* #14326

Simply changing `+=` to `?=` doesn't work as there are other important
statements added to `RMQ_ERLC_OPTS` that can't be left out when `make
RMQ_ERLC_OPTS=''` is run. This only became apparent when a completely
cleaned-out checkout of `rabbitmq/rabbitmq-server` was attempted to be
built with that command.

This adds `NON_DETERMINISTIC` which will be used like this:

```
make NON_DETERMINISTIC=true
```

...and `+deterministic` won't be passed to `erlc` or other commands.
2025-09-25 09:08:24 -07:00
Luke Bakken 773e754432
Merge branch 'main' into lukebakken/ldap-validation-api 2025-09-25 09:01:04 -07:00
David Ansari ed05807380
Remove update/2 callback from rabbit_queue_type (#14610) 2025-09-25 16:09:28 +02:00
David Ansari 2e75bc6eb5
Reduce ETS copy overhead when delivering to target queues (#14570)
* Reduce ETS copy overhead when delivering to target queues

 ## What?
This commit avoids copying the full amqqueue record from ETS per incoming message
and target queue.
The amqqueue record contains 21 elements and for some queue types,
especially streams, some elements are themselves nested terms.

 ## How?

In Khepri, use a new `rabbit_khepri_queue_target` projection which
contains a subset of the full amqqueue record.

This way all relevant information to deliver to a target queue can be
looked up in a single ets:lookup_element call.

Alternative approaches are described in https://github.com/erlang/otp/issues/10211

 ## Benchmark

Fanout to 3 streams

Start broker:
```
make run-broker TEST_TMPDIR="$HOME/scratch/rabbit/test" \
    FULL=1 \
    RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+S 5" \
    RABBITMQ_CONFIG_FILE="$HOME/scratch/rabbit/high-credit.config" \
    PLUGINS="rabbitmq_management"
```

`high-credit.config` contains:
```
[
 {rabbit, [
  %% Maximum incoming-window of AMQP 1.0 session.
  %% Default: 400
  {max_incoming_window, 5000},

  %% Maximum link-credit RabbitMQ grants to AMQP 1.0 sender.
  %% Default: 128
  {max_link_credit, 2000},

  %% Maximum link-credit RabbitMQ AMQP 1.0 session grants to sending queue.
  %% Default: 256
  {max_queue_credit, 5000},

  {loopback_users, []}
 ]},

 {rabbitmq_management_agent, [
  {disable_metrics_collector, true}
 ]}
].
```

Create the 3 streams and bindings to the fanout exchange:
```
deps/rabbitmq_management/bin/rabbitmqadmin declare queue queue_type=stream durable=true name=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss1 && \
    deps/rabbitmq_management/bin/rabbitmqadmin declare queue queue_type=stream durable=true name=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss2 && \
    deps/rabbitmq_management/bin/rabbitmqadmin declare queue queue_type=stream durable=true name=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss3 && \
    deps/rabbitmq_management/bin/rabbitmqadmin declare binding source=amq.fanout destination=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss1 && \
    deps/rabbitmq_management/bin/rabbitmqadmin declare binding source=amq.fanout destination=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss2 && \
    deps/rabbitmq_management/bin/rabbitmqadmin declare binding source=amq.fanout destination=ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss3

```

Start the client:
```
quiver-arrow send //host.docker.internal//exchanges/amq.fanout --summary --count 1m --body-size 4
```

`main` branch:
```
Count ............................................. 1,000,000 messages
Duration ............................................... 16.3 seconds
Message rate ......................................... 61,237 messages/s
```

with this PR:
```
Count ............................................. 1,000,000 messages
Duration ............................................... 14.2 seconds
Message rate ......................................... 70,309 messages/s
```

Hence, this PR increases the throughput when sending to 3 streams via AMQP by ~14%.

* Avoid creating 5 elems tuple

* Simplify rabbit_queue_type callbacks

deliver should only take targets and init should only take the full record

* Fix flaky test

* Fix specs
2025-09-25 11:25:09 +02:00
Michael Klishin ccd384c974
The next 4.2.0 beta will be beta.5 2025-09-24 22:52:14 -04:00
Michael Klishin 8b4a3f6521
4.2.0 release notes updates 2025-09-24 21:10:39 -04:00
Michael Klishin 7236131f48
Error message wording #14545, part 2 2025-09-24 21:08:36 -04:00
Michael Klishin 200127c6a8
Merge pull request #14589 from rabbitmq/qq-resend-issue
Quorum queues: fix resend issues after network partition
2025-09-24 17:17:36 -04:00
Michael Klishin 09c917a8c1
Merge pull request #14545 from sunfinite/protected-users
Check for protected tag during user update and deletion via management API
2025-09-24 17:13:22 -04:00
Michael Klishin ca25a58cfb
Merge pull request #14500 from rabbitmq/loic-cowboy-data_delivery-relay
Enable HTTP/2 Websocket in Web plugins by default
2025-09-24 14:22:33 -04:00
Michael Klishin 39b1a51b19
Merge pull request #14559 from rabbitmq/bump-up-ldap-docker-image
Bump up version of ldap docker image used in selenium tests
2025-09-24 14:20:09 -04:00
Michael Klishin 351ec1b4c7
Merge pull request #14593 from rabbitmq/shovel-raw
Shovels: Optimise amqp10 client messages for shovel usage
2025-09-24 14:04:00 -04:00
Michael Klishin cd8029ef54
AWS plugin: correct entry point module #14595 2025-09-24 13:42:50 -04:00
Loïc Hoguin e50bf704f1
Web-STOMP: Add a test for HTTP/2 Websocket 2025-09-24 14:29:49 +02:00
Loïc Hoguin 3bad41f4f2
Web-MQTT: Add a test for HTTP/2 Websocket 2025-09-24 14:00:12 +02:00
Loïc Hoguin 8ea901b1e5
Merge pull request #14576 from rabbitmq/loic-fix-cq-eof-eof
CQ shared: Fix off-by-nine error leading to lost messages
2025-09-24 12:50:17 +02:00
Karl Nilsson b66dc4017e QQ: fix resend issues after network partition.
A queue client that send a message during a network partition
that later caused a distribution disconnection would in some cases
never resend the lost message, even if kept in the pending buffer.
Subsequent sends would be accepted by the state machine but would
never be enqueued as there would be a missing sequence.

In the case of publishers that use pre-settled sends the pending
messages would have also been incorrectly removed from the
pending map.

To fix we removed timer resend aapproach and instead have the leader
send leader_change messages on node up to prompt any queue clients
to resend their pending buffer.
2025-09-24 08:58:45 +01:00
Michael Klishin 512e6a42df
Merge pull request #14560 from rabbitmq/message_size_stats-cli-command
Introduce a 'rabbitmq-diagnostics message_size_stats' for reasoning about message size distribution
2025-09-24 00:10:35 -04:00
Michael Klishin 1f4e3bbdc1
Merge pull request #14595 from amazon-mq/lukebakken/rabbitmq-aws-schema-tests
AWS plugin: enable Cuttlefish schema tests
2025-09-24 00:02:35 -04:00
Michael Klishin 42e99ddf2a
Only expose message_size_stats command to rabbitmq-diagnostics
The whole point of introducing rabbitmq-diagnostics,
rabbitmq-queues, rabbitmq-streams is to stop
growing the ctl command list, which has been massive
even five years ago.
2025-09-23 23:15:23 -04:00
Michael Klishin 4b7230b075
Wording #14560 2025-09-23 23:14:12 -04:00
Michal Kuratczyk bf3c378473
rabbitmq-diagnostics message_size_stats
This command displays cluster-wide message size
statistics. It's less detailed than what can be
retrieved from the Prometheus endpoint, but
it'll be available to all users, regardless of their
monitoring setup, or lack thereof.
2025-09-23 22:53:43 -04:00
Luke Bakken 1001e2b038
Enable cuttlefish schema tests
These changes add the minimum required changes and artifacts to enable
cuttlefish schema tests, which can be run with this command:

```
make -C deps/rabbitmq_aws ct-config_schema
```
2025-09-23 15:41:35 -07:00
Ben Nguyen 4a324706a4
AWS peer discovery: ensure consistent hostname path ordering (#14557)
* AWS peer discovery: ensure consistent hostname path ordering

AWS EC2 API returns networkInterfaceSet and privateIpAddressesSet in
arbitrary order, causing non-deterministic hostname resolution during
peer discovery. This leads to inconsistent cluster formation.

Changes:
- Sort network interfaces by deviceIndex (0 first for primary ENI)
- Sort private IP addresses by primary flag (primary=true first)
- Add debug logging to show hostname path selection and sorting results
- Add comprehensive unit tests for sorting behavior

The sorting ensures deviceIndex=0 and primary=true IPs are consistently
selected first, making peer discovery deterministic across deployments.

* AWS peer discovery: ensure consistent hostname path ordering (address feedback on debug logs and sorting helper functions)
2025-09-23 14:19:07 -07:00
Diana Parra Corbacho 897260ce3d Shovels: Optimise amqp10 client messages for shovel usage
AMQP10 shovels don't need the amqp10 message format, the binary
can be translated directly into a message container and also
the other way around. The new amqp10_raw_msg just stores the payload
and information required to create the transfer frame, skipping
a few unnecessary encoding/decoding operations of the AMQP10 sections.
2025-09-23 23:11:49 +02:00
Michael Klishin 668dbe2e2d
Merge pull request #14561 from rabbitmq/local-shovel-counters
Local shovels: Add global counters
2025-09-23 17:02:00 -04:00
Luke Bakken 9a4cb9c881
Implement LDAP credentials validation via HTTP API
See discussion #14244

These changes will allow a user to make an HTTP API request to...

```
/api/ldap/validate/simple-bind
```

...with an appropriate JSON body, and the plugin will attempt a
connection to the specified LDAP server using the provided credentials.
This allows validation that a connection can be made to an LDAP server
from a RabbitMQ cluster environment.

* Add code and tests for `eldap:simple_bind` validation.
* Add support for testing TLS connections to OpenLDAP
* Add support for validating TLS related configuration via `/ldap/validate/simple-bind`
* Add support for various TLS options:
 * versions
 * depth
 * multiple CA cert pem data
* Fall back to system certs if neither `cacertfile` nor `cacerts_pem_data` are provided to the `simple-bind` validation.
* Add `ssl_hostname_verification` support.
* Return 422 when auth fails
* Add more informative information when connection fails
* Add more tests with invalid input
* Catch parsing errors
* Tests for edge-cases for password / user_dn
* Add test for use_ssl + use_starttls combo
* Add test for ssl_options.depth validation
* Add validation tests for server_name_indication
2025-09-23 08:50:14 -07:00
Loïc Hoguin f36385408a CQ shared: Fix off-by-nine error leading to lost messages
And `eof` crashes.

The problem is that we may end up trying to read more data
from the file when scanning, despite being at the end of the
file. This results in the current Acc to be returned instead
of the remaining data being parsed.

This results in some messages at the end of the file being
truncated off despite still being in memory (and still pointing
to the end of the original file, well past the truncation point).
2025-09-22 15:14:10 -07:00
Michael Klishin 2e9d6eeaae
Merge pull request #14587 from rabbitmq/fix-ci-oci-in-pr
Follow up #14449: fix OCI trigger
2025-09-22 14:29:14 -04:00
Aitor Perez f188d67ba0
Fix OCI gate keeper condition
Follow up to #14449
2025-09-22 15:25:51 +01:00
Aitor Perez dea3514e22
Revert "Fix OCI trigger in PR"
This reverts commit 771874ca6c.
2025-09-22 15:25:24 +01:00
Arnaud Cogoluègnes a7827ba05b
Merge pull request #14189 from rabbitmq/stream-dispatching-improvements
Integrate Osiris reader optimizations for streams
2025-09-22 12:10:28 +00:00
Arnaud Cogoluègnes 025280e04c
Bump Osiris to 1.10.0 2025-09-22 11:15:27 +02:00
Arnaud Cogoluègnes 9f162dfd01
Adapt stream code to Osiris read ahead
Osiris can read ahead data in case of small chunks. This saves system
calls and increases consumption rate dramatically for some streams.
This is transparent for the stream protocol, but requires a small tweak
for the stream queue type implementation (passing in the previous
iterator when creating a new one).

The read ahead is on by default but can be deactivated with to the new
stream.read_ahead configuration entry (true / false).

Co-authored-by: Karl Nilsson <kjnilsson@gmail.com>

References rabbitmq/osiris#192
2025-09-22 11:14:54 +02:00
Arnaud Cogoluègnes 885e89ebbb
Return stream frame header binary in dispatch chunk callback
This saves a system call by sending the frame header and the chunk
header at the same time.

References rabbitmq/osiris#192
2025-09-22 11:14:54 +02:00
Arnaud Cogoluègnes 25db081302
Merge pull request #14580 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-bb6fe90acb
[skip ci] Bump the dev-deps group across 4 directories with 2 updates
2025-09-22 05:55:30 +00:00
Arnaud Cogoluègnes ca09b7cb1a
Merge pull request #14584 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-ddebd59f35
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-09-22 05:54:37 +00:00
dependabot[bot] f1b4964dda
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.5 to 3.5.6
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.5...v3.5.6)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.5 to 3.5.6
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.5...v3.5.6)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-20 18:05:02 +00:00
dependabot[bot] e56e667dca
[skip ci] Bump the dev-deps group across 4 directories with 2 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbit/test/amqp_jms_SUITE_data directory: org.apache.qpid:qpid-jms-client and [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).


Updates `org.apache.qpid:qpid-jms-client` from 2.8.0 to 2.9.0

Updates `org.assertj:assertj-core` from 3.27.4 to 3.27.5
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.4...assertj-build-3.27.5)

Updates `org.assertj:assertj-core` from 3.27.4 to 3.27.5
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.4...assertj-build-3.27.5)

Updates `org.assertj:assertj-core` from 3.27.4 to 3.27.5
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.4...assertj-build-3.27.5)

Updates `org.assertj:assertj-core` from 3.27.4 to 3.27.5
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.4...assertj-build-3.27.5)

---
updated-dependencies:
- dependency-name: org.apache.qpid:qpid-jms-client
  dependency-version: 2.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-20 18:04:11 +00:00
D Corbacho 1e3e58a29b
Amqp10 shovel: retry with insufficient_credit error (#14569) 2025-09-19 14:37:39 +02:00
Loïc Hoguin 725c2d560f
Enable HTTP/2 Websocket in Web plugins
This uses Cowboy's new direct data delivery mechanism,
which provides more performance.

Cowboy is now pinned to 2.14.0 and Cowlib to 2.16.0.

HTTP/2 Websocket is enabled by default. It can be disabled
as needed by setting `#{enable_connect_protocol => false}`
in the plugin's `cowboy_opts`.

Web-STOMP did not have HTTP/2 enabled before, now it does.
Web-MQTT already had HTTP/2 enabled.
2025-09-19 11:27:57 +02:00
Loïc Hoguin ecc77ecc27
Make Web-STOMP example use wss:// when in https:// 2025-09-18 14:11:21 +02:00
Diana Parra Corbacho a4b37d7886 Local shovels: Test global counters 2025-09-18 13:18:16 +02:00
David Ansari b3a58b86ed Include #14546 to the 4.2.0 release notes 2025-09-18 12:38:13 +02:00
Diana Parra Corbacho bb5d527d17 Local shovels: Add global counters 2025-09-18 09:17:52 +02:00
David Ansari a66c716d9c
Speed up fanout exchange (#14546)
* Add test case for binding args Khepri regression

This commit adds a test case for a regression/bug that occurs in Khepri.
```
make -C deps/rabbit ct-bindings t=cluster:binding_args RABBITMQ_METADATA_STORE=mnesia
```
succeeds, but
```
make -C deps/rabbit ct-bindings t=cluster:binding_args RABBITMQ_METADATA_STORE=khepri
```
fails.

The problem is that ETS table `rabbit_khepri_index_route` cannot
differentiate between two bindings with different binding arguments, and
therefore deletes entries too early, leading to wrong routing decisions.

The solution to this bug is to include the binding arguments in the
`rabbit_khepri_index_route` projection, similar to how the binding args
are also included in the `rabbit_index_route` Mnesia table.

This bug/regression is an edge case and exists if the source exchange
type is `direct` or `fanout` and if different bindings arguments are
used by client apps. Note that such binding arguments are entirely
ignored when RabbitMQ performs routing decisions for the `direct` or
`fanout` exchange. However, there might be client apps that use binding
arguments to add some metadata to the binding, for example `app-id` or
`user` or `purpose` and might use this metadata as a form of reference
counting in deciding when to delete `auto-delete` exchanges or just for
informational/operational purposes.

* Fix regression with Khepri binding args

Fix #14533

* Speed up fanout exchange

Resolves #14531

 ## What?
Increase end-to-end message throughput for messages routed via the fanout exchange by ~42% (see benchmark below).
In addition to the fanout exchange, a similar speed up is achieved for the following exchange types:
* modulus hash
* random
* recent history

This applies only if Khepri is enabled.

 ## How?
Use an additional routing table (projection) whose table key is the source exchange.
Looking up the destinations happens then by an ETS table key.

Prior to this commit, CPUs were busy compiling the same match spec for every incoming message.

 ## Benchmark
1. Start RabbitMQ:
```
make run-broker RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+S 5" \
    RABBITMQ_CONFIG_FILE="advanced.config" PLUGINS="rabbitmq_management"
```
where `advanced.config` contains:
```
[
 {rabbitmq_management_agent, [
  {disable_metrics_collector, true}
 ]}
].
```

2. Create a queue and binding:
```
deps/rabbitmq_management/bin/rabbitmqadmin declare queue queue_type=classic durable=true name=q1 && \
deps/rabbitmq_management/bin/rabbitmqadmin declare binding source=amq.fanout destination=q1
```

3. Create the load
```
java -jar target/perf-test.jar -p -e amq.fanout -u q1 -s 5 --autoack -z 60
```

Before this commit:
```
sending rate avg: 97394 msg/s
receiving rate avg: 97394 msg/s
```

After this commit:
```
sending rate avg: 138677 msg/s
receiving rate avg: 138677 msg/s
```

The CPU flamegraph shows that `rabbit_exchange:route/3` consumes the following CPU amounts:
* 13.5% before this commit
* 3.4% after this commit

 ## Downsides
Additional ETS memory usage for the new projection table.
However, the new table does not store any binding entries for the following
source exchange types:
* direct
* headers
* topic
* x-local-random

* Add exchange binding tests

Test that exchange bindings work correctly with the new projection
tables `rabbit_khepri_route_by_source` and
`rabbit_khepri_route_by_source_key`.

* Always register all projections

Khepri won’t modify a projection that is already registered (based on its name).

* Protect ets:lookup_element/4 in try catch

See https://github.com/rabbitmq/rabbitmq-server/pull/11667#issue-2401399413
for rationale.
2025-09-17 17:17:37 +02:00
Marcial Rosales 7d78f0467b Bump up version of ldap docker image
To fix an issue where the old version did not
run in M1 arch
2025-09-17 13:51:05 +02:00
Michael Klishin 18e4bf6eaf
Merge pull request #14555 from lukebakken/lukebakken/fix-format-status-followup
Correctly implement `format_state/1` in `rabbit_priority_queue`
2025-09-16 15:01:40 -04:00
Luke Bakken 9c90e85e7c
Correctly implement `format_state/1` in `rabbit_priority_queue`
The previous implementation did not take the unique `passthrough` record
into account when formatting state.

To test the priority and non-priority scenarios, add `exit(kaboom)` in
`rabbit_amqqueue_process` `handle_call({basic_consume...` then run
PerfTest with these arguments:

```
--producers 1 --consumers 1 --pmessages 100 --queue-args x-max-priority=10

--producers 1 --consumers 1 --pmessages 100
```
2025-09-16 08:45:40 -07:00
Jean-Sébastien Pédron b819507df1
Merge pull request #14547 from rabbitmq/export-rabbit_feature_flags-write_enabled_feature_flags_list
rabbit_feature_flags: Export `write_enabled_feature_flags_list/1`
2025-09-16 15:10:11 +02:00
Jean-Sébastien Pédron d1533a8fbb
rabbit_feature_flags: Export `write_enabled_feature_flags_list/1`
[Why]
This may be useful for some tooling for Tanzu RabbitMQ.
2025-09-16 08:19:24 +02:00
Michael Klishin 4258b650df
4.2.0 release notes: bump to beta.4 2025-09-15 17:02:56 -04:00
Michael Klishin d3f6ead253
4.2.0 release notes updates 2025-09-15 16:20:58 -04:00
Luke Bakken 34f00e0362
Add function head to match single-element list containing for which to search. 2025-09-15 11:30:16 -07:00
Sunny Katkuri ef7e772013
Check for protected tag during user update and deletion via management API 2025-09-15 11:02:22 -07:00
Michael Klishin aadc89b050
Merge pull request #14523 from lukebakken/lukebakken/fix-format-status
Shrink queue process state in case of abnormal queue [member] process termination to reduce peak memory footprint
2025-09-15 13:26:28 -04:00
Luke Bakken db1291d49b
Code to clean up queue process state when crashed
* Call `Mod:format_state/1` if exported to possibly truncate huge states
* Add more information about truncated ram_pending_ack and disk_pending_ack
* Add `log.error_logger_format_depth` cuttlefish schema value
* Add `format_state/1` to `rabbit_channel`
* Add `log.summarize_process_state`, default is `false`, to enable summarizing process state for crash logs.
* Added `format_state` to `rabbit_classic_queue_index_v2` and `rabbit_classic_queue_store_v2`
* Ensure `rabbit_channel:format_state/1` uses `summarize_process_state_when_logged`
* Do not set `summarize_process_state_when_logged` value by default.
* Type specs
2025-09-15 09:37:12 -07:00
Arnaud Cogoluègnes e0bbd50322
Merge pull request #14536 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-047390c407
[skip ci] Bump the dev-deps group across 2 directories with 3 updates
2025-09-15 06:00:20 +00:00
Arnaud Cogoluègnes 3158d2b99b
Merge pull request #14540 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-73511a3df0
[skip ci] Bump the prod-deps group across 5 directories with 3 updates
2025-09-15 05:59:14 +00:00
dependabot[bot] 29c084f0c9
[skip ci] Bump the prod-deps group across 5 directories with 3 updates
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).


Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.10 to 2.2.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.10...v2.2.20)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.10 to 2.2.20

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 18:11:55 +00:00
dependabot[bot] a93c552a7e
[skip ci] Bump the dev-deps group across 2 directories with 3 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.google.code.gson:gson](https://github.com/google/gson).


Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.10 to 2.2.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.10...v2.2.20)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.10 to 2.2.20

Updates `com.google.code.gson:gson` from 2.13.1 to 2.13.2
- [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.13.1...gson-parent-2.13.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 18:07:41 +00:00
Michael Klishin c85ba2a0d3
Merge pull request #14530 from rabbitmq/khepri-read-concurrency
Optimise Khepri for concurrent reads
2025-09-12 15:40:22 -04:00
David Ansari d29cac3cd5 Optimise Khepri for concurrent reads
This commit makes read operations for the following Khepri projections much cheaper:
* rabbit_khepri_queue
* rabbit_khepri_exchange
* rabbit_khepri_index_route
* rabbit_khepri_topic_trie

Entries in these ETS tables are read for every message entering RabbitMQ.
Some messages entering RabbitMQ will cause even multiple reads from
these ETS tables, e.g. multiple reads from `rabbit_khepri_queue` if a message
is routed to more than one queue or multiple reads from `rabbit_khepri_index_route`
if a message has multiple routing keys.

On a busy RabbitMQ node, these tables are read concurrently (on multiple physical processors)
hundreds of thousands of times per second.
2025-09-12 15:48:52 +02:00
David Ansari 5b9f98ac6a
Merge pull request #14528 from rabbitmq/volatile-consumers
Disallow multiple consumers on one volatile queue
2025-09-12 13:51:44 +02:00
David Ansari 0843704dbb Disallow multiple consumers on one volatile queue
There can be at most one consumer per volatile queue instance.
This consumer must also have attached on the same channel/session as the
creator of the queue.

Prior to this commit, it was possible for clients on other
connections or sessions to attach a receiving link to an existing volatile
queue name, even though no messages would be delivered.

It's better for RabbitMQ to directly refuse the link at attach time.
2025-09-12 12:06:51 +02:00
David Ansari 439ea52158 Add Direct Reply-To to 4.2.0 release notes
Release notes for #14474
2025-09-11 18:08:27 +02:00
Michael Klishin 0473f35718
Merge pull request #14474 from rabbitmq/amqp-direct-reply-to
Support Direct Reply-To for AMQP 1.0
2025-09-10 15:02:18 -04:00
David Ansari 72cd7a35c2 Support Direct Reply-To for AMQP 1.0
# What?
* Support Direct Reply-To for AMQP 1.0
* Compared to AMQP 0.9.1, this PR allows for multiple volatile queues on a single
  AMQP 1.0 session. Use case: JMS clients can create multiple temporary queues on
  the same JMS/AMQP session:
  * https://jakarta.ee/specifications/messaging/3.1/apidocs/jakarta.messaging/jakarta/jms/session#createTemporaryQueue()
  * https://jakarta.ee/specifications/messaging/3.1/apidocs/jakarta.messaging/jakarta/jms/jmscontext#createTemporaryQueue()
* Fix missing metrics in for Direct Reply-To in AMQP 0.9.1, e.g.
  `messages_delivered_total`
* Fix missing metrics (even without using Direct Reply-To ) in AMQP 0.9.1:
  If stats level is not `fine`, global metrics `rabbitmq_global_messages_delivered_*` should still be incremented.

 # Why?
* Allow for scalable at-most-once RPC reply delivery
  Example use case: thousands of requesters connect, send a single
  request, wait for a single reply, and disconnect.
  This PR won't create any queue and won't write to the metadata store.
  Therefore, there's less pressure on the metadata store, less pressure
  on the Management API when listing all queues, less pressure on the
  metrics subsystem, etc.
* Feature parity with AMQP 0.9.1

 # How?
This PR extracts the previously channel specific Direct Reply-To code
into a new queue type: `rabbit_volatile_queue`.
"Volatile" describes the semantics, not a use-case. It signals non-durable,
zero-buffer, at-most-once, may-drop, and "not stored in Khepri."

This new queue type is then used for AMQP 1.0 and AMQP 0.9.1.

Sending to the volatile queue is stateless like previously with Direct Reply-To in AMQP 0.9.1 and like done
for the MQTT QoS 0 queue.
This allows for use cases where a single responder replies to e.g. 100k different requesters.

RabbitMQ will automatically auto grant new link-credit to the responder because the new queue type confirms immediately.

The key gets implicitly checked by the channel/session:
If the queue name (including the key) doesn’t exist, the `handle_event` callback for this queue isn’t invoked and therefore
no delivery will be sent to the responder.

This commit supports Direct Reply-To across AMQP 1.0 and 0.9.1. In other
words, the requester can be an AMQP 1.0 client while the responder is an
AMQP 0.9.1 client or vice versa.
RabbitMQ will internally convert between AMQP 0.9.1 `reply_to` and AMQP
1.0 `/queues/<queue>` address. The AMQP 0.9.1 `reply_to` property is
expected to contain a queue name. That's in line with the AMQP 0.9.1
spec:
> One of the standard message properties is Reply-To, which is designed
specifically for carrying the name of reply queues.

Compared to AMQP 0.9.1 where the requester sets the `reply_to` property
to `amq.rabbitmq.reply-to` and RabbitMQ modifies this field when
forwarding the message to the request queue, in AMQP 1.0 the requester
learns about the queue name from the broker at link attachment time.
The requester has to set the reply-to property to the server generated
queue name. That's because the server isn't allowed to modify the bare
message.

During link attachment time, the client has to set certain fields.
These fields are expected to be set by the RabbitMQ client libraries.
Here is an Erlang example:
```erl
Source = #{address => undefined,
           durable => none,
           expiry_policy => <<"link-detach">>,
           dynamic => true,
           capabilities => [<<"rabbitmq:volatile-queue">>]},
AttachArgs = #{name => <<"receiver">>,
               role => {receiver, Source, self()},
               snd_settle_mode => settled,
               rcv_settle_mode => first},
{ok, Receiver} = amqp10_client:attach_link(Session, AttachArgs),
AddressReplyQ = receive {amqp10_event, {link, Receiver, {attached, Attach}}} ->
                  #'v1_0.attach'{source = #'v1_0.source'{address = {utf8, Addr}}} = Attach,
                  Addr
end,
```

The client then sends the message by setting the reply-to address as
follows:
```erl
amqp10_client:send_msg(
  SenderRequester,
  amqp10_msg:set_properties(
    #{message_id => <<"my ID">>,
      reply_to => AddressReplyQ},
    amqp10_msg:new(<<"tag">>, <<"request">>))),
```

If the responder attaches to the queue target in the reply-to field,
RabbitMQ will check if the requester link is still attached. If the
requester detached, the link will be refused.

The responder can also attach to the anonymous null target and set the
`to` field to the `reply-to` address.

If RabbitMQ cannot deliver a reply, instead of buffering the reply,
RabbitMQ will be drop the reply and increment the following Prometheus metric:
```
rabbitmq_global_messages_dead_lettered_maxlen_total{queue_type="rabbit_volatile_queue",dead_letter_strategy="disabled"} 0.0
```
That's in line with the MQTT QoS 0 queue type.

A reply message could be dropped for a variety of reasons:
1. The requester ran out of link-credit. It's therefore the requester's
   responsibility to grant sufficient link-credit on its receiving link.
2. RabbitMQ isn't allowed to deliver any message to due session flow
   control. It's the requster's responsibility to keep the session window
   large enough.
3. The requester doesn't consume messages fast enough causing TCP
   backpressure being applied or the RabbitMQ AMQP writer proc isn't
   scheduled quickly enough. The latter can happen for example if
   RabbitMQ runs with a single scheduler (is assigned a single CPU
   core). In either case, RabbitMQ internal flow control causes the
   volatile queue to drop messages.

Therefore, if high throughput is required while message loss is undesirable, a classic queue should be used
instead of a volatile queue since the former buffers messages while the
latter doesn't.

The main difference between the volatile queue and the MQTT QoS 0 queue
is that the former isn't written to the metadata store.

 # Breaking Change
Prior to this PR the following [documented caveat](https://www.rabbitmq.com/docs/4.0/direct-reply-to#limitations) applied:
> If the RPC server publishes with the mandatory flag set then `amq.rabbitmq.reply-to.*`
is treated as **not** a queue; i.e. if the server only publishes to this name then the message
will be considered "not routed"; a `basic.return` will be sent if the mandatory flag was set.

This PR removes this caveat.
This PR introduces the following new behaviour:
> If the RPC server publishes with the mandatory flag set, then `amq.rabbitmq.reply-to.*`
is treated as a queue (assuming this queue name is encoded correctly). However,
whether the requester is still there to consume the reply is not checked at routing time.
In other words, if the RPC server only publishes to this name, then the message will be
considered "routed" and RabbitMQ will therefore not send a `basic.return`.
2025-09-09 14:52:22 +02:00
Michael Klishin 81117133be
auth_oauth2.https.peer_verification was replaced with auth_oauth2.https.verify for consistency with other equivalent keys 2025-09-06 13:52:17 -04:00
Michael Klishin b83433cc06
OAuth 2 plugin: typos, minor edits of rabbitmq.conf schema 2025-09-06 13:50:46 -04:00
Michael Klishin fa954e0a53
rabbitmq.conf.example: add most commonly used OAuth 2-related keys 2025-09-06 13:47:34 -04:00
Michael Klishin 3bcc96f045
rabbitmq.conf.example: mention a new doc guide, https://www.rabbitmq.com/docs/stream-connections 2025-09-05 18:55:15 -04:00
Luke Bakken 3280bed8ac
Additional JSON CLI formatter fix (#14511)
A list of binaries was incorrectly converted by
`unicode:characters_to_binary` into one big binary. Add a function head
to match this case.

Also, add tests for the values that were not correctly formatted prior
to #14101 and #14381
2025-09-05 12:29:29 -07:00
David Ansari 41337bbb1d
Merge pull request #14507 from rabbitmq/fix-direct-reply-to-regression
Speed up Direct Reply-To
2025-09-05 09:58:05 +02:00
Michael Klishin b64d98edce
Edit, expand, reformat rabbitmq.conf.example 2025-09-04 23:31:31 -04:00
David Ansari 9f2ff6c150 Speed up Direct Reply-To
Speed up Direct Reply-To in AMQP 0.9.1 because prior to this PR sending each RPC reply
was bottlenecked by the slowest network link between the RabbitMQ node the responder
connected to and all other RabbitMQ nodes. This regression was introduced in RabbitMQ 3.12.0
via d65637190a
2025-09-04 18:27:52 +02:00
Arnaud Cogoluègnes 67ac485e74
Use base64 encoding for random binary in test
The random binary contains characters that can make an authentication
test fail. Encoding it in base64 fixes the problem.
2025-09-04 09:35:12 +00:00
Michael Klishin bd7450342e
Merge pull request #14458 from rabbitmq/qq-policy-repair-fix
QQ: exclude delivery_limit from policy repair comparison.
2025-09-03 11:07:48 -04:00
Michael Klishin 0f6b1dbae0
Merge pull request #14493 from rabbitmq/md/fifo-overview-smallest-index-detail
rabbit_fifo: Expose each smallest raft index in `overview/1`
2025-09-03 11:03:07 -04:00
Michael Klishin 913d91ac24
Merge pull request #14499 from rabbitmq/loic-remove-ctspec
make: Remove the parallel-ct target
2025-09-03 11:02:39 -04:00
Loïc Hoguin 862368471e
make: Remove the parallel-ct target
The parallel-ct-set* targets are enough for both CI and local
usage, so it's better to avoid duplicating things.
2025-09-03 11:50:52 +02:00
Jean-Sébastien Pédron 76aa1e6a29
Merge pull request #14497 from rabbitmq/ct-khepri
Use Khepri by default in CT tests
2025-09-03 10:58:54 +02:00
David Ansari 96d31ecb3c Use Khepri by default in CT tests
When starting a new cluster, Khepri is the default metadata store in 4.2.
Let's also make Khepri the default metadata store in CT tests.
2025-09-03 10:23:51 +02:00
Michael Davis 7f36b015ea
rabbit_fifo: Expose each smallest raft index in `overview/1`
This is meant to be used as a debugging tool via an eval command. It can
be hard to tell from the outside why a QQ is not snapshotting. Looking
at the `overview/1` is a nice debugging tool. The `smallest_raft_index`
key (and other keys like the `release_cursors`) points out why a
snapshot isn't being taken. The `smallest_raft_index` is the minimum of
three criteria though:

* oldest ready message
* oldest checked out message
* oldest message in the dlx state

This change adds all of those indexes so that it is clear which criteria
is keeping the `smallest_raft_index` down.
2025-09-02 14:23:55 -04:00
Michael Klishin 522d8fd4d8
Merge pull request #14488 from rabbitmq/local-shovels-confirm-on-autodelete
Local shovels: send confirms and rejections before autodelete
2025-09-02 12:00:23 -04:00
David Ansari 60c6cfce96
Merge pull request #14489 from rabbitmq/amqp_filtex
Delete amqp_filtex_SUITE from ct.test.spec
2025-09-02 17:17:40 +02:00
Diana Parra Corbacho 0eb5046094 Local shovels: send confirms and rejections before autodelete 2025-09-02 16:49:09 +02:00
David Ansari 917035e50d Delete amqp_filtex_SUITE from ct.test.spec
This test suite doesn't exist anymore.
2025-09-02 16:39:52 +02:00
Michael Klishin c502519370
Merge pull request #14450 from rabbitmq/local-shovels-fix-ack-nacks
Local shovels: fix handling of acks/nacks
2025-09-02 10:12:04 -04:00
Diana Parra Corbacho 41d52835bf Local shovels: fix handling of acks/nacks from multiple queues 2025-09-02 12:09:58 +02:00
Diana Parra Corbacho 8a116500e0 Local shovels: generate multiple ack/nack as the channel does
Avoids overflowing source queue with individual ack/nacks
2025-09-02 12:09:17 +02:00
Diana Parra Corbacho 6e2e19591a Local shovels: fix handling of acks/nacks 2025-09-02 12:09:17 +02:00
D Corbacho 7f1febe70b
Local shovels: exclude tests in mixed-versions with 3.13.x (#14482)
The test suites need to be excluded at group level, so the end_per_suite
is always executed and the cluster stopped. Otherwise, clusters
remain running in CI and the following suites find the TCP ports busy.
2025-09-02 10:56:56 +02:00
David Ansari 8cfcd7972b
Merge pull request #14477 from rabbitmq/bump-emqtt
Bump emqtt to v1.14.6
2025-09-02 10:03:49 +02:00
Michael Klishin c791e518e1
Tweak mergify.yml for 4.2.x 2025-09-02 03:48:15 -04:00
Michael Klishin 232d96840a
Merge pull request #14480 from rabbitmq/mk-rabbitmq-shovel-prometheus-should-handle-single-atom-shovel-states
rabbitmq_shovel_prometheus: handle single atom shovel states
2025-09-02 03:04:52 -04:00
David Ansari bb7ead235e Fix test case block_connack_timeout
The new client library version returns reason
`{shutdown, connack_timeout}` in the monitor message.

Delete the monitor since the test case already asserts on the
`{error, connack_timeout}` return value from emqtt:connect/1.
2025-09-02 08:36:06 +02:00
David Ansari bfa8f72033 Bump emqtt to v1.14.6 2025-09-02 08:36:06 +02:00
Michael Klishin 323ce94fd8
rabbitmq_shovel_prometheus: handle single atom shovel states
Namely, 'starting'.

Previously, a Prometheus scraping endpoint hit
just at the right moment (when a shovel was
in the 'starting' state) would produce
a function_clause exception.
2025-09-02 01:55:23 -04:00
Michael Klishin 9853bdae7f
Merge pull request #14478 from rabbitmq/mk-test-mergify-backports-to-v4.2.x
rabbitmq.conf.example: cosmetics
2025-09-01 12:27:16 -04:00
Michael Klishin fa98e459fc
rabbitmq.conf.example: cosmetics 2025-09-01 12:26:25 -04:00
Michael Klishin 0bc0b6171e
mergify.yml: updates for the v4.2.x era 2025-09-01 12:18:49 -04:00
Michal Kuratczyk 1b4cff21b3
Skip local shovel tests when mixed with 3.13 (#14475) 2025-09-01 15:50:44 +02:00
David Ansari def157a105
Merge pull request #14438 from rabbitmq/stream-queue-leader-fix
Fix issue where leader is not returned after stream declaration
2025-09-01 15:32:22 +02:00
D Corbacho 0977ad2dde
Local shovels: skip tests in mixed-version (#14473)
Local shovels require rabbitmq_4_0_0 feature flag, so it can't run
in mixed-version clusters with 3.13.x
2025-09-01 13:25:51 +02:00
Michael Klishin 07ad94b269
Merge pull request #14468 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-175bfe7e4a
[skip ci] Bump org.apache.qpid:qpid-jms-client from 2.7.0 to 2.8.0 in /deps/rabbit/test/amqp_jms_SUITE_data in the dev-deps group across 1 directory
2025-08-30 14:20:34 -04:00
dependabot[bot] 225e3617d9
[skip ci] Bump org.apache.qpid:qpid-jms-client
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: org.apache.qpid:qpid-jms-client.


Updates `org.apache.qpid:qpid-jms-client` from 2.7.0 to 2.8.0

---
updated-dependencies:
- dependency-name: org.apache.qpid:qpid-jms-client
  dependency-version: 2.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-30 18:02:44 +00:00
Michael Klishin 317b12f6fb
Merge pull request #14465 from rabbitmq/mk-rearrange-shovel-test-suites
Re-arrange shovel test suites
2025-08-29 22:21:26 -04:00
Michael Klishin 30fb9c1128
Re-arrange shovel test suites
* Use more descriptive names
 * Prefix unit test suites accordingly
 * Reuse await_credit/1
 * await_credit/1 in a flakey test
2025-08-29 18:34:51 -04:00
Michael Klishin f25d871d23
Merge pull request #14460 from rabbitmq/dependabot/github_actions/main/google-github-actions/auth-3.0.0
Bump google-github-actions/auth from 2.1.12 to 3.0.0
2025-08-29 15:52:34 -04:00
Michael Klishin 672b76dd1c
Merge pull request #14459 from rabbitmq/mk-bump-erlang-mk
Bump erlang.mk with 'gmake erlang-mk'
2025-08-29 15:51:06 -04:00
dependabot[bot] 275c62d46c
Bump google-github-actions/auth from 2.1.12 to 3.0.0
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.12 to 3.0.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.12...v3.0.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-29 18:03:26 +00:00
Michael Klishin 36674f1129
Bump erlang.mk with 'gmake erlang-mk' 2025-08-29 12:44:38 -04:00
Karl Nilsson 4d7a3fed1e QQ: exclude delivery_limit from policy repair comparison.
As it cannot be updated as part of a policy when it is disabled (-1)
 it needs to be excluded from comparison
2025-08-29 09:49:07 +01:00
Michael Klishin 676698a233
Merge pull request #14454 from rabbitmq/md/first-time-ff-log-levels
rabbit_ff_controller: Raise log levels of first-time boot messages
2025-08-28 20:24:02 -04:00
Michael Davis 9414209d67
rabbit_ff_controller: Raise log levels of first-time boot messages
These lines can be very useful for determining why a subset of feature
flags is/isn't being enabled on boot. They're currently at debug level.
However a first-time boot of an unclustered node is a rare event, so
these lines shouldn't be noisy.
2025-08-28 20:03:37 -04:00
Michael Klishin 3b8c590189
4.2.0 release notes cosmetics 2025-08-28 19:08:32 -04:00
Michael Klishin bbe25c0d40
Merge pull request #14444 from lukebakken/lukebakken/fix-package-build
Ensure that file modified time is set correctly
2025-08-28 19:05:27 -04:00
Luke Bakken 993322f6d7
Ensure that file modified time is set correctly
Commit e435bc6886 introduced behavior in
creating the source-dist archive that sets the file modification time to
the same time as the most recent `git` commit. This facilitates
reproducible builds, but it also has an issue. The code sets `TZ=`,
which means that on systems running in time zones which aren't UTC, the
modification time may be in the future (or past). It depends on the
system's behavior.

Up until recently, this only resulted in GNU make printing warnings
about modification times being in the future. However, with recent
changes in how escripts are built, this results in an "infinite make
loop" that is described in https://github.com/rabbitmq/rabbitmq-server/discussions/14440
and https://github.com/rabbitmq/rabbitmq-server/discussions/14443

This solution is to set the `TZ=UTC` when calculating the time of the
most recent `git` commit, as well as when using `touch -t` to set the
file modification times.

Fixes #14440, #14443
2025-08-28 13:37:12 -07:00
Michael Klishin 5fb6ca6c39
Merge pull request #14449 from rabbitmq/fix-ci-oci-in-pr
Fix in OCI trigger for PRs
2025-08-28 16:08:21 -04:00
Michael Klishin 9d7ee9639f
Merge pull request #14448 from rabbitmq/test-feature-flags-in-management-ui-in-main
New Selenium suite for testing feature flags in management UI
2025-08-28 10:24:44 -04:00
Michael Klishin f754ddde52
Merge pull request #14451 from cloudamqp/docs_unresp_timeout
Fix docs: list_unresponsive_queues queue-timeout is in seconds
2025-08-28 10:17:09 -04:00
Péter Gömöri bfa38d00b0 Fix docs: list_unresponsive_queues queue-timeout is in seconds
The unit was changed in commit 829a918c
2025-08-28 14:06:05 +02:00
Aitor Perez 771874ca6c
Fix OCI trigger in PR
The output is of type bool, and the comparison was checking for string
'true'. In JS 'true' is not equal true (bool) 🤷
2025-08-28 11:03:17 +01:00
Marcial Rosales 4aa666e08a Take into account experimental ff 2025-08-28 11:40:22 +02:00
Marcial Rosales fbd83663e3 Check that since 4.2 onwards khepri_db is enabled 2025-08-28 11:03:31 +02:00
Marcial Rosales a809c3000e Test feature flags in management ui with selenium 2025-08-28 11:02:06 +02:00
Marcial Rosales 4bc4a9ec47 Test feature flags 2025-08-28 10:51:09 +02:00
Michael Klishin 5a19efee89
Bump next 4.2.0 preview to beta.3 2025-08-27 20:51:09 -04:00
Michael Klishin 1af8fe25eb
4.2.0 release notes updates 2025-08-27 20:48:32 -04:00
Michael Klishin 7e0627de71
4.1.4 release notes cosmetics 2025-08-27 20:33:45 -04:00
Michael Klishin 53a129bbdd
Release notes cosmetics 2025-08-27 20:33:33 -04:00
Michael Klishin a937c326f3
4.2.0 release notes updates for beta.2 2025-08-27 20:28:57 -04:00
Michael Klishin b99aca71fe
A 4.1.4 release notes update 2025-08-27 20:28:05 -04:00
Michael Klishin 8a4604a83f
4.1.4 release notes 2025-08-27 20:08:36 -04:00
Michael Klishin 88ea37b290
Shovel: use a constant for the runtime parameter component 2025-08-27 17:26:07 -04:00
David Ansari 81caabc85e
Merge pull request #14389 from rabbitmq/refuse-link
Detach link for link-level errors
2025-08-27 17:29:02 +02:00
Karl Nilsson e5891e24de Fix issue where leader is not returned after stream declaration
This would affect the meta data that is returned when declaring
a queue through AMQP.
2025-08-27 14:40:08 +01:00
David Ansari eef470df37 Detach link for link-level errors
## What?
Refuse or detach the link instead of ending the session for many
link-level errors, including the following:
* Source queue or target exchange doesn't exist during attach
* Trying to consume from an exclusive queue on a different connection
* Delivery of message to a target queue fails
* Wrong delivery-id
* Wrong settled flag
* Queue declaration fails for dynamic queues
* Publishing to internal exchange

 ## Why?
Because many errors are scoped to a single terminus, detaching just that link
preserves the rest of the session’s links - avoiding needless disruption of
other traffic. AMQP 1.0’s error model is hierarchical; RabbitMQ should escalate to
ending the session only for session-level faults or if the client keeps
using a destroyed link.

 ## How?
Refuse link as per figure 2.33
2025-08-27 09:49:22 +02:00
Michael Klishin 1fc7390fc6
Merge pull request #14434 from rabbitmq/mk-extract-dyn-shovel-supervisor
Shovel status: minor refactoring
2025-08-26 19:07:34 -04:00
Michael Klishin dee15f05a1
Shovel status: minor refactoring 2025-08-26 18:43:57 -04:00
Michael Klishin ab71a39fa8
Merge pull request #14428 from rabbitmq/local-shovels-requeue
Local shovel: handle unacked messages in queue down
2025-08-26 16:52:05 -04:00
Diana Parra Corbacho 68b98bfd3b Local shovels: ack messages not routed to any queue using exchanges 2025-08-26 20:24:30 +02:00
Michael Klishin 4688150a44
rabbitmq_shovel_management tests: whitelist expected exceptions in node logs 2025-08-26 13:37:50 -04:00
Michael Klishin 34befb6fe4
Merge pull request #14431 from rabbitmq/mk-bump-ra-to-2.17.1
Bump Ra to 2.17.1
2025-08-26 13:06:03 -04:00
Michael Klishin 88692efda1
Bump Ra to 2.17.1 2025-08-26 11:57:44 -04:00
Diana Parra Corbacho 1c72316d2e Local shovels: Handle multiple rejects on node down 2025-08-26 12:22:59 +02:00
Diana Parra Corbacho 0174f59c4e Local shovel: handle unacked messages in queue down
It affects messages routed through exchanges, when there is no target
queue configured in the shovel (it could be many queues as destination or none).
2025-08-26 11:27:14 +02:00
Michael Klishin bbb9aeaf0e
rabbit_shovel_operating_mode: coerce returned value to an atom 2025-08-25 19:59:59 -04:00
Michael Klishin c68ea370d2
rabbit_shovel_status: handle binary values 2025-08-25 19:43:10 -04:00
Michael Klishin fd1415b087
Merge pull request #14427 from rabbitmq/mk-shovel-library-mode-follow-up-1
Shovel: don't start top-level sups if running in library mode
2025-08-25 17:47:35 -04:00
Michael Klishin 5de3a57af3
Shovel: don't start top-level sups if running in library mode
References #14425
2025-08-25 17:22:21 -04:00
Michael Klishin 5a1bd25150
Merge pull request #14425 from rabbitmq/mk-shovel-library-mode
Shovel: introduce operating modes
2025-08-25 14:59:34 -04:00
Michael Klishin e61eb7a45e
More logging 2025-08-25 14:41:55 -04:00
Michael Klishin dbff137e4a
Address review feedback #14425 2025-08-25 14:14:45 -04:00
Michael Klishin 3043dc621f
Shovel: introduce operating modes
Sometimes you want a plugin to act as a library
and not an application. That is, for its modules
to be available at compile time and on a running
node but, say, the actual runtime parameter
handling and supervision of shovels to be
handled by another plugin.

Since we do not currently have a concept of
"library plugins" or "library dependencies",
this approach demonstrates one example of how
some plugins can be used as libraries.
2025-08-25 13:37:49 -04:00
D Corbacho e4bc525b5e
Merge pull request #14421 from rabbitmq/local-shovel-default-user-pass
Local shovels: Set default user/pass for uris like "amqp://"
2025-08-25 12:36:47 +02:00
Diana Parra Corbacho f990f7e271 Local shovels: Set default user/pass for uris like "amqp://" 2025-08-25 11:34:57 +02:00
Michael Klishin 7be4189deb
Merge pull request #14418 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-78890361d1
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-08-23 22:44:55 -04:00
Michael Klishin 307b61f94b
Merge pull request #14415 from rabbitmq/shovel-10-delete-after
Shovel amqp1.0: fix delete after validation
2025-08-23 22:44:40 -04:00
dependabot[bot] 7a51ce7c88
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.4 to 3.5.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.4...v3.5.5)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.4 to 3.5.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.4...v3.5.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-23 18:31:14 +00:00
Diana Parra Corbacho b6d831b115 Shovel amqp1.0: fix delete after validation
Queue-length is not supported, so it should fail already during validation and
not shovel startup
2025-08-23 13:26:46 +02:00
Michael Klishin 425a9d604b
Merge pull request #14401 from rabbitmq/qq-drain-chunks
QQ: when invoking drain only shut down small batches at a time
2025-08-22 18:19:52 -04:00
Michael Klishin 42b3caa964
Cosmetics #14401 2025-08-21 19:08:31 -04:00
Karl Nilsson 87154f9b03 QQ: when invoking drain only shut down small batches at a time
Then wait for elections to complete before shutting further
members down.

This should help avoid election storms when enabling maintenance
mode.

Transfer khepri before queues to ensure meta data store is
ready to accept pid updates.

Some other state related tweaks.
2025-08-21 09:17:55 +01:00
Michael Klishin c7f6cad331
Shovel: ignore expected log exceptions in local_SUITE 2025-08-20 19:23:33 -04:00
Michael Klishin 4a2d2964af
Merge pull request #14410 from rabbitmq/set-max-open-files
Add RABBITMQ_MAX_OPEN_FILES variable to the startup script
2025-08-20 13:05:55 -04:00
Michael Klishin 0da03c901e
Merge pull request #14256 from rabbitmq/local-shovel
By @dcorbacho and me: introduce [cluster-]local shovels, adopt message containers for shovels
2025-08-20 11:26:26 -04:00
Michal Kuratczyk ad3fccf5eb
Add RABBITMQ_MAX_OPEN_FILES variable to the startup script
In some environments it may be tricky to run a command
before RabbitMQ is started. Kubernetes For example, upgrading
to Containerd 2.0 accidentally lowered the value of available
descriptors in GKE
(https://cloud.google.com/kubernetes-engine/docs/troubleshooting/known-issues#containerd-ulimit-reduced).
While this particular issue is resolved in newer GKE versions,
it was a good example of why a variable like this would be helpful.
Kubernetes-level solutions (on the node or with a daemonset) would
require a different level of access for users.
2025-08-20 15:28:54 +02:00
Jean-Sébastien Pédron 115623220c
Merge pull request #14407 from rabbitmq/fix-topic-permissions-definitions-import
rabbit_definitions: Import topic permissions after exchanges
2025-08-20 13:57:36 +02:00
Jean-Sébastien Pédron 5bcbfadcd6
rabbit_db_exchange: Relax conditions when creating an exchange with Khepri
[Why]
When the module wanted to create an exchange in Khepri, it used
`rabbit_khepri:create/2` which ensures that the tree node doesn't exist
before. If the tree node exists, it expects it to contain an exchange
record which is returned to the caller, indicating an exchange with that
name already exists.

However, there are several other resources stored under an exchange tree
node, like bindings and topic permissions.

In particular, during a definitions import, topic permissions used to be
imported before exchanges. This caused a crash because the write of the
topic permission automatically created a parent tree node for the
exchange it dpends on, but without an exchange record obviously (see
previous commit).

[How]
As an addition improvement to the previous commit, we change the
conditions: instead of matching on the fact the tree node doesn't exist,
the module also accepts that the tree node exists but has no payload.
Under any of these conditions, the exchange is considered to be new and
written to Khepri.
2025-08-20 12:05:59 +02:00
Jean-Sébastien Pédron 92c572e887
rabbit_definitions: Import topic permissions after exchanges
[Why]
Topic permissions depend on an exchange, in addition to a user and a
vhost like other permissions.

This fixes a bug where an exchange imported after a topic permission
that depends on it caused the following crash when Khepri is used:

    {case_clause,{error,{khepri,mismatching_node,
                                #{node_name => <<"exchange_name">>,
                                  node_props => #{payload_version => 1},
                                  node_path =>
                                      [rabbitmq,vhosts,<<"/">>,exchanges,
                                       <<"exchange_name">>],
                                  condition => {if_node_exists,false},
                                  node_is_target => true}}}}

The crash comes from the fact that the exchange code expect to either
create the tree node in Khepri for that exchange, or there is an
existing tree node holding an exchange tree node. Here, there was a tree
node created implicitly when the topic permission was stored, but that
tree node didn't have an exchange record (because the exchange was not
imported yet).

[How]
We simply swap the import of topic permissions and exchanges.
2025-08-20 11:52:38 +02:00
Michael Klishin b76e634e07
Merge pull request #14402 from rabbitmq/stream-close-connection-if-update-secret-fails
Close stream connection if secret update fails
2025-08-19 14:57:00 -04:00
Michael Klishin c77751e620
Merge pull request #14403 from rabbitmq/stream-close-connection-if-unauthorized-vhost-after-secret-update
Close stream connection if unauthorized vhost after secret update
2025-08-19 14:56:15 -04:00
Michael Klishin 173876c982
More log message edits #14403 2025-08-19 14:06:15 -04:00
Michael Klishin a9f7bf1fbc
Log virtual host name if updated token lacks the permissions for it #14403 2025-08-19 14:05:31 -04:00
Michael Klishin e7634679d1
More log message edits #14403 2025-08-19 13:58:47 -04:00
Michael Klishin 55d6419bcd
More log message edits #14403 2025-08-19 13:44:50 -04:00
Michael Klishin 147dfb0e70
Log message wording #14402
(cherry picked from commit 987f5519e6)
2025-08-19 13:17:36 -04:00
Michael Klishin 987f5519e6
Log message wording #14402 2025-08-19 13:09:57 -04:00
Arnaud Cogoluègnes ba8745ab4b
Close stream connection if vhost not authorized after secret update 2025-08-19 16:47:47 +02:00
Michael Klishin ce8fa317cf
Merge branch 'main' into local-shovel
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
2025-08-19 10:44:39 -04:00
Arnaud Cogoluègnes 02449bd5d3
Close stream connection if secret update fails 2025-08-19 14:58:04 +02:00
Diana Parra Corbacho 212ae64c2d Local shovels: place behind rabbitmq_4.0.0 feature flag 2025-08-19 11:52:08 +02:00
Michael Klishin 4d60fc4ab7
Merge pull request #14399 from rabbitmq/mk-configure-metadata-store-and-feature-flag-relative-operations
Make rabbit_ct_broker_helpers:configure_metadata_store/1 handle relative feature flag op lists
2025-08-18 21:07:50 -04:00
Michael Klishin 03b28891d5
Make rabbit_ct_broker_helpers:configure_metadata_store/1 handle relative feature flag op lists
The function relies on such a relative list itself but
does not assume that a test suite could use it.
2025-08-18 20:33:16 -04:00
Michael Klishin 1d9c156829
rabbit.forced_feature_flags_on_init: document relative operations
{rel, ListToAdd, ListToSkip} values can be particularly
useful in certain suits.
2025-08-18 19:04:32 -04:00
Michael Klishin a1a49ff447
Doc cosmetics: mnevis => khepri_db 2025-08-18 19:00:13 -04:00
Michael Klishin d475a0e95f
Rename a Shovel key to 'shovel.local.max_credit' 2025-08-18 11:42:00 -04:00
Diana Parra Corbacho 4452872042 Local shovels: Update default credit 2025-08-18 16:50:31 +02:00
Diana Parra Corbacho a419ab3708 Shovels: re-order confirmation and unacked update 2025-08-18 16:40:03 +02:00
Michael Klishin 268a16cb68
Merge pull request #14393 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-32feef746b
[skip ci] bump the dev-deps group across 1 directory with 2 updates
2025-08-17 13:47:25 -04:00
dependabot[bot] 3665ee3a03
[skip ci] bump the dev-deps group across 1 directory with 2 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.


Updates `org.jetbrains.kotlin:kotlin-test` from 2.2.0 to 2.2.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.2.0...v2.2.10)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.2.0 to 2.2.10

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-16 18:08:59 +00:00
Michael Klishin 43f38ce546
rabbitmq_shovel.schema: remove an outdated link 2025-08-15 11:49:37 -04:00
Diana Parra Corbacho 6bb649a9df Local shovels: single acks
For some reason, multiple acknowledgments are really slow when using credit flow v2
2025-08-14 15:40:40 +02:00
Jean-Sébastien Pédron e3298812c9
Merge pull request #14384 from rabbitmq/test-issue-12934
clustering_recovery_SUITE: Add `recover_after_partition_with_leader` testcase
2025-08-14 14:24:01 +02:00
Diana Parra Corbacho 382fac3e34 Local shovels: remove stashed credit request 2025-08-14 12:39:26 +02:00
Jean-Sébastien Pédron 4f1c6f0bde
clustering_recovery_SUITE: Add `recover_after_partition_with_leader` testcase
[Why]
The testcase tries to replicate the steps described in issue #12934.

[How]
It uses intermediate Erlang nodes between the common_test control node
and the RabbitMQ nodes, using `peer` standard_io communication. The goal
is to make sure the common_test control node doesn't interfere with the
nodes the RabbitMQ nodes can see, despite the blocking of the Erlang
distribution connection.

So far, I couldn't reproduce the problem reported in #12934. @mkuratczyk
couldn't either, so it might have been fixed as a side effect of another
change...

References #12934.
2025-08-14 12:10:52 +02:00
Michael Klishin 0da2ee8e71
Merge pull request #14381 from lukebakken/lukebakken/pr-14118-followup
Do not "pre convert" `running_nodes` to strings
2025-08-13 15:49:15 -04:00
Luke Bakken 3e235a6316
Do not "pre convert" `running_nodes` to strings
Follow-up to #14118
2025-08-13 12:01:18 -07:00
Diana Parra Corbacho 3349321c58 Local shovels: fix credit flow 2025-08-13 19:30:19 +02:00
Diana Parra Corbacho 02fcbc0dc5 Local shovels: optimisation 2025-08-13 14:13:12 +02:00
Diana Parra Corbacho edf0e3c1ff Local shovel: remove unused clause 2025-08-13 13:54:52 +02:00
Diana Parra Corbacho 07a085365e Local shovels: optimisations 2025-08-13 12:59:40 +02:00
Diana Parra Corbacho e9d767b84b Local shovels: fix credit flow 2025-08-13 12:19:36 +02:00
Diana Parra Corbacho 0b1aefd4ae Local shovels: move unacked_message_q inside source config 2025-08-13 11:49:44 +02:00
David Ansari b6dcca0ccb
Merge pull request #14326 from lukebakken/lukebakken/make-deterministic-optional-again
Use `YRL_ERLC_OPTS` instead of `ERL_COMPILER_OPTIONS`
2025-08-13 09:16:10 +02:00
Michael Klishin 0c35f0fec3
Workflows: bump expected IBM MQ tag to 9.4.0.12 2025-08-12 20:31:14 -04:00
Michael Klishin be05f9d8b8
Merge pull request #14377 from rabbitmq/dependabot/github_actions/main/actions/checkout-5
build(deps): bump actions/checkout from 4 to 5
2025-08-12 20:00:17 -04:00
dependabot[bot] 8c53b69b1a
build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 23:05:28 +00:00
Luke Bakken a87445cda6 Use `YRL_ERLC_OPTS` instead of `ERL_COMPILER_OPTIONS`
This is a follow-up to commit 93db480bc4

`erlang.mk` supports the `YRL_ERLC_OPTS` variable to set `erlc`-specific
compiler options when processing `.yrl` and `.xrl` files. By using this
variable, it allows `make RMQ_ERLC_OPTS=` to disable the
`+deterministic` option. This allows using `c()` in the erl shell to
recompile modules on the fly when a cluster is running.

You can see that, when `make RMQ_ERLC_OPTS=` is run, these generated
files were produced with the `+deterministic` option, because their
`-file` directives use only basenames.

* `deps/rabbit/src/rabbit_amqp_sql_lexer.erl`
* `deps/rabbit/src/rabbit_amqp_sql_parser.erl`

```
-file("rabbit_amqp_sql_parser.yrl", 0).
-module(rabbit_amqp_sql_parser).
-file("rabbit_amqp_sql_parser.erl", 3).
-export([parse/1, parse_and_scan/1, format_error/1]).
-file("rabbit_amqp_sql_parser.yrl", 122).
```

This commit also ignores those two files, as they will always be
auto-generated.
2025-08-12 12:00:54 -07:00
Michael Klishin 64e5a6a7e5
Merge pull request #14373 from rabbitmq/mk-reduce-rabbitmq-plugins-log-rate
Do not log every transient (or Erlang/OTP-provided) dependency when listing plugins
2025-08-12 15:00:42 -04:00
Michael Klishin cf3fd1e7c7
Merge pull request #14359 from rabbitmq/verify-auth-plugin-is-enabled
rabbit_access_control: Check configured auth backends are enabled at boot time
2025-08-12 14:38:51 -04:00
Jean-Sébastien Pédron 23588b665a
rabbit_access_control: Check configured auth backends are enabled at boot time
[Why]
If a user configures an auth backend module, but doesn't enabled the
plugin that provides it, it will get a crash and a stacktrace when
authentication is performed. The error is not helpful to understand what
the problem is.

[How]
We add a boot step that go through the configured auth backends and
query the core of RabbitMQ and the plugins. If an auth backend is
provided by a plugin, the plugin must be enabled to consider the auth
backend to be valid.

In the end, at least one auth backend must be valid, otherwise the boot
is aborted.

If only some of the configured auth backends were filtered out, but
there are still some valid auth backends, we store the filtered list in
the application environment variable so that
authentication/authorization doesn't try to use them later.

We also report invalid auth backends in the logs:

* Info message for a single invalid auth backend:

    [info] <0.213.0> The `rabbit_auth_backend_ldap` auth backend module is configured. However, the `rabbitmq_auth_backend_ldap` plugin must be enabled in order to use this auth backend. Until then it will be skipped during authentication/authorization

* Warning message when some auth backends were filtered out:

    [warning] <0.213.0> Some configured backends were dropped because their corresponding plugins are disabled. Please look at the info messages above to learn which plugin(s) should be enabled. Here is the list of auth backends kept after filering:
    [warning] <0.213.0> [rabbit_auth_backend_internal]

* Error message when no auth backends are valid:

    [error] <0.213.0> None of the configured auth backends are usable because their corresponding plugins were not enabled. Please look at the info messages above to learn which plugin(s) should be enabled.

V2: In fact, `rabbit_plugins:is_enabled/1` indicates if a plugin is
    running, not if it is enabled... The new check runs as a boot step
    and thus is executed before plugins are started. Therefore we can't
    use this API. Instead, we use `rabbit_plugins:enabled_plugins/0'
    which lists explicitly enabled plugins. The drawback is that in the
    auth backend is enabled implicitly because it is a dependency of
    another explicitly enabled plugin, the check will still consider it
    is disabled and thus abort the boot.

Fixes #13783.
2025-08-12 18:38:28 +02:00
Jean-Sébastien Pédron a8bef770a5
rabbit_plugins: Add `which_plugin/1` to query which plugin provides a module
[Why]
This will be used in a later commit to find the auth backend plugin that
provides a configured auth backend module.

[How]
We go through the list of available plugins, regardless if they are
enabled or not, then look up the given module in the list of modules
associated with each plugin's application.
2025-08-12 18:38:28 +02:00
Jean-Sébastien Pédron 6d3d297598
rabbit_plugins: Add `list/0` to get the list of plugins
... without having to pass a plugins path.

[Why]
It's painful to have to get the plugins path, then pass it to `list/1`
every time. It's also more difficult to discover how to use
`rabbit_plugins` to get that list of plugins.
2025-08-12 18:38:28 +02:00
Michael Klishin 87c6615ba6
Update SERVER_RELEASES.md 2025-08-12 12:14:07 -04:00
Michael Klishin 97a3df5f29
Update PKG_WINDOWS.md 2025-08-12 12:13:39 -04:00
Michael Klishin 9ae9477010
Update PKG_LINUX.md 2025-08-12 12:12:46 -04:00
Michael Klishin 30d78a490b
Do not log every transient dependency when listing plugins
The code path in question is executed every time
rabbit_plugins:list/2 (e.g. rabbit_plugins:is_enabled/1)
is used, which with some distributed plugins can
happen once or several times a minute.

Given the maturity of the plugins subsystem, we
arguably can drop those messages.
2025-08-12 12:05:48 -04:00
Michal Kuratczyk c34c803754
Remove flake in prometheus_http_SUITE (#14367)
Sometimes the metrics for streams created by `stream_pub_sub_metrics`
would be returned when the next test starts, breaking the assertions.
2025-08-12 15:03:20 +02:00
Diana Parra Corbacho 8c9f79fb36 Shovel management: add local shovels 2025-08-11 21:37:05 +02:00
Diana Parra Corbacho bb5e1d95d9 Local shovels: handle credit on sender side 2025-08-11 21:37:05 +02:00
Diana Parra Corbacho 78167f0fb7 Local shovel: more tests 2025-08-11 21:37:05 +02:00
Michael Klishin 414da5d146 local_dynamic_SUITE: ignore two expected crash reports in the logs 2025-08-11 21:37:05 +02:00
Diana Parra Corbacho be061cd54b Local shovel: fix credit handling order 2025-08-11 21:37:05 +02:00
Diana Parra Corbacho a0d42ea31d Local shovels: remove unused prefetch count 2025-08-11 21:37:05 +02:00
Diana Parra Corbacho a855146b99 Local shovel: handle destination queue events 2025-08-11 21:37:05 +02:00
Michael Klishin 30f67e0f7a local_dynamic_SUITE: await credit for publishing links
This elimiantes a race condition between the destination
granting the sender link credit and the rest of what
the test does.

Note: the amqp_utils module in server core cannot be easily
moved to, say, rabbit_ct_helpers because it combines
two kinds of helpers that belong to two of our
CT helper subprojects.

So we've copied two small functions from it for
the needs of this suite.
2025-08-11 21:37:05 +02:00
Diana Parra Corbacho b5a2dac758 Local shovels: grant credit after confirming 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 2e2dc4b2dd Shovel tests: ignore nodename
CI uses a different hostname
2025-08-11 21:37:04 +02:00
Diana Parra Corbacho ae6a36a7b2 Local shovels: remove unused parameter
Fixes a dialyzer failure
2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 085c0ccc70 Local shovels: remove rabbit_log and switch to LOG_ macros 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho c3ec85fafb Local shovel: finish credit flow handling
This implementation intentionally ignores the
drain property of AMQP 1.0 flow control because
local shovels does not use this feature, and no
external component can "enable" it, so we can
simply ignore it.

Pair: @dcorbacho.

Co-authored-by: Diana Parra Corbacho <diana.parra-corbacho@broadcom.com>
Co-authored-by: Michael Klishin <michaelklishin@icloud.com>
2025-08-11 21:37:04 +02:00
Diana Parra Corbacho f381993db0 Local shovels: renew credit 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho a112aa5214 Local shovels: set link credit 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 860eb6c499 Local shovel: fix initial delivery count and state handling 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho c8127ea3ab Local shovel: Initialise delivery count for credit 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho acbd4b465b Local shovel: use queue name to filter source/dest messages 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 6fce51ddff WIP 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 444b5644b2 Local shovels 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho c8840785d9 AMQP10 shovel: make bare message inmutable 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho ccd3bde810 amqp10_msg: type spec & code refactor 2025-08-11 21:37:04 +02:00
Diana Parra Corbacho 6e6a33ec0b Shovel: use message containers 2025-08-11 21:37:03 +02:00
Michael Klishin 5f69116a64
Merge pull request #14364 from rabbitmq/mk-bump-cuttlefish
Cuttlefish 3.5.0
2025-08-11 14:15:13 -04:00
Michael Klishin 41c25cfa04
Merge pull request #14360 from rabbitmq/fix-amqp10
Shovel: AMQP1.0 use prefetch-count as credit on delete-after
2025-08-11 13:54:52 -04:00
Michael Klishin 7413511195
Cuttlefish 3.5.0
This version forces prefixed binaries
(such as encrypted:TkQbjiVWtUJw3Ed/hkJ5JIsFIyhruKII6uKPXogfvDyMXGH1qQK3hVqshFolLN0S)
to have alphanumeric prefixes ([a-zA-Z0-9_]+).

This allows us to tell a generated password value
with a colon from an tagged binary.

If a value of, say, default_pass or ssl_options.password
cannot be parsed as a tagged value, it will be
parsed as a regular binary, because rabbit.schema
specifies multiple types as supported.

References #14233.
2025-08-11 13:25:36 -04:00
Michael Klishin 2024a4bc77
Merge pull request #14348 from udeeksha30-netizen/local_random_exchange
Add config option for enabling local_random_exchange
2025-08-11 13:23:56 -04:00
David Ansari 2f49f9da08
Permit amqp_filter_set_bug by default (#14361)
This partially reverts
https://github.com/rabbitmq/rabbitmq-server/pull/14245.
This makes 4.2 <-> 3.13 mixed version tests succeed.
We can set this flag to `denied_by_default` in 4.3.
2025-08-11 19:09:56 +02:00
udeeksha30-netizen 781c14035e Addressed requested changes 2025-08-11 09:51:20 -07:00
Diana Parra Corbacho fa66b4eb4c Shovel: AMQP1.0 use prefetch-count as credit on delete-after 2025-08-11 18:32:11 +02:00
udeeksha30-netizen 93cffe72e0 Removed extra comments 2025-08-11 08:12:33 -07:00
udeeksha30-netizen 2afbc5eeb6 Add config option for enabling local_random_exchange 2025-08-11 07:47:08 -07:00
Deeksha 8a323b1888 Add config option for enabling local_random_exchange 2025-08-11 07:41:09 -07:00
Michal Kuratczyk 87099e8eea
[skip ci] Add module name to the FF debug log (#14357)
Without this change, the logs looked confusing:
```
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 23 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 1 feature flags (including deprecated features)
[debug] <0.217.0> Feature flags: application `rabbit` has 2 feature flags (including deprecated features)
```

it wasn't clear why the same app was queried multiple times with different results.
2025-08-11 13:36:52 +02:00
Jean-Sébastien Pédron aad715aeb7
Merge pull request #14356 from rabbitmq/move-rabbit_auth-modules-to-rabbit
Move `rabbit_auth*` from rabbit_common to rabbit
2025-08-11 10:22:32 +02:00
Jean-Sébastien Pédron 18b8f9a02d
Move `rabbit_auth*` from rabbit_common to rabbit
[Why]
These modules are not used by amqp_client. Therefore, they shouldn't be
in rabbit_common.
2025-08-11 09:31:40 +02:00
Michael Klishin 485f2f6748
Merge pull request #14354 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-fbdfa57068
[skip ci] Bump the dev-deps group across 4 directories with 1 update
2025-08-09 17:33:35 -04:00
dependabot[bot] 8f0ecb9059
[skip ci] Bump the dev-deps group across 4 directories with 1 update
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.assertj:assertj-core](https://github.com/assertj/assertj).


Updates `org.assertj:assertj-core` from 3.27.3 to 3.27.4
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.3...assertj-build-3.27.4)

Updates `org.assertj:assertj-core` from 3.27.3 to 3.27.4
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.3...assertj-build-3.27.4)

Updates `org.assertj:assertj-core` from 3.27.3 to 3.27.4
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.3...assertj-build-3.27.4)

Updates `org.assertj:assertj-core` from 3.27.3 to 3.27.4
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.3...assertj-build-3.27.4)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-09 18:28:24 +00:00
Deeksha febcdbb1b8 Add config option for enabling local_random_exchange 2025-08-08 10:33:11 -07:00
David Ansari edfd8ffede Assert confirm when responder publishes to reply queue 2025-08-08 16:43:09 +02:00
Arnaud Cogoluègnes eaa4adb60f
Merge pull request #14344 from rabbitmq/stream-use-advertised-tls-host-in-metadata
Use advertised TLS host setting in metadata frame
2025-08-08 13:01:05 +00:00
Arnaud Cogoluègnes 22a959331b
Use advertised TLS host setting in metadata frame
The rabbitmq_stream.advertised_tls_host setting is not used in the
metadata frame of the stream protocol, even if it is set. This commit
makes sure the setting is used if set.

References rabbitmq/rabbitmq-stream-java-client#803
2025-08-08 12:33:52 +00:00
Jean-Sébastien Pédron 28839628f5
Merge pull request #14310 from rabbitmq/fix-test-flakes-2025Q2
Collection of test fixes (2025Q2, batch 2)
2025-08-08 10:56:22 +02:00
Jean-Sébastien Pédron 0a5024b47e
python_SUITE: Add more debug messages 2025-08-08 10:12:59 +02:00
Jean-Sébastien Pédron 5bfb7bc26f
python_SUITE: Increase unittest verbosity
[Why]
I noticed the following error in a test case:

    error sending frame
    Traceback (most recent call last):
      File "/home/runner/work/rabbitmq-server/rabbitmq-server/deps/rabbitmq_stomp/test/python_SUITE_data/src/deps/stomp/transport.py", line 623, in send
        self.socket.sendall(encoded_frame)
    OSError: [Errno 9] Bad file descriptor

When the test suite succeeds, this error is not present. When it failed,
it was present. But I checked only one instance of each, it's not enough
to draw any conclusion about the relationship between this error and the
failing test case later.

I have no idea which test case hits this error, so increase the
verbosity, in the hope we see the name of the test case running at the
time of this error.
2025-08-08 10:12:59 +02:00
Jean-Sébastien Pédron 766ca19ad0
python_SUITE: Wait for the AMQP connection to close in `x_queue_name.py`
[Why]
I still don't know what causes the transient failures in this testsuite.
The AMQP connection is closed asynchronously, therefore the next test
case is running when it finishes to close. I have no idea if it causes
troubles, but it makes the broker logs more difficult to read.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 350bda1081
python_SUITE: Bump Python dependencies to their latest versions 2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 5f520b8820
python_SUITE: Increase a timeout in `test_exchange_dest` and `test_topic_dest`
[Why]
The `test_topic_dest` test case fails from time to time in CI. I don't
know why as there are no errors logged anywhere. Let's assume it's a
timeout a bit too short.

While here, apply the same change to `test_exchange_dest`.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 0e36184a61
cluster_SUITE: Handle error returned by rabbit_ct_broker_helpers
[Why]
It didn't handle them before and crashed later when it assumed the
return value was a list.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron eb8f631e22
proxy_protocol_SUITE: Wait for connection close
[Why]
`gen_tcp:close/1` simply closes the connection and doesn't wait for the
broker to handle it. This sometimes causes the next test to fail
because, in addition to that test's new connection, there is still the
previous one's process still around waiting for the broker to notice the
close.

[How]
We now wait for the connection to be closed at the end of a test case,
and wait for the connection list to have a single element when we want
to query the connnection name.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 0601ef4f0f
jwks_SUITE: Wait for connection exit in `test_failed_token_refresh_case2`
[Why]
The connection is about to be killed at the end of the test case. It's
not necessary to close it explicitly.

Moreover, on a slow environment like CI, the connection process might
have already exited when the test case tries to close it. In this case,
it fails with a `noproc` exception.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 02b1561556
auth_SUITE: Wait for connection tracking to be up-to-date
... when testing user limits

[How]
This is the same fix as the one for the vhost limits test case made in
commit 5aab965db4.

While here, fix a compiler warning about an unused variable.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 5c1456b2d6
auth_SUITE: Handle error returned by rabbit_ct_broker_helpers
[Why]
It didn't handle them before and crashed later when it assumed the
return value was a list.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 0a643ef339
feature_flags_v2_SUITE: Catch and log return value of peer:stop/1
[Why]
It failed at least once in CI. It should help us understand what went
on.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron fda663d6d4
amqp10_inter_cluster_SUITE: Log messages and queues length
[Why]
This should also help debug the failures we get in CI.
2025-08-08 10:12:58 +02:00
Jean-Sébastien Pédron 5936b3bb95
amqp10_inter_cluster_SUITE: Use per-test shovel names
[Why]
There is a frequent failure in CI and the fact that all test cases use
the same resource names does not help with debugging.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron efdec84291
amqp10_inter_cluster_SUITE: Wait for queue length to reach expectations
[Why]
Relying on the return value of the queue deletion is fragile because the
policy is cleared asynchronously.

[How]
We now wait for the queues to reach the expected queue length, then we
delete them and ensure the length didn't change.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron bd1978ce9c
amqp_client_SUITE: Load test module on broker before using one of its anonymous functions
[Why]
Before this change, when the `idle_time_out_on_server/1` test case was runned first in the
shuffled test group, the test module was not loaded on the remote broker.
When the anonymous function was passed to meck and was executed, we got
the following crash on the broker:

    crasher:
      initial call: rabbit_heartbeat:'-heartbeater/2-fun-0-'/0
      pid: <0.704.0>
      registered_name: []
      exception error: {undef,
                           [{#Fun<amqp_client_SUITE.14.116163631>,
                             [#Port<0.45>,[recv_oct]],
                             []},
                            {rabbit_heartbeat,get_sock_stats,3,
                                [{file,"rabbit_heartbeat.erl"},{line,175}]},
                            {rabbit_heartbeat,heartbeater,3,
                                [{file,"rabbit_heartbeat.erl"},{line,155}]},
                            {proc_lib,init_p,3,
                                [{file,"proc_lib.erl"},{line,317}]},
                            {rabbit_net,getstat,[#Port<0.45>,[recv_oct]],[]}]}

This led to a failure of the test case later, when it waited for a
message from the connecrtion.

We do the same in two other test cases where this is likely to happen
too.

[How]
Loading the module first fixes the problem.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 56b59c3d3e
amqp_client_SUITE: Trim "list_connections" output in one more place
[Why]
The reason is the same as for commit
ffaf919846. It should have been part of it
in fact, so an oversight from my end.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 8bdbb0fc23
mqtt_shared_SUITE: Handle error returned by rabbit_ct_broker_helpers
[Why]
It didn't handle them before and crashed later when it assumed the
return value was a list.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 19ed2493a4
amqp_jms_SUITE: Increase time trap
[Why]
Maven took ages to fetch dependencies at least once in CI. The testsuite
failed because it reached the time trap limit.

[How]
Increase it from 2 to 5 minutes.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 73c663eb5d
rabbit_stream_partitions_SUITE: Fix incorrect log message 2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron ea2689f06a
rabbit_exchange_type_consistent_hash_SUITE: Don't enable a feature flag that never existed
[Why]
The `rabbit_consistent_hash_exchange_raft_based_metadata_store` does not
seem to be a feature flag that ever existed according to the git
history. This causes the test case to always be skipped.

[How]
Simply remove the statement that enables this ghost feature flag.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 832d701f1f
rabbit_exchange_type_consistent_hash_SUITE: Set timetrap to 5 minutes 2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 17feaa158c
rabbit_exchange_type_consistent_hash_SUITE: Open/close connection explicitly
[Why]
In CI, we observe that the channel hangs sometimes.
rabbitmq_ct_client_helpers implicit connection is quite fragile in the
sense that a test case can disturb the next one in some cases.

[How]
Let's use a dedicated connection and see if it fixes the problem.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 267445680f
rabbit_prometheus_http_SUITE: Run `stream_pub_sub_metrics` first
[Why]
I wonder if a previous test interferes with the metrics verified by this
test case. To be safer, execute it first and let's see what happens.
2025-08-08 10:12:57 +02:00
Jean-Sébastien Pédron 2bc8d117b6
rabbit_prometheus_http_SUITE: Log more details for a future failure in CI
[Why]
The `stream_pub_sub_metrics` test failed at least once in CI because the
`rabbitmq_stream_consumer_max_offset_lag` was 4 instead of the expected
3 on line 815.

I couldn't reproduce the problem so far.

[How]
The test case now logs the initial value of that metric at the beginning
of the test function. Hopefully this will give us some clue for the day
it fails again.
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron ef9f59c58e
amqp_filter_sql_SUITE: Expect to wait for credits
[Why]
In CI, we observed failures where the sender runs out of credits and
don't expect that.

[How]
The `amqp_utils:send_messages/3` function already takes care of that.
Move this logic to a `send_message/2` function and use it in
`send_messages/3` and prevriously direct uses of
`amqp10_client:send_msg/2`.
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron ed1cdb5987
per_user_connection_tracking_SUITE: Wait for the expected list of connections
[Why]
In CI, we sometimes observe two tracked connections in the return value.
I don't know yet what they are. Could it be a client that reopened its
crashed connection and because stats are updated asynchronously, we get
two tracked connections for a short period of time?
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron 53d0b14726
per_user_connection_channel_tracking_SUITE: Wait for the expected list of connections
[Why]
In CI, we sometimes observe two tracked connections in the return value.
I don't know yet what they are. Could it be a client that reopened its
crashed connection and because stats are updated asynchronously, we get
two tracked connections for a short period of time?
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron fd4c365889
rabbit_fifo_dlx_integration_SUITE: Increase a timeout in `delivery_limit/1`
[Why]
It looks to be too short in CI, causing failures from time to time.
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron 8d0f1001af
rabbitmq_cli: Create a symlink to test node's logs
[Why]
This doesn't replicate the common_test logs layout, but it will be good
enough to let our GitHub Actions workflow to upload the logs without
specific instructions in the workflow.
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron 4c8835fd5f
rabbitmq_stream_management: Tell Maven to retry when fetching deps
[Why]
In CI, it fails to fetch dependencies quite frequently, probably due to
some proxy in GitHub Actions.
2025-08-08 10:12:56 +02:00
Jean-Sébastien Pédron d154e3da9a
rabbit_vhosts: Only reconcile vhost procs on nodes running RabbitMQ
[Why]
If we use the list of reachable nodes, it includes nodes which are
currently booting. Trying to start vhost during their start can disturb
their initialization and has a great chance to fail anyway.
2025-08-08 10:12:48 +02:00
David Ansari 04815c5979 Test setting Direct Reply-To queue in CC header 2025-08-08 09:49:50 +02:00
Michael Klishin fafe3d1374
rabbit_shovel_parameters:is_internal/1: param keys are usually atoms 2025-08-07 21:56:31 -04:00
Michael Klishin 63ffa9ab07
Update 4.2.0 release notes 2025-08-07 12:25:18 -04:00
Michael Klishin ff64e2993d
Update 4.2.0 release notes 2025-08-07 12:23:43 -04:00
David Ansari 80034d91a8 Fix typo 2025-08-07 18:03:28 +02:00
Michael Klishin c0bd18a245
Merge pull request #14343 from rabbitmq/amqpl-direct-reply-to-tests
Increase test coverage for Direct Reply-to
2025-08-07 12:02:35 -04:00
David Ansari 730415d3b7 Link to new Stream Filtering docs 2025-08-07 17:59:05 +02:00
David Ansari 1906650de0 Increase test coverage for Direct Reply-to
Add more tests for the Direct Reply-to feature in AMQP 0.9.1.

This will help the future Direct Reply-To refactoring making sure the
existing behaviour won't break.
2025-08-07 17:39:25 +02:00
Arnaud Cogoluègnes 19692b8a27
Merge pull request #14333 from rabbitmq/stream-sac-retry-unregister-consumer
Retry stream SAC unregister consumer operation
2025-08-07 06:41:14 +00:00
Michael Klishin 4bdec425c3
Merge pull request #14304 from rabbitmq/md/exchange-limit
Add a configurable limit for number of exchanges
2025-08-06 21:26:34 -04:00
Michael Klishin 4b823f0571
Merge pull request #14315 from rabbitmq/su_aws/formatting_rabbitmq_aws
erlfmt rabbitmq_aws (which the AWS team now maintains)
2025-08-06 21:14:00 -04:00
Michael Klishin d5b5af5c5e
Merge pull request #14331 from rabbitmq/add-spring-to-selenium
Add a Spring component to selenium
2025-08-06 10:17:05 -04:00
Arnaud Cogoluègnes 93f0b7860e
Retry stream SAC unregister consumer operation
Retry unregistering a stream from its group in case of stream
coordinator timeout/unavailability. The operation can fail during or
after a network partition, which is normally, but it is harmless to
retry it to clean up the SAC group. The operation is idempotent anyway.
2025-08-06 13:39:11 +00:00
Marcial Rosales 8fb36030a5 Add spring authorization server for testing purposes
with Selenium. And ci job to build the docker image
2025-08-06 10:33:49 +02:00
Michael Klishin df2dd96edf
Merge pull request #14329 from rabbitmq/initial-transfer-id
Initialise sequence numbers to 0
2025-08-05 11:09:55 -04:00
Michael Klishin 78d70414ee
References #14327 2025-08-04 11:20:20 -04:00
Michael Klishin 018c4b189b
Closes #14327 2025-08-04 11:15:18 -04:00
Simon Unge 289acdbf4d
Ignore format commit 2025-08-04 14:16:23 +00:00
David Ansari e2af52f643 Initialise delivery-count to 0 2025-08-04 13:02:03 +02:00
David Ansari af65fb9960 Initialise outgoing transfer-id to 0 2025-08-04 12:06:34 +02:00
Michael Klishin 73af4aa014
rabbitmq.conf.example: add encrypted value examples
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
2025-08-02 18:35:45 -04:00
Michael Klishin 4c76d6dd8a
Merge pull request #14321 from rabbitmq/mk-rabbitmq-nodes-helpers
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Introduce a few new rabbit_plugins and rabbit_nodes functions
2025-08-01 14:54:05 -04:00
Michael Klishin 5ddf7954eb
Introduce a few new rabbit_plugins and rabbit_nodes functions
Sometimes a plugin needs to list online peers
that are running, reachable, not under maintenance
and have a specific plugin enabled.

This commit introduces a few helper functions
to make such cluster member queries trivial.
2025-08-01 14:28:59 -04:00
Michael Klishin 24100eb785
Merge pull request #14320 from rabbitmq/dependabot/github_actions/main/google-github-actions/auth-2.1.12
Bump google-github-actions/auth from 2.1.11 to 2.1.12
2025-08-01 14:18:12 -04:00
dependabot[bot] eb6eb953d4
Bump google-github-actions/auth from 2.1.11 to 2.1.12
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.11 to 2.1.12.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.11...v2.1.12)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: 2.1.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 18:04:45 +00:00
Michael Klishin 4506d8ff15
rabbitmq_auth_backend_internal_loopback: remove an unused file
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
not only the Cuttlefish schema file was empty, it
also was incorrectly put under ./schema
instead of ./priv/schema.
2025-08-01 11:54:41 -04:00
Michael Klishin 7089af389a
4.1.3 release notes 2025-08-01 00:36:30 -04:00
Jean-Sébastien Pédron aba63b0179
Merge pull request #14317 from rabbitmq/channel-reuse
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Fix channel number reuse
2025-07-31 13:53:40 +02:00
David Ansari 6413d2d7dd Fix channel reuse bug
This commit fixes the following test flake that occurred in CI:
```
make -C deps/rabbit ct-amqp_dotnet t=cluster_size_1:redelivery
```

After receiving the end frame, the server session proc replies with the end frame.

Usually when the test case succeeds, the server connection process receives
a DOWN for the session proc and untracks its channel number such that a
subsequent begin frame for the same channel number will create a new session
proc in the server.

In the flake however, the client receives the end, and pipelines new begin,
attach, and flow frames. These frames are received in the server connection's
mailbox before the monitor for the old session proc fires. That's why these
new frames are sent to the old session proc causing the test case to
fail.

This reveals a bug in the server.
This commit fixes this bug similarly as done in the AMQP 0.9.1 channel in
94b4a6aafd/deps/rabbit/src/rabbit_channel.erl (L1146-L1155)

Channel reuse by the client is valid and actually common, e.g. if channel-max
is 0.
2025-07-31 13:10:23 +02:00
Simon Unge a4fffbd7e0
erlfmt entire plugin 2025-07-30 20:55:52 +00:00
Michael Davis d4e06ad8e3
Add a config option to limit the number of exchanges 2025-07-30 13:46:58 -04:00
Michael Davis 392e5f9407
rabbit_db_exchange: Use Khepri projection for count/0 and exists/1
These functions will be used in the child commit for a check on
the number of exchanges. We can use the projection to avoid bothering
the Khepri process with a query.
2025-07-30 13:42:05 -04:00
Jean-Sébastien Pédron 94b4a6aafd
Merge pull request #14206 from rabbitmq/fix-test-flakes-2025Q2
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Collection of test fixes
2025-07-30 15:42:59 +02:00
Jean-Sébastien Pédron 0fb74baaa2
rabbit_stream_queue_SUITE: Wait for replicas in `shrink_coordinator_cluster/1`
[Why]
In CI, we sometimes get a failure when we try to forget node 3. The
CLI doesn't report the nature of the error unfortunately.

I suppose it's related to the fact that node 3 is stopped and forgotten
before all three replicas were ready when the stream queue was declared.
This is just a guess though and have no proof that it is the actual
error.

[How]
We wait for the replicas after declaring the stream queue.
2025-07-30 15:04:49 +02:00
Jean-Sébastien Pédron a44d541e5f
metrics_SUITE: Wait for ETS table to be up-to-date
... in several test cases.

[Why]
In CI or any slow and/or busy environment, it may take time for the ETS
tables to ge updated.
2025-07-30 15:04:49 +02:00
Jean-Sébastien Pédron 83b8a6ba38
amqp_client_SUITE: Ignore meck return value in `idle_time_out_on_server/1`
[Why]
Sometimes it returns `false` in CI. `meck:validate/1` can return false
in the module throws an exception. So perhaps a timing issue in CI where
the runner is usually slower than our working computers?
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron ffaf919846
amqp_client_SUITE: Trim "list_connections" output before parsing it
[Why]
Sometimes, at least in CI, it looks like the output of the CLI is
prepended with a newline, sometimes not. This breaks the check of that
output.

[How]
We just trim the output before parsing it. The parsing already takes
care of trimming internal whitespaces.
2025-07-30 15:04:48 +02:00
David Ansari 8307aa6dd2
v5_SUITE: session_upgrade_v3_v5_qos1
Prior to this commit, the following test case flaked:
```
make -C deps/rabbitmq_mqtt ct-v5 t=cluster_size_1:session_upgrade_v3_v5_qos1
```

The test case failed with:
```
{v5_SUITE,session_upgrade_v3_v5_qos,1112}
{test_case_failed,Received unexpected PUBLISH payload. Expected: <<"2">> Got: <<"1">>}
```

The broker logs showed:
```
2025-07-15 15:50:23.914152+00:00 [debug] <0.758.0> MQTT accepting TCP connection <0.758.0> (127.0.0.1:38594 -> 127.0.0.1:27005)
2025-07-15 15:50:23.914289+00:00 [debug] <0.758.0> Received a CONNECT, client ID: session_upgrade_v3_v5_qos, username: undefined, clean start: false, protocol version: 3, keepalive: 60, property names: []
2025-07-15 15:50:23.914403+00:00 [debug] <0.758.0> MQTT connection 127.0.0.1:38594 -> 127.0.0.1:27005 picked vhost using plugin_configuration_or_default_vhost
2025-07-15 15:50:23.914480+00:00 [debug] <0.758.0> User 'guest' authenticated successfully by backend rabbit_auth_backend_internal
2025-07-15 15:50:23.914641+00:00 [info] <0.758.0> Accepted MQTT connection 127.0.0.1:38594 -> 127.0.0.1:27005 for client ID session_upgrade_v3_v5_qos
2025-07-15 15:50:23.914977+00:00 [debug] <0.758.0> Received a SUBSCRIBE with subscription(s) [{mqtt_subscription,
2025-07-15 15:50:23.914977+00:00 [debug] <0.758.0>                                             <<"session_upgrade_v3_v5_qos">>,
2025-07-15 15:50:23.914977+00:00 [debug] <0.758.0>                                             {mqtt_subscription_opts,1,false,
2025-07-15 15:50:23.914977+00:00 [debug] <0.758.0>                                              false,0,undefined}}]
2025-07-15 15:50:23.924503+00:00 [debug] <0.764.0> MQTT accepting TCP connection <0.764.0> (127.0.0.1:38608 -> 127.0.0.1:27005)
2025-07-15 15:50:23.924922+00:00 [debug] <0.764.0> Received a CONNECT, client ID: session_upgrade_v3_v5_qos, username: undefined, clean start: false, protocol version: 5, keepalive: 60, property names: []
2025-07-15 15:50:23.925589+00:00 [error] <0.758.0> writing to MQTT socket #Port<0.63> failed: closed
2025-07-15 15:50:23.925635+00:00 [debug] <0.764.0> MQTT connection 127.0.0.1:38608 -> 127.0.0.1:27005 picked vhost using plugin_configuration_or_default_vhost
2025-07-15 15:50:23.925670+00:00 [info] <0.758.0> MQTT connection <<"127.0.0.1:38594 -> 127.0.0.1:27005">> will terminate because peer closed TCP connection
2025-07-15 15:50:23.925727+00:00 [debug] <0.764.0> User 'guest' authenticated successfully by backend rabbit_auth_backend_internal
2025-07-15 15:50:24.000790+00:00 [info] <0.764.0> Accepted MQTT connection 127.0.0.1:38608 -> 127.0.0.1:27005 for client ID session_upgrade_v3_v5_qos
2025-07-15 15:50:24.016553+00:00 [warning] <0.764.0> MQTT disconnecting client <<"127.0.0.1:38608 -> 127.0.0.1:27005">> with client ID 'session_upgrade_v3_v5_qos', reason: normal
```

This shows evidence that the MQTT server connection did not process the
DISCONNECT packet. The hypothesis is that the server connection did not
even process the PUBACK packet from the client. Hence, the first message
got requeued and re-delivered to the new v5 client.

This commit fixes this flake by not acking the first message.
Hence, we always expect that the first message will be redelivered to
the new v5 client.
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron ce1545d51a
java_SUITE: Add missing error handling 2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron 5aab965db4
auth_SUITE: Wait for connection tracking to be up-to-date
... when testing vhost limits

[Why]
The tracking is aynchronous, thus the third MQTT connection might be
opened before the tracking is up-to-date, which the testcase doesn't
expect.
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron 6111c277b6
per_node_limit_SUITE: Wait for the channel count to be up-to-date
[Why]
In the `node_channel_limit` testcase, we open several channels and
verify the count of opened channels in all places but one: after the
first connection failure, when we try to open 3 channels.

Opening 3 channels in a row might not be tracked in time to reject the
third channel because the counter is updated asynchronously.

[How]
We simply wait for the counter to reach 5 before opening the third
channel.

We change all checks to use `?awaitMatch/3` in the process to be more
robust with timing issues.
2025-07-30 15:04:48 +02:00
Michal Kuratczyk 37b7a2a567
backing_queue_SUITE: Increase the restart time boundary
[Why]
ehie flaked today since the restart took 309ms, thus above
the allowed 100ms (outside of CI, it takes single-digit ms)

[How]
Increase the allowed time but also significantly increase next_seq_id.
This test exists because in the past we had an O(n) algorithm in CQ
recovery, leading to a slow recovery of even empty queues, if they had
a very large next_seq_id. Now that this operation is O(1), a much larger
next_seq_id shouldn't affect the time it takes to run
this test, while accidentally re-introducing an O(n) algorithm should
fail this test consistently.
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron c6729351b6
rabbit_prometheus_http_SUITE: Use another Erlang metric
[Why]
It looks like `erlang_vm_dist_node_queue_size_bytes` is not always
present, even though other Erlang-specific metrics are present.

[How]
The goal is to ensure Erlang metrics are present in the output, so just
use another one that is likely to be there.
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron 0bc2d8b282
dynamic_SUITE: Be explicit about connection open+close
[Why]
The tests relied on `rabbit_ct_client_helpers` connection and channel
manager which doesn't seem to be robust. It causes more harm than helps
so far.

Hopefully, this will fix some test flakes in CI.
2025-07-30 15:04:48 +02:00
Jean-Sébastien Pédron 22c09595d5
queue_type_SUITE: Be explicit about connection open+close
[Why]
The tests relied on `rabbit_ct_client_helpers` connection and channel
manager which doesn't seem to be robust. It causes more harm than helps
so far.

Hopefully, this will fix some test flakes in CI.
2025-07-30 15:04:47 +02:00
Jean-Sébastien Pédron f61374360a
per_user_connection_channel_limit_SUITE: Fix test flake in `single_node_list_in_user`
[Why]
This was the only place where a condition was checked once after a
connection close, instead of waiting for it to become true.

This caused some transient failures in CI when the connection tracking
took a bit of time to update and the check was performed before that.
2025-07-30 15:04:47 +02:00
Jean-Sébastien Pédron ab766981ac
cluster_minority_SUITE: Ensure cluster can be changed before partition
... in `remove_node_when_seed_node_is_leader/1` and
`remove_node_when_seed_node_is_follower/1`.

[Why]
The check was performed after the partition so far. It was incorrect
because if a cluster change was not permitted at the time of the
partition, it would not be afterwards. Thus there was a race condition
here.

[How]
Now, the check is performed before the partition.

Thanks to this new approach, we are sure of the state of node A and
don't need the cass block near the end of the test cases.

This should fix some test flakes we see locally and in CI.
2025-07-30 15:04:47 +02:00
Jean-Sébastien Pédron 1582ae6cee
quorum_queue_SUITE: Use less messages in `force_checkpoint_on_queue`
[Why]
The default checkpoint interval is 16384. Therefore with 20,000
messages published by the testcase, there is a chance a checkpoint is
created. This would hit an assertion in the testcase which expects no
checkpoints before it forces the creation of one. We see this happening
in CI. Not locally because the testcase runs fast enough.

[How]
The testcase now sends 10,000 messages. This is still a lot of messages
while staying under the default checkpoint interval.
2025-07-30 15:04:47 +02:00
Jean-Sébastien Pédron f973932a2d
quorum_queue_SUITE: Use Khepri fence before checking number of replicas
[Why]
When `wait_for_messages_ready/3` returns, we are sure that the replicas
are in the expected state. However, the `#amqqueue{}` record is updated
in Khepri, we don't know when all Khepri store members will be
up-to-date.

It can happen that `Server0` is not up-to-date when we query that record
to get the list of replicass, leading to a test failure.

[How]
First, the check is moved to its own function is `queue_utils`.

Then, if Khepri is being used, we use a Khepri fence to ensure previous
operations were applied on the given server. This way, we get a
consistent view of the `#amqqueue{}` record and thus the list of
replicas.
2025-07-30 15:04:47 +02:00
Jean-Sébastien Pédron bbcd04d931
feature_flags_SUITE: Fix style
[Why]
Several lines were crossing the 80-columns boundary, plus messages
without a capital first letter.
2025-07-30 15:04:46 +02:00
Jean-Sébastien Pédron 4ac82b6a41
Merge pull request #14307 from rabbitmq/update-khepri-to-0.17.2
Update Khepri from 0.17.1 to 0.17.2
2025-07-30 12:50:25 +02:00
Jean-Sébastien Pédron eaf4b5d6ed
Update Khepri from 0.17.1 to 0.17.2
Khepri release notes:
https://github.com/rabbitmq/khepri/releases/tag/v0.17.2
2025-07-30 11:33:01 +02:00
David Ansari 5c26be6985
Merge pull request #14302 from rabbitmq/amqpnetlite-2.5.0
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Bump AMQP.Net Lite to v2.5.0
2025-07-29 11:51:38 +02:00
Loïc Hoguin 224d7f50c0
Merge pull request #14301 from lukebakken/lukebakken/fix-using-zip-to-build
Changes required to use `zip` instead of `7z`
2025-07-29 10:48:00 +02:00
David Ansari 3543f2cffe Bump AMQP.Net Lite to v2.5.0 2025-07-29 08:38:43 +02:00
Michael Klishin 9acbf19e9a
Update CONTRIBUTING.md to link to an updated CLA 2025-07-28 17:21:11 -04:00
Luke Bakken 959be5945a
Changes required to use `zip` instead of `7z` 2025-07-28 09:45:58 -07:00
Michael Klishin d39e18f45c
Merge pull request #14278 from rabbitmq/shovel-metrics
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
rabbitmqctl shovel_status: handle metrics
2025-07-28 08:43:40 -04:00
Diana Parra Corbacho 2a0401633e Shovel: status tests 2025-07-28 13:22:37 +02:00
Michael Klishin 582e4a3cc8
Merge pull request #14288 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-9665a72820
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the prod-deps group across 6 directories with 2 updates
2025-07-26 14:56:49 -07:00
Michael Klishin 586963a4e6
Merge pull request #14287 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-6290477d44
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
2025-07-26 14:56:41 -07:00
dependabot[bot] e68a7b433d
[skip ci] Bump the prod-deps group across 6 directories with 2 updates
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.45.0 to 2.46.1
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.45.0...maven/2.46.1)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.3...v3.5.4)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.3...v3.5.4)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.45.0 to 2.46.1
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.45.0...maven/2.46.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.45.0 to 2.46.1
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.45.0...maven/2.46.1)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.45.0 to 2.46.1
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.45.0...maven/2.46.1)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.46.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.46.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.46.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.46.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-26 18:11:25 +00:00
dependabot[bot] 003ffcea3f
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.rabbitmq:amqp-client](https://github.com/rabbitmq/rabbitmq-java-client) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `com.rabbitmq:amqp-client` from 5.25.0 to 5.26.0
- [Release notes](https://github.com/rabbitmq/rabbitmq-java-client/releases)
- [Commits](https://github.com/rabbitmq/rabbitmq-java-client/compare/v5.25.0...v5.26.0)

Updates `org.junit.jupiter:junit-jupiter` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.3 to 5.13.4
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.3...r5.13.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.rabbitmq:amqp-client
  dependency-version: 5.26.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-26 18:10:27 +00:00
Michael Klishin 3c9cfe4389
Merge pull request #14280 from cloudamqp/cq_info
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Classic queues: return basic info items without calling queue process
2025-07-24 16:33:15 -07:00
Péter Gömöri 21556b57e6 Classic queues: return basic info items without calling queue process
This should make listing for example only names of queues faster if
there are a lot of classic queues.
2025-07-24 22:30:22 +02:00
Michael Klishin 84e0478ff7
Merge pull request #14277 from lukebakken/lukebakken/fix-popup-text-formatting
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Fix error popup text display
2025-07-24 09:25:22 -07:00
Diana Parra Corbacho 1a06bc01cd Rabbitmqctl shovel_status: handle metrics
The ctl command got broken when metrics were added to the status.
As we have the metrics now, we just report them.
2025-07-24 12:45:15 +02:00
Michal Kuratczyk a5106c6a61
Expose ra counters (#13895)
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Switch from ra_metrics to ra_counters

* Expose many more metrics (they are also up to date)
* Bump Seshat, Ra, Osiris, Prometheus.erl
* switch from proplists to maps
2025-07-24 10:43:20 +02:00
Luke Bakken 5f5bf81e40
Fix error popup text display
When validation fails for a policy parameter, the resulting popup can't
be read due to one extra binary encoding as well as code that escapes
HTML entites. Since the EJS template uses `<%= >` for the popup, it will
display the text as-is, and not render any HTML.
2025-07-23 22:44:17 -07:00
David Ansari d0c3b3a079
Merge pull request #14255 from rabbitmq/stream-filtering-yield
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Support concurrent links with stream filtering
2025-07-23 09:14:11 +02:00
Michael Klishin 0183885ee9
Merge pull request #14272 from rabbitmq/rabbitmq-server-14151
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
#14151 by @tomyouyou
2025-07-22 10:43:38 -07:00
Michael Klishin 8c8a2e92d2
Merge pull request #14270 from Ayanda-D/await-condition-ignoring-exceptions
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Introduce rabbit_ct_helpers:await_condition_* helpers which ignore exceptions
2025-07-22 09:23:35 -07:00
Ayanda Dube c35533d675 introduce rabbit_ct_helpers:await_condition_* helpers which ignore exceptions 2025-07-22 16:26:51 +01:00
Michael Klishin 36fd79cd9e
Merge pull request #14268 from rabbitmq/revert-14264-await-condition-for-exceptions
Revert "Handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 to continue waiting"
2025-07-22 08:03:14 -07:00
Michael Klishin 50f2308446
Revert "Handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 to continue waiting" 2025-07-22 08:02:53 -07:00
Michael Klishin 36731efbaa
Merge pull request #14264 from Ayanda-D/await-condition-for-exceptions
Handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 to continue waiting
2025-07-22 07:59:44 -07:00
David Ansari e35909a7b4
Merge pull request #14265 from Ayanda-D/remove-io-inspect
Remove awkward IO.inspect/1 in rabbitmqctl status command
2025-07-22 13:03:28 +02:00
Ayanda Dube e8a3c4db42 remove IO.inspect/1 in ctl status command 2025-07-22 11:33:36 +01:00
Ayanda Dube faca67b5e6 handle exceptions in rabbit_ct_helpers:await_condition_with_retries/2 and continue waiting 2025-07-22 11:19:30 +01:00
David Ansari 04009b8ff2 Add test case amqp_sql_filter
This test case tests that two links filtering from the same stream
are processed concurrently by the session if the stream contains
uncompressed sub batches.
2025-07-22 10:05:47 +00:00
David Ansari 74d34b0de4 Support concurrent links with stream filtering
## What?

If a receiver performs stream filtering with AMQP property filters or AMQP SQL filter
expressions, the following downsides can occur:
1. While the stream is being filtered, other links on the same
   session are blocked
2. RabbitMQ sends messages late to the receiver

As an example, let's assume a receiver attaches to the start of a multi GB
stream providing a link credit of 2. Let's assume only the very first message
matches the filter. In this case, RabbitMQ scans the entire
stream without processing other links on the same session, and sends the matched
message only once the scan completed (after many seconds or even minutes).

Instead, we want other links to be processed concurrently and the
receiver might want to start processing the first matched message while
RabbitMQ continues filtering the stream.

This commit fixes these two downsides.

 ## How?

After a threshold of consecutively unmatched messages, the session
"pauses" filtering on that link temporarily by:
1. sending an Erlang message `resume_filtering` to itself, and
2. sending any matched messages to the receiver

Any other Erlang messages then have a chance to be processed by the
session before the filtering on that link is resumed by the
`resume_filtering` Erlang message.

Once the end of the stream is reached or link credit is exhausted, the
`credit_reply` will be returned from `rabbit_stream_queue` to
`rabbit_amqp_session`.

An alternative solution would be to use separate Erlang processes for
filtering links as they can be CPU bound and also block for disk I/O.
2025-07-22 10:05:47 +00:00
tomyouyou 1afbdca365
CQ: 'handle_cast(init, State) ' may cause exceptions
In the init_it2 function, when returning stop with none 'From'. This will result in the following exceptions:

2025-06-28 16:01:15.636 [error] <0.1306.0>   crasher:, initial call: rabbit_amqqueue_process:init/1, pid: <0.1306.0>, registered_name: [], exception exit: {bad_return_value, {stop,normal, {existing, {amqqueue, {resource,<<"/">>,queue,<<"q13">>}, false,false,none, [{<<"x-queue-type">>,longstr, <<"classic">>}], <14981.1295.0>,[],[],[],undefined, undefined,[],[],live,0,[],<<"/">>, #{user => <<"rabbit_inside_user">>, system_creation => 1751098305370332559, recover_on_declare => true, creator =>, {1751099091,"10.225.80.5",50046, "none"}, last_system_creation =>, 1751096873022515385}, rabbit_classic_queue,#{}}}, {q,{amqqueue, {resource,<<"/">>,queue,<<"q13">>}, false,false,none, [{<<"x-queue-type">>,longstr, <<"classic">>}], <0.1306.0>,[],[],[],undefined,undefined,[], [],crashed,0,[],<<"/">>, #{user => <<"rabbit_inside_user">>, system_creation => 1751096873022515385, recover_on_declare => false, creator =>, {1751097374,"10.225.80.5",56254, "none"}, recover_vsn => 0, zretarts => [-576459962]}, rabbit_classic_queue,#{}}, none,false,undefined,undefined, {state, {queue,[],[],0}, {active,-576459961468389,1.0}, []}, undefined,undefined,undefined,undefined, {state,none,30000,undefined}, #{},undefined,undefined,undefined, {state,#{},delegate}, undefined,undefined,undefined,undefined, 'drop-head',0,0,running,false,0,undefined, <<"/">>,undefined,0,false,0,undefined,0,0,0,[], undefined,0,0,0,0,true}}}, in function  gen_server2:terminate/3 (gen_server2.erl, line 1172), ancestors: [<0.1089.0>,<0.511.0>,<0.471.0>,<0.470.0>, rabbit_vhost_sup_sup,rabbit_sup,<0.250.0>], message_queue_len: 0, messages: [], links: [<0.1089.0>], dictionary: [{virtual_host,<<"/">>}, {rand_seed, {#{max => 288230376151711743,type => exsplus, next => #Fun<rand.5.65977474>, jump => #Fun<rand.3.65977474>}, [134188285183854767|82006587006243019]}}, {debug_openv_dt_cfg,{1751097655,[1]}}, {process_name, {rabbit_amqqueue_process, {resource,<<"/">>,queue,<<"q13">>}}}], trap_exit: true, status: running, heap_size: 28690, stack_size: 28, reductions: 46062, neighbours:,

(cherry picked from commit e6ec4df9bb)
2025-07-21 16:19:23 -07:00
Michael Klishin 2387fdc21d
Merge pull request #14259 from rabbitmq/dependabot/github_actions/main/google-github-actions/auth-2.1.11
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Bump google-github-actions/auth from 2.1.10 to 2.1.11
2025-07-21 15:15:10 -07:00
dependabot[bot] 95746940fb
Bump google-github-actions/auth from 2.1.10 to 2.1.11
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.10 to 2.1.11.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.10...v2.1.11)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: 2.1.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 20:11:29 +00:00
Michael Klishin 6008e032f8
Merge pull request #14190 from cloudamqp/msg_store_comment
Very minor: Remove outdated comment from rabbit_msg_store
2025-07-21 10:08:34 -07:00
Michael Klishin 86c9ad2b0e
Merge pull request #14252 from rabbitmq/ra-2.16.12
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Ra v2.16.12
2025-07-21 07:11:39 -07:00
David Ansari 4dbc2758b9
Merge pull request #14253 from rabbitmq/sql-release-notes
Update 4.2 release notes for AMQP SQL
2025-07-21 15:00:11 +02:00
David Ansari 56e76e912f Update 4.2 release notes for AMQP SQL 2025-07-21 14:59:09 +02:00
Karl Nilsson 2d1c63257b Ra v2.16.12
Bug fix release.

Fixes rarely occuring file handle leak in quorum queue followers.
2025-07-21 11:21:34 +01:00
Michal Kuratczyk 3ea83aca18
Merge pull request #14249 from rabbitmq/x509-0.9.2
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
2025-07-18 16:54:41 +02:00
Michal Kuratczyk 9ffcf0123b
Bump x509 to 0.9.2 2025-07-18 15:47:35 +02:00
Michal Kuratczyk febb58003d
Merge pull request #14232 from rabbitmq/consistent-logging
Peer Discovery AWS Integration Test / Integration Test (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Consistent logging
2025-07-18 10:58:40 +02:00
Michal Kuratczyk 3ee82dab54
Updates for SQL filter changes 2025-07-18 09:46:00 +02:00
Michal Kuratczyk f6e718c599
Re-introduce rabbit_log for backwards compatibility
Some community plugins use rabbit_log. To simplify
the transition, we can keep this module as a simple
wrapper on logger macros.
2025-07-18 08:43:05 +02:00
Michal Kuratczyk 69b97b8a17
Trigger CI 2025-07-18 08:43:05 +02:00
Michal Kuratczyk 1e17455463
[skip ci] Code formatting 2025-07-18 08:43:05 +02:00
Michal Kuratczyk e459859a40
Remove test for rabbit_log:log/4 2025-07-18 08:43:05 +02:00
Michal Kuratczyk bcc062203d
rabbit_log -> logger in MQTT test 2025-07-18 08:43:05 +02:00
Michal Kuratczyk 9b3f66c2ec
Remove rabbit_log from Makefile 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 9ab45124e6
rabbit_log -> logger in CLI tests 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 4a4b8bea60
Don't meck rabbit_log 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 5cfb39d30b
rabbit_log -> logger in dynamic calls 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 11e51f58ac
Make dialyzer happy 2025-07-18 08:43:04 +02:00
Michal Kuratczyk d9103c9d6e
Add exchange name back to the log 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 8ffc9912cd
Add missing includes 2025-07-18 08:43:04 +02:00
Michal Kuratczyk cc5c3c60df
Add missing include 2025-07-18 08:43:04 +02:00
Michal Kuratczyk 34d20d92ed
Remove incorrect include 2025-07-18 08:43:03 +02:00
Michal Kuratczyk 0cfab72fea
Fix AMQP-0.8 :) 2025-07-18 08:43:03 +02:00
Michal Kuratczyk 24c3677e92
[skip ci] fix AMQP-1.0 DBG macro 2025-07-18 08:43:03 +02:00
Michal Kuratczyk 84d52b51dc
[skip ci] Remove rabbit_log_shovel, use LOG_ macros directly 2025-07-18 08:43:03 +02:00
Michal Kuratczyk 301f6e9906
[skip ci] Remove redundant pid metadata in LOG_ macros 2025-07-18 08:43:03 +02:00
Michal Kuratczyk 8fb3ca1abf
[skip ci] Set logging domain to `?RMQLOG_DOMAIN_GLOBAL` on startup
`?RMQLOG_DOMAIN_GLOBAL` used to be added by a now deleted logging
module rabbit_log.
2025-07-18 08:43:03 +02:00
Michal Kuratczyk ad15dd39df
[skip ci] Simplify logging around peer discovery 2025-07-18 08:43:03 +02:00
Michal Kuratczyk ee100af9eb
[skip ci] Remove rabbit_log_ldad and use LOG_ macros 2025-07-18 08:43:02 +02:00
Michal Kuratczyk 8a05433897
[skip ci] Remove rabbit_log_connection and use LOG_ macros 2025-07-18 08:43:02 +02:00
Michal Kuratczyk ebe3f61ef0
[skip ci] Remove rabbit_log_federation and use LOG_ macros 2025-07-18 08:43:02 +02:00
Michal Kuratczyk 3ee8df9310
[skip ci] Remove `pid` from logger process metadata
It's added automatically by logger
2025-07-18 08:43:02 +02:00
Michal Kuratczyk 5600138ce9
[skip ci] Remove rabbit_log_prelaunch 2025-07-18 08:43:02 +02:00
Michal Kuratczyk b7b30ce4d1
[skip ci] Remove rabbit_log_mirroring 2025-07-18 08:43:02 +02:00
Michal Kuratczyk 1743881fe1
[skip ci] Remove rabbit_log_channel and use LOG_ macros directly 2025-07-18 08:43:02 +02:00
Michal Kuratczyk 14fc15a0c2
[skip ci] Remove rabbit_log_queue, replace with LOG_ macros 2025-07-18 08:43:02 +02:00
Michal Kuratczyk b6b766cac7
[skip ci] Replace logger: calls is LOG_ macros 2025-07-18 08:43:02 +02:00
Michal Kuratczyk 175ba70e8c
[skip ci] Remove rabbit_log and switch to LOG_ macros 2025-07-18 08:42:59 +02:00
David Ansari 310e8123ec
Merge pull request #14184 from rabbitmq/amqp-sql
Support AMQP SQL Filter Expressions
2025-07-18 08:17:21 +02:00
David Ansari a43e2c5201
Merge pull request #14245 from rabbitmq/amqp_filter_set_bug
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Deny `amqp_filter_set_bug` by default
2025-07-17 15:19:27 +02:00
David Ansari a850505b18 Fix failing test case `streams`
Fix
```
make -C deps/rabbit ct-amqp_dotnet t=cluster_size_1:streams
```
2025-07-17 11:29:53 +02:00
David Ansari 4c73edd923 Deny `amqp_filter_set_bug` by default
The deprecated feature flag `amqp_filter_set_bug` was introduced in
RabbitMQ 4.1 with phase `permitted_by_default`.
See https://github.com/rabbitmq/rabbitmq-server/pull/12415

This commit which will land in RabbitMQ 4.2 changes the phase to `denied_by_default`.
2025-07-17 10:35:00 +02:00
David Ansari bc346c8193 Minor refactoring 2025-07-16 15:29:24 +02:00
David Ansari 31d443a30c Change regex pattern from greedy to non-greedy
The spec mandates:
> The wildcard matching MUST consume as few characters as possible.
2025-07-16 15:29:23 +02:00
David Ansari 965691680d Make NAN and INF reserved 2025-07-16 15:29:23 +02:00
David Ansari 5bd2eba04f Support decimal and approximate number constants
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929299
and
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929300

In contrast, in JMS approximate literals use the Java floating-point literal syntax.
2025-07-16 15:29:23 +02:00
David Ansari 642eca60c0 Add support for UTC function
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929310
2025-07-16 15:29:23 +02:00
David Ansari 833b367e3b Support delimited identifier
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929314
2025-07-16 15:29:23 +02:00
David Ansari 492575bc29 Support strings surrounded by double quotes
JMS:
> A string literal is enclosed in single quotes, with an included single quote represented
> by doubled single quote; for example, 'literal' and 'literal''s'.

AMQP SQL
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929302
> A string constant is a string of arbitrary text consisting of any valid printable Unicode
> characters surrounded by single or double quotation marks. A quotation mark inside the
> string is represented by two consecutive quotation marks.
> string_constant ::= { ‘ | “ } <any> [<any>] { ‘ | “ }
2025-07-16 15:29:23 +02:00
David Ansari ffc879d958 Support binary constants
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929303
2025-07-16 15:29:23 +02:00
David Ansari ccdb82b687 Allow only upper case operator names
Allow only upper case predefined selector literals and operator names.

The JMS spec states:
> Predefined selector literals and operator names are written here in upper case; however, they are case insensitive.

However, the AMQP SQL spec does not include such a statement.
The EBNF notation with single quotes ('AND') typically implies exact literal matching.
This commit follows the AMQP SQL's EBNF notation and therefore disallows
lower case predefined selector literals or operator names.
2025-07-16 15:29:23 +02:00
David Ansari c5eeced28d Support set expressions
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929291
2025-07-16 15:29:23 +02:00
David Ansari 7da3c64287 Allow lexicographical comparison of strings
AMQP SQL spec:
"The left operand is of greater value than the right operand if:
... both operands are of type string or of type symbol (any combination is permitted) and the
lexicographical rank of the left operand is greater than the lexicographical rank of the right operand."

In contrast, in JMS:
"String [...] comparison is restricted to = and <>."
2025-07-16 15:29:23 +02:00
David Ansari 5949e6fe90 Support modulo operator '%'
The spec is underspecified in what should happen if the left hand side
is a float. This commit decides that the result is undefined (unknown).

The spec is also underspecified in what should happen if either the left
hand side or the right hand side is negative. This commit decides to use
the behaviour of Erlang `rem`.
2025-07-16 15:29:23 +02:00
David Ansari 885b8d38e8 Support ‘!=’ operator 2025-07-16 15:29:23 +02:00
David Ansari f5ae413659 Remove [NOT] BETWEEN operator
[NOT] BETWEEN operator is not supported in AMQP SQL
2025-07-16 15:29:23 +02:00
David Ansari 9f7668f6c2 Add link capability AMQP_FILTEX_SQL_V1_0
"A partner MAY indicate support and yet it MAY still refuse to accept
certain filters or combination of filters for some scenarios."
2025-07-16 15:29:23 +02:00
David Ansari b64c0ef5bf Comply with 6.4.4.4 Field References and Values
https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929312
2025-07-16 15:29:23 +02:00
David Ansari dbc6321808 Rename JMS to (AMQP) SQL 2025-07-16 15:29:23 +02:00
David Ansari c34d6206f1 Support AMQP SQL Filter Expressions
Instead of the JMS message selector syntax, support a subset of the
AMQP SQL Filter Expressions syntax as defined in
[AMQP Filter Expressions Version 1.0 Committee Specification Draft 01](https://docs.oasis-open.org/amqp/filtex/v1.0/csd01/filtex-v1.0-csd01.html#_Toc67929276).

This commit changes the descriptors.
2025-07-16 15:29:23 +02:00
David Ansari da2255d7da
Merge pull request #14238 from rabbitmq/optimise-amqp-parser
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Make AMQP 1.0 faster
2025-07-16 15:27:54 +02:00
Arnaud Cogoluègnes f8eac1dc92
Merge pull request #14240 from rabbitmq/stream-fix-test-flake-2
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Increase timeouts and improve error logging in stream test
2025-07-16 11:34:28 +00:00
Arnaud Cogoluègnes c1fd7c3376
Propagate connection state in offset lag calculation test
This should fix some flakes.
2025-07-16 11:33:12 +02:00
David Ansari 80a687f525 Simplify splitting large messages 2025-07-16 11:32:50 +02:00
David Ansari cf3bbe99a7 Simplify pattern matching 2025-07-16 10:32:21 +02:00
David Ansari ce3726c064 Fix splitting large messages in server
This commit fixes the following test case:
```
make -C deps/rabbit ct-amqp_dotnet t=cluster_size_1:fragmentation
```

Previously, the server sent a frame that was 1 byte too large.
2025-07-16 10:29:08 +02:00
Arnaud Cogoluègnes 0d84c8e9a5
Increase timeouts and improve error logging in stream test 2025-07-16 10:22:20 +02:00
David Ansari 64fdb25f97 Fix splitting large messages in AMQP client
This commit fixes the failing test cases
```
make -C deps/rabbit ct-msg_size_metrics t=tests:message_size
make -C deps/amqp10_client ct-system t=rabbitmq:roundtrip_large_messages
```

The second test case failed with:
```
flush {amqp10_event,
          {connection,<0.193.0>,
              {closed,
                  {framing_error,
                      <<"frame size (131073 bytes) > maximum frame size (131072 bytes)">>}}}}
```
2025-07-16 09:39:40 +02:00
David Ansari bf23a7fb30 Speed up AMQP 1.0 parser by generating less garbage
This commit results in great performance improvements for AMQP 1.0.

Stream filtering via AMQP SQL Filters or AMQP Property Filters where the
broker reads messages from the stream into memory and the filter returns
false, i.e. messages are not sent to the client:
Before this commit: ~400,000 msgs/s
After this commit:  ~500,000 msgs/s

There is also a ~10% increase in end-to-end throughput for normal
AMQP workloads, e.g. when sending to and receiving from a classic queue.

Prior to this commit, a lot of garbage was created leading to many minor
garbage collections.

This commit reduces the garbage being generated.
The new module amqp10_composite performs very well:
* Single tuple update setting multiple fields at once, sometimes done even in-place
  without copying the tuple.
* The list of fields is passed into X registers, no need for any new
  allocations.

On the serialisation side, this commit also generates less garbage by:
1. Avoiding tuple_to_list/1
2. Omitting trailing elements of the list that are null

This will also lead to fewer bytes per message sent on the wire and less
resource usage for the clients as they need to parse fewer fields.
2025-07-15 16:41:56 +00:00
David Ansari 09f9a77799 Delete dead code 2025-07-15 15:57:22 +00:00
David Ansari 603466b5d8 Use byte_size/1 instead of size/1 2025-07-15 15:55:09 +00:00
Arnaud Cogoluègnes fb9f048add
Merge pull request #14235 from rabbitmq/stream-fix-test-flake
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Fix flake in stream plugin test suite
2025-07-15 15:34:24 +00:00
Arnaud Cogoluègnes ff98f6fc1e
Fix flake in stream plugin test suite
The closing sequence must account for consumer update and metadata
update frames the broker sends when a consumer group changes and when a
stream is deleted.
2025-07-15 15:51:02 +02:00
Michael Klishin cdd9ba1bb6
Merge pull request #14227 from rabbitmq/show-deprecated-feature-state
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Show current state of deprecated features
2025-07-14 11:21:21 -04:00
Michal Kuratczyk e7c2dc5aff
Show current state of deprecated features 2025-07-14 15:56:28 +02:00
Michael Klishin 43523e86a9
Merge pull request #14220 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-2049cf3a53
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
[skip ci] Bump the dev-deps group across 3 directories with 2 updates
2025-07-12 20:57:45 -04:00
dependabot[bot] a014788271
[skip ci] Bump the dev-deps group across 3 directories with 2 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format) and [com.squareup.okhttp3:okhttp-jvm](https://github.com/square/okhttp).


Updates `com.google.googlejavaformat:google-java-format` from 1.27.0 to 1.28.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.27.0...v1.28.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.27.0 to 1.28.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.27.0...v1.28.0)

Updates `com.google.googlejavaformat:google-java-format` from 1.27.0 to 1.28.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.27.0...v1.28.0)

Updates `com.squareup.okhttp3:okhttp-jvm` from 5.0.0 to 5.1.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-5.0.0...parent-5.1.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: com.squareup.okhttp3:okhttp-jvm
  dependency-version: 5.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-13 00:57:02 +00:00
Michael Klishin 351c457c1a
Merge pull request #14221 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-67ca0902dc
[skip ci] Bump the prod-deps group across 4 directories with 1 update
2025-07-12 20:55:54 -04:00
dependabot[bot] 50348ab6ed
[skip ci] Bump the prod-deps group across 4 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.5 to 2.45.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.5...lib/2.45.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.5 to 2.45.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.5...lib/2.45.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.5 to 2.45.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.5...lib/2.45.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.5 to 2.45.0
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.5...lib/2.45.0)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-12 18:33:43 +00:00
Michael Klishin 5345b647df
Merge pull request #14211 from cloudamqp/type_state_undef
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Handle type state being undefined for very old queues
2025-07-11 11:54:11 -04:00
David Ansari 250be2c6fb
Merge pull request #14209 from rabbitmq/amqp-decimal
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Fix AMQP crashes for approximate numbers
2025-07-11 10:21:54 +02:00
David Ansari 37cb595ea3
Merge pull request #14210 from cloudamqp/mqtt_processor_SUITE_no_mnesia
Minor: Don't use Mnesia in rabbitmq_mqtt/test/processor_SUITE
2025-07-11 10:18:17 +02:00
Péter Gömöri cc95d37718 Handle type state being undefined for very old queues
Field #amqqueue.type_state can be undefined for queues declared on old
RabbitMQ versions before 3.8.0. Ensure `amqqueue:get_type_state/1`
always returns a map according to its type spec to make life of
calling code easier.
2025-07-11 09:29:58 +02:00
Péter Gömöri 7d4ecb5e82 Refactor mqtt_processor get_vhost functions
In order to clarify preference of different methods. This commit oes
not change functionality.

This highlights some inconsistences:

- If both User/Password and SslLogin are provided, in
  `check_credentials` User/Password takes precedence while in
  `get_vhost` SslLogin

- If SslLogin is provided (but no mapping is found) vhost from port
  mapping has precedence over vhost from UserName, while in case of
  no ssl it is the other way around.
2025-07-11 09:16:26 +02:00
David Ansari 5c318c8e38 Fix AMQP crashes for approximate numbers
This commit fixes several crashes:
1. Serialising IEEE 754-2008 decimals as well as
   NaN and +-Inf for float and doubles crashed
2. Converting IEEE 754-2008 decimals as well as NaN and +-Inf
   for float and dobules from amqp to amqpl crashed

The 2nd crash looks as follows:
```
exception exit: {function_clause,
                    [{mc_amqpl,to_091,
                         [<<"decimal-32">>,{as_is,116,<<124,0,0,0>>}],
                         [{file,"mc_amqpl.erl"},{line,747}]},
                     {mc_amqpl,'-convert_from/3-lc$^2/1-2-',1,
                         [{file,"mc_amqpl.erl"},{line,155}]},
                     {mc_amqpl,convert_from,3,
                         [{file,"mc_amqpl.erl"},{line,155}]},
                     {mc,convert,3,[{file,"mc.erl"},{line,358}]},
                     {rabbit_channel,outgoing_content,2,
                         [{file,"rabbit_channel.erl"},{line,2649}]},
                     {rabbit_channel,handle_basic_get,7,
                         [{file,"rabbit_channel.erl"},{line,2636}]},
                     {rabbit_channel,handle_cast,2,
                         [{file,"rabbit_channel.erl"},{line,617}]},
                     {gen_server2,handle_msg,2,
                         [{file,"gen_server2.erl"},{line,1056}]}]}
```
The 2nd crash is fixed by omitting any `{as_is, _TypeCode, _Binary}`
values during AMQP 1.0 -> AMQP 0.9.1 conversion.
This will be documented in the conversion table.

In addition to fixing these crashes, this commit adds tests that
RabbitMQ is able to store and forward IEEE 754-2008 decimals.
IEEE 754-2008 decimals can be parsed and serialsed by RabbitMQ.
However, RabbitMQ doesn't support interpreting this values. For example,
they can't be used on the headers exchange or for AMQP filter
expressions.
2025-07-10 21:14:26 +02:00
Péter Gömöri 10f1ea1bac Don't use Mnesia in rabbitmq_mqtt/test/processor_SUITE
Soon Mnesia will be gone from RabbitMQ, so better make the test suite
metadata store agnostic.
2025-07-10 15:52:53 +02:00
Michal Kuratczyk 6acc2b15ea
[skip ci] update version in discussion templates 2025-07-10 11:52:29 +02:00
Michal Kuratczyk cedace734b
[skip ci] add previous_version input to test-make-tests
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
2025-07-09 11:57:08 +02:00
Michal Kuratczyk 6e4058c3ba
[skip ci] Add input to 3.13 mixed version test request
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
2025-07-09 11:46:13 +02:00
Michal Kuratczyk 2fb9b691d0
Merge pull request #14171 from rabbitmq/mixed-version-with-otp26-rmq-3.13
Test mixed version with 3.13.7/OTP26 (weekly)
2025-07-09 10:38:33 +02:00
Michal Kuratczyk d0dad7375a
Run mixed-version tests with 3.13 weekly 2025-07-08 10:52:24 +02:00
Michal Kuratczyk d2111d35db
Add previous_version input for mixed-version tests 2025-07-08 10:52:24 +02:00
Michal Kuratczyk 05b44129c4
quorum_queue_SUITE: fixes for 3.13 compatibility 2025-07-08 10:52:24 +02:00
Michal Kuratczyk c35395ecc6
skip dead_letter_headers_should_not_be_appended_for_republish with 3.13 2025-07-08 10:52:24 +02:00
Michal Kuratczyk 966cc05408
amqp_client_SUITE: skip some tests in mixed-version with 3.13 2025-07-08 10:52:24 +02:00
Michal Kuratczyk ab75d84d8e
Skip Khepri-specific tests when 3.13 is in the mix 2025-07-08 10:52:24 +02:00
Michal Kuratczyk cb6ecb7195
Disable forget_cluster_node test (not supported by 3.13) 2025-07-08 10:52:24 +02:00
Michal Kuratczyk 48f335b0f8
Use ra:member_overview instead of rabbit_fifo:overview
member_overview works better with different machine versions
2025-07-08 10:52:24 +02:00
Michal Kuratczyk e3df8bcd61
Enable FFs required by 4.0 2025-07-08 10:52:24 +02:00
Michal Kuratczyk e99018c25f
feature flags: skip tests for recently fixed bugs
These tests fail in a mixed-version cluster with 3.13
2025-07-08 10:52:24 +02:00
Michal Kuratczyk 3b453abced
QQ: disable some tests in 3.13/mixed version situations 2025-07-08 10:52:24 +02:00
Michal Kuratczyk 2808154f39
CLI: ignore the exact error message
There error is slightly different for different Elixir versions
2025-07-08 10:52:24 +02:00
Michal Kuratczyk e459b2d14a
Skip async_notify_unsettled_classic_queue on 3.13 2025-07-08 10:52:24 +02:00
Michal Kuratczyk a330269a24
rabbit_fifo_prop_SUITE: skip rather than fail
mixed versions tests being run between different RabbitMQ versions
with different OTP versions maybe sometimes intentionally test upgrades
with the same OTP version (eg. 3.13->4.2 with OTP26) so let's just skip
this test in such cases
2025-07-08 10:52:23 +02:00
Arnaud Cogoluègnes 3c28315e83
Squash Netty deprecation warnings in Java test projects
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
2025-07-08 10:14:52 +02:00
Arnaud Cogoluègnes 610471942d
Merge pull request #14198 from rabbitmq/stream-java-project-pom-upgrade
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Polish stream Java test projects
2025-07-07 13:08:48 +00:00
Arnaud Cogoluègnes f35c7d72c1
Polish stream Java test projects
Format, bump log dependencies, configure auto-format to get latest
dependencies.
2025-07-07 14:35:10 +02:00
Arnaud Cogoluègnes 27a362df3d
Fix OkHttp artifact name 2025-07-07 13:47:22 +02:00
Arnaud Cogoluègnes 99d34c4198
Merge pull request #14195 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-fc7633e709
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
2025-07-07 06:17:28 +00:00
dependabot[bot] f5bb1ea7c6
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 3 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework) and [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `com.squareup.okhttp3:okhttp` from 4.12.0 to 5.0.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.12.0...parent-5.0.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-version: 5.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-05 18:46:11 +00:00
Péter Gömöri 6ccfe6a450 Remove outdated comment from rabbit_msg_store
The value `close` is never stored in the file handle ets since commit 32816c0a.
2025-07-04 13:40:58 +02:00
Michael Klishin 0b3ec492b6
4.1.2 release notes edits 2025-07-04 11:31:20 +03:00
Michal Kuratczyk ee652cbe6a
[skip ci] Document running mixed-version tests locally
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
2025-07-02 16:13:01 +02:00
Michael Klishin 43f1b7289a
Merge pull request #14158 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-654b2af25e
[skip ci] Bump the dev-deps group across 6 directories with 5 updates
2025-07-02 13:50:19 +03:00
Loïc Hoguin 6a49e3e30f
Merge pull request #14178 from rabbitmq/loic-cqv2-index-open-eventually
CQ: Retry opening write file when writing messages
2025-07-02 11:38:00 +02:00
Loïc Hoguin af8c0af408
CQ: Retry opening write file when writing messages
Followup to ff8ecf1cf7
only this time it's for the index.
2025-07-02 10:15:32 +02:00
Michael Klishin e44eff228a
4.1.2 release notes: a typo 2025-07-02 10:37:37 +03:00
Michael Klishin 7660bdbe81
4.1.2 release notes updates 2025-07-02 10:36:28 +03:00
Arnaud Cogoluègnes 3e615803be
Merge pull request #14170 from rabbitmq/cli-reset-offset
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Add rabbitmq-streams reset_offset command
2025-07-01 16:19:54 +00:00
Michael Klishin 8d9c1177d5
rabbitmq-stream reset_offset: respect --quiet and --silent 2025-07-01 17:46:51 +02:00
Arnaud Cogoluègnes c50fc90e47
Add rabbitmq-streams reset_offset command
A user can set the stored offset for a stream/reference couple to 0.
This way a consumer can keep the same name and re-attach to the
beginning of a stream.

References https://github.com/rabbitmq/rabbitmq-server/discussions/14124
2025-07-01 17:46:44 +02:00
Arnaud Cogoluègnes f9eb4752a7
Merge pull request #14172 from rabbitmq/man-rabbitmq-streams-complete
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Add activate consumer and list tracking to rabbitmq-streams man page
2025-07-01 13:18:54 +00:00
Arnaud Cogoluègnes 523c87f28b
Add activate consumer and list tracking to rabbitmq-streams man page
These 2 commands were missing.
2025-07-01 15:16:42 +02:00
Michael Klishin 4390bb63bd
Merge pull request #14165 from rabbitmq/parsetools-license
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Update comments in parsetools
2025-06-30 14:01:33 +04:00
David Ansari 49e6f4c9c8 Update comments in parsetools
The changes in this commit are the result of running
```
make run-broker
```
on OTP 28.0.1.

Some license comments are getting updated.
2025-06-30 11:12:42 +02:00
Jean-Sébastien Pédron 51aba859c6
cluster_minority_SUITE: Use `Config1`, not `Config`
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
... which is a previous copy of the variable.

Also, while here, fix style: the line was breaking the 80-col limit.
2025-06-29 23:55:00 +02:00
Jean-Sébastien Pédron cfcd203167
Merge pull request #14150 from rabbitmq/fix-race-in-cluster_minority_SUITE
cluster_minority_SUITE: Fix race in `remove_node_when_seed_node_is_leader`
2025-06-29 23:35:24 +02:00
Michael Klishin a9b6c34726
Merge pull request #14159 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/prod-deps-f76eae35d9
Test (make) / Build and Xref (1.18, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 27) (push) Waiting to run Details
Test (make) / Build and Xref (1.18, 28) (push) Waiting to run Details
Test (make) / Test (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.18, 28) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the prod-deps group across 1 directory with 2 updates
2025-06-29 21:27:36 +04:00
dependabot[bot] 8b7ebcf9fa
[skip ci] Bump the prod-deps group across 1 directory with 2 updates
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.


Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.21 to 2.2.0
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.21...v2.2.0)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.21 to 2.2.0

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-28 18:51:54 +00:00
dependabot[bot] e2cf972b51
[skip ci] Bump the dev-deps group across 6 directories with 5 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit-framework) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit-framework).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.21 to 2.2.0
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.21...v2.2.0)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.21 to 2.2.0

Updates `org.junit.jupiter:junit-jupiter` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.1 to 5.13.2
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.1...r5.13.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-version: 2.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-28 18:47:49 +00:00
Jean-Sébastien Pédron 716635742e
cluster_minority_SUITE: Fix race in `remove_node_when_seed_node_is_leader`
[Why]
When node A becomes the leader, it still takes a few exchanges with
followers to allow cluster changes again.

Concurrently, the testcase blocks traffic between A and other nodes to
simulate a network partition. If this happens after A becomes the leader
but before cluster changes are permitted again, the testcase will never
succeed and will eventually abort with:

    Case: cluster_minority_SUITE:remove_node_when_seed_node_is_leader
    Reason: {error,
                {{awaitMatch,
                     [{module,cluster_minority_SUITE},
                      {expression, "..."},
                      {pattern,"ok"},
                      {value,
                          {error,69,<<"Error:\ncluster_change_not_permitted">>}}]},

[How]
Before blocking traffic, we wait for cluster changes to be permitted
again on node A.
2025-06-27 20:06:47 +02:00
Michael Klishin d890cf1d36
Merge pull request #14147 from rabbitmq/issue-13429
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 27) (push) Has been cancelled Details
Test (make) / Build and Xref (1.18, 28) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.18, 28, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.18, 28) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Display AMQP filters in Management UI
2025-06-27 21:29:40 +04:00
Michael Klishin f55377575a
Merge pull request #14114 from rabbitmq/otp28
Improve Erlang/OTP 28 compatibility, use OTP 28 in the pipelines
2025-06-27 21:16:39 +04:00
Michael Klishin fae336ab24
Merge pull request #14145 from rabbitmq/qq-sac-return-bug
QQ: fix SAC activation bug
2025-06-27 21:13:08 +04:00
Michal Kuratczyk 5cc73d85ec
[skip ci] Disable force_shrink_member_to_current_member in mixed-version 2025-06-27 16:41:19 +02:00
David Ansari 23c67304c9 Display AMQP filters in Management UI
## What?

This commit displays effective filters of AMQP receivers in the Management UI.
There is a new column `Filters` for outgoing links.

Solves #13429

 ## Why?

This allows validating if the desired filters set by the receiver are
actually in place by the server.
In addition, it's convenient for a developer to check any filter values
including SQL filter expressions.

 ## How?

The session process stores the the formatted and effective filters in
its state.

The Management UI displays a box containing the filter name. This way
the table for the outgoing links is kept concise. Hovering with the
mouse over a box will show additionally the descriptor and the actual
filter-value/definition.
2025-06-27 15:43:22 +02:00
Michal Kuratczyk 3033154717
Cache ActiveMQ to reduce downloads/flakes 2025-06-27 15:05:16 +02:00
Karl Nilsson dd6fd0c8e2 QQ: fix SAC activation bug for returns and requeues
A higher priority SAC consumer was never activated when a
quiescing consumer returned or requeued it's last message.

NB: this required a new machine version: 7
2025-06-27 13:31:04 +01:00
Michal Kuratczyk 9099cfb64e
OTP-PUB-KEY -> PKIXAlgs-2009 for OTP28+ 2025-06-27 12:42:57 +02:00
Michal Kuratczyk fd1d037874
Deflake per_user_connection_tracking_SUITE 2025-06-27 12:42:57 +02:00
Michal Kuratczyk 6def891d42
Adjust CLI tests for OTP28 2025-06-27 12:42:57 +02:00
Michal Kuratczyk f0705acd19
Disable dialyzer for some modules
Elixir 1.18 comes with a JSON package which leads to errors like this:

```
Duplicate modules: [["/home/runner/work/_temp/.setup-beam/elixir/bin/../lib/elixir/ebin/Elixir.JSON.Encoder.Float.beam",
                     "/home/runner/work/rabbitmq-server/rabbitmq-server/deps/json/ebin/Elixir.JSON.Encoder.Float.beam"],
```
2025-06-27 12:42:57 +02:00
Michal Kuratczyk 5ea53632f5
Bump erlang.mk to fix x509 0.9.0 compilation 2025-06-27 12:42:56 +02:00
David Ansari 87dac547ff
Skip test case two_nodes_different_otp_version
Test case two_nodes_different_otp_version was introduced in
https://github.com/rabbitmq/rabbitmq-server/pull/14042.

In CI, the code was compiled on OTP 27. The test case then applied the
Ra commands on OTP 27 and OTP 26 at runtime. For that to work the test
transferred the compiled BEAM modules to the OTP 26 node.

Bumping OTP to 28 causes the lower version node (be it OTP 26 or OTP 27)
to error when parsing the atom table chunk of the BEAM file that was
compiled in OTP 28:
```
  corrupt atom table

{error,badfile}
```
That's expected as described in https://github.com/erlang/otp/pull/8913#issue-2572291638
since https://github.com/erlang/otp/pull/8913 changes the atom table chunk
format in the BEAM files.

```
beam_lib:chunks("deps/rabbit/ebin/lqueue.beam", [atoms]).
```
will parse successfully if the file gets loaded on OTP 28 irrespective
of whether the file was compiled with OTP 27 or 28.
However, this file fails to load if it is compiled with 28 and loaded on
27.

There is the `no_long_atoms` option that we could use just for this test
case.
However, given that we have a similar test case
two_nodes_same_otp_version we skip test case two_nodes_different_otp_version
in this commit.

Really, the best solution would be to use different OTP versions in
RabbitMQ mixed version testing in addition to using different RabbitMQ
versions. This way, the test case could just RPC into the different
RabbitMQ nodes and apply the Ra commands there.
2025-06-27 12:42:56 +02:00
Michal Kuratczyk ad0c873c6b
rabbitmq_cli: bump temp to 0.4.9 2025-06-27 12:42:56 +02:00
Michal Kuratczyk eb19f87dd9
rabbitmq_stream: add ssl to PLT_APPS 2025-06-27 12:42:56 +02:00
Michal Kuratczyk 97fb7d5783
management_agent: Don't auto-import ceil/1 2025-06-27 12:42:56 +02:00
Michal Kuratczyk caa174aac9
rabbitmq_stomp: add ssl to PLT_APPS 2025-06-27 12:42:56 +02:00
Michal Kuratczyk 1f681ba6d7
rabbitmq_web_mqtt: add ssl to PLT_APPS 2025-06-27 12:42:56 +02:00
Michal Kuratczyk 3aa99a9843
rabbitmq_ct_client_helpers: fix dialyzer on OTP28 2025-06-27 12:42:56 +02:00
Michal Kuratczyk 8273c500c4
STOMP: Handle OTP28 re:split("", ...) behaviour 2025-06-27 12:42:56 +02:00
Michal Kuratczyk 79e3a946cc
Add xmerl to PLT_APPS for rabbit_common 2025-06-27 12:42:56 +02:00
Michal Kuratczyk edd1b6dc6f
Bump x509 to 0.9.0 for OTP28 support 2025-06-27 12:42:56 +02:00
Michal Kuratczyk da8f4299b5
Adapt to OTP28 sslsocket
1. OTP28 changed sslsocket structure
2. an old hack is no longer necessary
2025-06-27 12:42:52 +02:00
Arnaud Cogoluègnes b6b3b198a5
Merge pull request #14143 from rabbitmq/stream-reader-close-consumer-log-on-stream-deletion
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Close stream consumer log after stream is deleted or unavailable
2025-06-27 10:19:41 +00:00
Iliia Khaprov - VMware by Broadcom 24397a7ad2
Merge pull request #14144 from rabbitmq/ik-exchange-module-lookup-test
Use registry:lookup_type_module inside exchange:type_to_module
2025-06-27 11:58:30 +02:00
Iliia Khaprov - VMware by Broadcom efc80c1482
use registry:lookup_type_module inside exchange:type_to_module
Without this change delete/3 callback for custom exchange type wasn't called and warning about invalid exchange type appeared in the logs.
What is interesting that exchange module was logged as an invalid type for previously declared exchange of that module ¯\_(ツ)_/¯.
2025-06-27 10:59:17 +02:00
Arnaud Cogoluègnes 2f048b4b57
Close stream consumer log after stream is deleted or unavailable
References #14127
2025-06-27 10:36:15 +02:00
Michal Kuratczyk 57b1ec13fd
Use OTP28/Elixir 1.18 in the pipelines 2025-06-27 09:49:35 +02:00
Michael Klishin cee62dbc96
Update 4.1.2 release notes 2025-06-26 21:29:37 +04:00
David Ansari 93db480bc4 Support SQL filter expressions for streams
## What?

This commit allows AMQP 1.0 clients to define SQL-like filter expressions when consuming from streams, enabling server-side message filtering.
RabbitMQ will only dispatch messages that match the provided filter expression, reducing network traffic and client-side processing overhead.
SQL filter expressions are a more powerful alternative to the [AMQP Property Filter Expressions](https://www.rabbitmq.com/blog/2024/12/13/amqp-filter-expressions) introduced in RabbitMQ 4.1.

SQL filter expressions are based on the [JMS message selector syntax](https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#message-selector-syntax) and support:
* Comparison operators (`=`, `<>`, `>`, `<`, `>=`, `<=`)
* Logical operators (`AND`, `OR`, `NOT`)
* Arithmetic operators (`+`, `-`, `*`, `/`)
* Special operators (`BETWEEN`, `LIKE`, `IN`, `IS NULL`)
* Access to the properties and application-properties sections

**Examples**

Simple expression:

```sql
header.priority > 4
```

Complex expression:

```sql
order_type IN ('premium', 'express') AND
total_amount BETWEEN 100 AND 5000 AND
(customer_region LIKE 'EU-%' OR customer_region = 'US-CA') AND
properties.creation-time >= 1750772279000 AND
NOT cancelled
```

Like AMQP property filter expressions, SQL filter expressions can be
combined with Bloom filters. Combining both allows for highly customisable
expressions (SQL) and extremely fast evaluation (Bloom filter) if only a
subset of the chunks need to be read from disk.

 ## Why?

Compared to AMQP property filter expressions, SQL filter expressions provide the following advantage:
* High expressiveness and flexibility in defining the filter

Like for AMQP property filter expressions, the following advantages apply:
* No false positives (as is the case for Bloom filters)
* Multiple concurrent clients can attach to the same stream each consuming
  only a specific subset of messages while preserving message order.
* Low network overhead as only messages that match the filter are
  transferred to the client
* Likewise, lower resource usage (CPU and memory) on clients since they
  don't need to deserialise messages that they are not interested in.
* If the SQL expression is simple, even the broker will save resources
  because it doesn't need to serialse and send messages that the client
  isn't interested in.

 ## How?

 ### JMS Message Selector Syntax vs. AMQP Extension Spec

The AMQP Filter Expressions Version 1.0 extension Working Draft 09 defines SQL Filter Expressions in Section 6.
This spec differs from the JMS message selector spec. Neither is a subset of the other. We can choose to follow either.
However, I think it makes most sense to follow the JMS spec because:
* The JMS spec is better defined
* The JMS spec is far more widespread than the AMQP Working Draft spec. (A slight variation of the AMQP Working
  Draft is used by Azure Service Bus: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-sql-filter)
* The JMS spec is mostly simpler (partly because matching on only simple types)
* This will allow for a single SQL parser in RabbitMQ for both AMQP clients consuming from a stream and possibly in future for JMS clients consuming from queues or topics.

<details>
<summary>AMQP extension spec vs JMS spec</summary>

AMQP

!= is synonym for <>

JMS

defines only <>

Conclusion

<> is sufficient

AMQP

Strings can be tested for “greater than”

“both operands are of type string or of type symbol (any combination is permitted) and

the lexicographical rank of the left operand is greater than the lexicographical rank of the right operand”

JMS

“String and Boolean comparison is restricted to = and <>.”

Conclusion

The JMS behaviour is sufficient.

AMQP

IN <set-expression>

set-expression can contain non-string literals

JMS:

set-expression can contain only string literals

Conclusion

The JMS behaviour is sufficient.

AMQP

EXISTS predicate to check for composite types

JMS

Only simple types

Conclusion

We want to match only for simple types, i.e. allowing matching only against values in the application-properties, properties sections and priority field of the header section.

AMQP:

Modulo operator %

Conclusion

JMS doesn't define the modulo operator. Let's start without it.

We can decide in future to add support since it can actually be useful, for example for two receivers who want to process every other message.

AMQP:

The ‘+’ operator can concatenate string and symbol values

Conclusion

Such string concatenation isn't defined in JMS. We don't need it.

AMQP:

Define NAN and INF

JMS:

“Approximate literals use the Java floating-point literal syntax.”

Examples include "7."

Conclusion

We can go with the JMS spec given that needs to be implemented anyway
for JMS support.
Scientific notations are supported in both the AMQP spec and JMS spec.

AMQP

String literals can be surrounded by single or double quotation marks

JMS

A string literal is enclosed in single quotes

Conclusion

Supporting single quotes is good enough.

AMQP

“A binary constant is a string of pairs of hexadecimal digits prefixed by ‘0x’ that are not enclosed in quotation marks”

Conclusion

JMS doesn't support binary constants. We can start without binary constants.

Matching against binary values are still supported if these binary values can be expressed as UTF-8 strings.

AMQP

Functions DATE, UTC, SUBSTRING, LOWER, UPPER, LEFT, RIGHT

Vendor specific functions

Conclusion

JMS doesn't define such functions. We can start without those functions.

AMQP

<field><array_element_reference>

<field>‘.’<composite_type_reference>

to access map and array elements

Conclusion

Same as above:

We want to match only for simple types, i.e.  allowing matching only against values in the application-properties, properties sections and priority field of the header section.

AMQP

allows for delimited identifiers

JMS

Java identifier part characters

Conclusion

We can go with the Java identifiers extending the allowed characters by
`.` and `-` to reference field names such as `properties.group-id`.

JMS:

BETWEEN operator

Conclusion

The BETWEEN operator isn't supported in the AMQP spec. Let's support it as convenience since it's already available in JMS.

</details>

  ### Filter Name

The client provides a filter with name `sql-filter` instead of name
`jms-selector` to allow to differentiate between JMS clients and other
native AMQP 1.0 clients using SQL expressions. This way, we can also
optionally extend the SQL grammar in future.

  ### Identifiers

JMS message selectors allow identifiers to contain some well known JMS headers that match to well known AMQP fields, for example:
 ```erl
jms_header_to_amqp_field_name(<<"JMSDeliveryMode">>) -> durable;
jms_header_to_amqp_field_name(<<"JMSPriority">>) -> priority;
jms_header_to_amqp_field_name(<<"JMSMessageID">>) -> message_id;
jms_header_to_amqp_field_name(<<"JMSTimestamp">>) -> creation_time;
jms_header_to_amqp_field_name(<<"JMSCorrelationID">>) -> correlation_id;
jms_header_to_amqp_field_name(<<"JMSType">>) -> subject;
%% amqp-bindmap-jms-v1.0-wd10 § 3.2.2 JMS-defined ’JMSX’ Properties
jms_header_to_amqp_field_name(<<"JMSXUserID">>) -> user_id;
jms_header_to_amqp_field_name(<<"JMSXGroupID">>) -> group_id;
jms_header_to_amqp_field_name(<<"JMSXGroupSeq">>) -> group_sequence;
```

This commit does a similar matching for `header.` and `properties.` prefixed identifiers to field names in the AMQP property section.
The only field that is supported to filter on in the AMQP header section is `priority`, that is identifier `header.priority`.

By default, as described in the AMQP extension spec, if an identifier is not prefixed, it refers to a key in the application-properties section.

Hence, all identifiers prefixed with `header.`, and `properties.` have special meanings and MUST be avoided by applications unless they want to refer to those specific fields.

Azure Service Bus uses the `sys.` and `user.` prefixes for well known field names and arbitrary application-provided keys, respectively.

  ### SQL lexer, parser and evaluator

This commit implements the SQL lexer and parser in files rabbit_jms_selector_lexer.xrl and
rabbit_jms_selector_parser.yrl, respectively.

Advantages:
* Both the definitions in the lexer and the grammar in the parser are defined **declaratively**.
* In total, the entire SQL syntax and grammar is defined in only 240 lines.
* Therefore, lexer and parser are simple to maintain.

The idea of this commit is to use the same lexer and parser for native AMQP clients consumings
from streams (this commit) as for JMS clients (in the future).
All native AMQP client vs JMS client bits are then manipulated after
the Abstract Syntax Tree (AST) has been created by the parser.

For example, this commit transforms the AST specifically for native AMQP clients
by mapping `properties.` prefixed identifiers (field names) to atoms.
A JMS client's mapping from `JMS` prefixed headers can transform the AST
differently.

Likewise, this commit transforms the AST to compile a regex for complex LIKE
expressions when consuming from a stream while a future version
might not want to compile a regex when consuming from quorum queues.

Module `rabbit_jms_ast` provides such AST helper methods.

The lexer and parser are not performance critical as this work happens
upon receivers attaching to the stream.

The evaluator however is performance critical as message evaluation
happens on the hot path.

 ### LIKE expressions

The evaluator has been optimised to only compile a regex when necessary.
If the LIKE expression-value contains no wildcard or only a single `%`
wildcard, Erlang pattern matching is used as it's more efficient.
Since `_` can match any UTF-8 character, a regex will be compiled with
the `[unicode]` options.

  ### Filter errors

Any errors upon a receiver attaching to a stream causes the filter to
not become active. RabbitMQ will log a warning describing the reason and
will omit the named filter in its attach reply frame. The client lib is
responsible for detaching the link as explained in the AMQP spec:
> The receiving endpoint sets its desired filter, the sending endpoint sets the filter actually in place
(including any filters defaulted at the node). The receiving endpoint MUST check that the filter in
place meets its needs and take responsibility for detaching if it does not.

This applies to lexer and parser errors.

Errors during message evaluation will result in an unknown value.
Conditional operators on unknown are described in the JMS spec. If the
entire selector condition is unknown, the message does not match, and
will therefore not be delivered to the client.

 ## Clients

Support for passing the SQL expression from app to broker is provided by
the Java client in https://github.com/rabbitmq/rabbitmq-amqp-java-client/pull/216
2025-06-26 11:56:55 +02:00
Karl Nilsson 268ff69556
Merge pull request #14127 from rabbitmq/close-segments-for-deleted-queue
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
QQ/Streams: Ensure open file handles are closed when a queue is deleted.
2025-06-26 10:42:49 +01:00
Karl Nilsson c688169f08 QQ/Streams: Ensure open file handles are closed when a queue is deleted.
If a stream or quorum queue has opened a file to read a consumer message
and the queue is deleted the file handle reference is lost and kept
open until the end of the channel lifetime.
2025-06-26 09:35:35 +01:00
Iliia Khaprov - VMware by Broadcom d685875166
Merge pull request #14134 from lukebakken/rabbitmq-server-14101-3
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Follow up to #14132
2025-06-25 21:29:02 +02:00
Luke Bakken 33cb21ee92
Follow up to #14132
#14132 introduced a small bug in the JSON output that was caught by CI.
2025-06-25 12:01:49 -07:00
Michael Klishin e1b92e41ea
Merge pull request #14132 from lukebakken/rabbitmq-server-14101-2
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Follow-up to 14101
2025-06-25 19:13:26 +04:00
Luke Bakken 00528cb1e8
Follow-up to 14101
Improvement in the code that @the-mikedavis noticed just before #14118 was merged.
2025-06-25 08:04:49 -07:00
Michael Klishin b75fc23770
Merge pull request #14125 from rabbitmq/rabbitmq-server-14087-take-2
Re-submit #14087 by @SimonUnge: introduce an opinionated, opt-in way to prevent a node from booting if it's been reset in the past
2025-06-25 17:43:56 +04:00
Michael Klishin 6c27536777
Wording 2025-06-25 17:42:14 +04:00
Michael Klishin 7876b2df58
Update ct.test.spec 2025-06-25 17:41:18 +04:00
Michael Klishin 74c4ec83df
Don't list a test suite twice in parallel CT suite groups #14087 #14125 2025-06-25 17:39:54 +04:00
Michael Klishin 7ec370347c
Merge pull request #14123 from rabbitmq/rabbitmq-server-14121
By @tomyouyou: Avoid a scary log exception when a closing connection runs into an exception during a command writer flush operation
2025-06-25 17:38:24 +04:00
Michael Klishin d370b529fa
Merge pull request #14118 from lukebakken/rabbitmq-server-14101
Fix JSON output for `rabbitmqctl environment`
2025-06-25 17:05:19 +04:00
Michael Klishin b4a11e61ab
Make dialyzer happy 2025-06-25 16:28:23 +04:00
Michael Klishin 7810b4e018
More renaming #14087, add new test suite to a parallel CT group
(cherry picked from commit 5f1ab1409ff33f51fde535c5ffc22b43b2347a1c)
2025-06-25 16:16:02 +04:00
Simon Unge 8ab2bda4eb
Rename
(cherry picked from commit 77cec4930e)
2025-06-25 16:15:42 +04:00
Simon Unge 1e04b72f6d
Add opt in initial check run
(cherry picked from commit 2d2c70cc7c)
2025-06-25 16:15:35 +04:00
Michael Klishin 9bd0731a5a
Simplify #13121 by @tomyouyou, log it at debug level 2025-06-25 14:28:21 +04:00
Arnaud Cogoluègnes 03d87b5391
Merge pull request #14115 from rabbitmq/stream-partition-test-flake
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Add log in test
2025-06-25 08:10:55 +00:00
Loïc Hoguin 71f5babdde
Merge pull request #14108 from rabbitmq/loic-cq-dont-delete-current-write-file
CQ: Retry opening file when flushing buffers to avoid "DELETE PENDING" issues on Windows
2025-06-25 09:47:18 +02:00
Arnaud Cogoluègnes 066145763f
Add log statements stream network partitions
The test creates network partitions and checks how the stream SAC
coordinator deals with them. It can be flaky on CI, the log statements
should help diagnose the flakiness.
2025-06-25 09:25:07 +02:00
tomyouyou 9e14040456
When the client disconnects, the 'channel' process may generate a large number of exception logs.
When the client disconnects, flushing writer in the termination may result in a large number of exceptions due to the writer being closed.
The exceptions are as follows:

2025-06-24 17:56:06.661 [error] <0.1381.0> ** Generic server <0.1381.0> terminating, ** Last message in was {'$gen_cast',terminate}, ** When Server state == {ch, {conf,running,rabbit_framing_amqp_0_9_1,1, <0.1371.0>,<0.1379.0>,<0.1371.0>, <<"10.225.80.5:50760 -> 10.225.80.6:5673">>, {user,<<"rabbit_inside_user">>,[], [{rabbit_auth_backend_internal, #Fun<rabbit_auth_backend_internal.3.16580688>}]}, <<"/">>, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>, <0.1373.0>, [{<<"authentication_failure_close">>,bool,true}, {<<"connection.blocked">>,bool,true}, {<<"consumer_cancel_notify">>,bool,true}, {<<"need_notify_server_info_with_heartbeat">>,bool, true}], none,5,1800000,#{},infinity,1000000000}, {lstate,<0.1380.0>,false}, none,3, {1, [{pending_ack,2,<<"1">>,-576460618632, {resource,<<"/">>,queue, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>}, 1}], []}, undefined, #{<<"1">> =>, {{amqqueue, {resource,<<"/">>,queue, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>}, false,false,none, [{<<"x-expires">>,signedint,1800000}, {<<"x-queue-type">>,longstr,<<"classic">>}], <0.1385.0>,[],[],[],undefined,undefined,[],[], live,0,[],<<"/">>, #{user => <<"rabbit_inside_user">>, system_creation => 1750758840399767062, recover_on_declare => false, creator =>, {1750758936,"10.225.80.5",50760,"rc.py"}}, rabbit_classic_queue,#{}}, {false,5,false, [{zclient,tuple, {1750758936,"10.225.80.5",50760,"rc.py"}}]}}}, #{{resource,<<"/">>,queue, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>} =>, {1,{<<"1">>,nil,nil}}}, {state,none,30000,undefined}, false,1, {rabbit_confirms,undefined,#{}}, [],[],none,flow,[], {rabbit_queue_type, #{{resource,<<"/">>,queue, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>} =>, {ctx,rabbit_classic_queue, {rabbit_classic_queue,<0.1385.0>,#{}, #{<0.1385.0> => ok}, false}}}}, #Ref<0.2472179985.4173070337.136448>,false, {erlang,#Ref<0.2472179985.4173070337.136063>}, "rc.py",true,0,false,undefined,undefined,undefined, false}, ** Reason for termination == , ** {{shutdown,{writer,send_failed,closed}}, {gen_server,call,[<0.1379.0>,flush,infinity]}},
2025-06-24 17:56:06.665 [error] <0.1381.0>   crasher:, initial call: rabbit_channel:init/1, pid: <0.1381.0>, registered_name: [], exception exit: {{shutdown,{writer,send_failed,closed}}, {gen_server,call,[<0.1379.0>,flush,infinity]}}, in function  gen_server2:terminate/3 (gen_server2.erl, line 1172), ancestors: [<0.1378.0>,<0.1376.0>,<0.1369.0>,<0.1368.0>,<0.1169.0>, <0.1168.0>,<0.1167.0>,<0.1165.0>,<0.1164.0>,rabbit_sup, <0.249.0>], message_queue_len: 1, messages: [{'EXIT',<0.1378.0>,shutdown}], links: [<0.1378.0>], dictionary: [{msg_io_dt_cfg,{1750758936,2}}, {zext_options_dt_cfg,{1750758966,[]}}, {zlog_consumer_dt_cfg,{1750758936,false}}, {channel_operation_timeout,15000}, {rbt_trace_enable,true}, {process_name, {rabbit_channel, {<<"10.225.80.5:50760 -> 10.225.80.6:5673">>,1}}}, {counter_publish_size_dt_cfg,{1750758936,undefined}}, {peer_info, {"10.225.80.5",50760, "10.225.80.5:50760 -> 10.225.80.6:5673 - rc.py:3382128:dfe6ba8d-a42f-4ece-93df-11bff0410814", "rc.py",0}}, {peer_host_port_compname,{"10.225.80.5",50760,"rc.py"}}, {permission_cache_can_expire,false}, {debug_openv_dt_cfg,{1750758936,[]}}, {z_qref_type_dic, [{{resource,<<"/">>,queue, <<"lzz.localdomain_rc.py_reply_89a60f0ef2114da2b3f150ca359ecf46">>}, rabbit_classic_queue}]}, {zconsumer_num,1}, {virtual_host,<<"/">>}, {msg_size_for_gc,458}, {rand_seed, {#{max => 288230376151711743,type => exsplus, next => #Fun<rand.5.65977474>, jump => #Fun<rand.3.65977474>}, [20053568771696737|52030598835932017]}}, {top_queue_msg_dt_cfg, {1750758936, {0,0,0,undefined,false,false,undefined,undefined}}}], trap_exit: true, status: running, heap_size: 4185, stack_size: 28, reductions: 50613, neighbours:,
2025-06-25 14:47:09 +08:00
Luke Bakken 75cd74a2f2
Fix JSON output for `rabbitmqctl environment`
Fixes #14101
2025-06-24 13:20:26 -07:00
Michael Klishin 754352375c
4.1.2 release notes update
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
2025-06-24 17:37:36 +04:00
Michael Klishin 2a034d7464
Merge pull request #14116 from rabbitmq/ra-2.16.11
Ra 2.16.11
2025-06-24 17:35:23 +04:00
Michael Klishin 4691a16af6
Ra 2.16.11
to include rabbitmq/ra#546.
2025-06-24 16:58:43 +04:00
Loïc Hoguin ff8ecf1cf7
CQ: Retry opening write file when flushing buffers
On Windows the file may be in "DELETE PENDING" state following
its deletion (when the last message was acked). A subsequent
message leads us to writing to that file again but we can't
and get an {error,eacces}. In that case we wait 10ms and retry
up to 3 times.
2025-06-24 13:30:40 +02:00
Michael Klishin e019a4e41d
Correct a 4.1.2 release notes formatting issue 2025-06-24 01:16:16 +04:00
Michael Klishin e26fde9086
Initial 4.1.2 release notes 2025-06-24 01:15:10 +04:00
David Ansari 033a87523d Bump ActiveMQ to v6.1.7
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
We've experienced lots of failures in CI:
```
GEN    test/system_SUITE_data/apache-activemq-5.18.3-bin.tar.gz
make: *** [Makefile:65: test/system_SUITE_data/apache-activemq-5.18.3-bin.tar.gz] Error 28
make: Leaving directory '/home/runner/work/rabbitmq-server/rabbitmq-server/deps/amqp10_client'
Error: Process completed with exit code 2.
```

Bumping to the latest ActiveMQ Classic version may or may not help with
these failures.

Either way, we want to test against the latest ActiveMQ version. Version
5.18.3 reached end-of-life and is no longer maintained.
2025-06-23 18:11:42 +02:00
Arnaud Cogoluègnes 5d0823bdc9
Merge pull request #14109 from rabbitmq/stream-coordinator-fix-machine-version
Use module machine version for stream coordinator status
2025-06-23 15:55:07 +00:00
Arnaud Cogoluègnes 4e7e0f0f1d
Support cross-version overview in stream SAC coordinator
When the state comes from V4 and the current module is V5.

References #14106
2025-06-23 17:28:36 +02:00
Arnaud Cogoluègnes 0ca128b80f
Add log message to help diagnose flaky test 2025-06-23 17:28:08 +02:00
Arnaud Cogoluègnes 5042d8eefe
Use module machine version for stream coordinator status
The wrong module was used.
2025-06-23 15:28:32 +02:00
Arnaud Cogoluègnes 6e7058e488
Merge pull request #14106 from rabbitmq/stream-sac-coord-optimization
Miscellaneous minor improvements in stream SAC coordinator
2025-06-23 11:49:26 +00:00
Arnaud Cogoluègnes b4f7d46842
Miscellaneous minor improvements in stream SAC coordinator
This commit handles edge cases in the stream SAC coordinator to make
sure it does not crash during execution. Most of these edge cases
consist in an inconsistent state, so there are very unlikely to happen.

This commit also makes sure there is no duplicate in the consumer list
of a group. Consumers are also now identified only by their connection
PID and their subscription ID, as now the timestamp they contain in
their state does not allow a field-by-field comparison.
2025-06-23 10:47:33 +02:00
Arnaud Cogoluègnes 4bca14a4bb
Merge pull request #14102 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-75c31b2fef
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-06-23 07:06:07 +00:00
dependabot[bot] 417714cf62
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.0 to 3.5.3
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.0...v3.5.3)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.0 to 3.5.3
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.5.0...v3.5.3)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-21 18:26:18 +00:00
Michael Klishin ae3fbbcb0a
Merge pull request #14097 from rabbitmq/fix-federation-makefile
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Federation: update makefile to avoid dialyzer compilation errors
2025-06-20 12:52:50 +04:00
Diana Parra Corbacho 0801e68c14 Federation: update makefile to avoid dialyzer compilation errors
They just happen with a combination of OTP 27.3 and Elixir 1.17
2025-06-19 21:55:06 +02:00
Arnaud Cogoluègnes 72df6270b2
Mention socket is from stream reader in log message
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
2025-06-19 15:50:47 +02:00
Michael Klishin 60be7d8046
Merge commit from fork
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Management UI: escape virtual host names in virtual host restart forms
2025-06-17 21:49:30 +04:00
Michael Davis cfce31ef05
management: Sanitize vhost names in restart forms 2025-06-17 11:54:07 -04:00
Jean-Sébastien Pédron 0ee99d5169
Merge pull request #14081 from rabbitmq/remove-symlinks-to-rabbitmq-components.mk
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Delete symlinks to `erlang.mk` and `rabbitmq-components.mk`
2025-06-17 16:03:29 +02:00
Arnaud Cogoluègnes 3fe705f73e
Merge pull request #13672 from rabbitmq/stream-sac-coordinator-status-instead-of-active-flag
Prevent blocked groups in stream SAC with fine-grained status
2025-06-17 11:25:06 +00:00
Arnaud Cogoluègnes 41acc117bd
Add activate_stream_consumer command
New CLI command to trigger a rebalancing in a SAC group and activate a
consumer. This is a last resort solution if all consumers in a group
accidently end up in {connected, waiting} state.

The command re-uses an existing function, which only picks the consumer
that should be active. This means it does not try to "fix" the state
(e.g. removing a disconnected consumer because its node is definitely
gone from the cluster).

Fixes #14055
2025-06-17 11:56:37 +02:00
Arnaud Cogoluègnes 58f4e83c22
Close stream connection in case of unexpected error from SAC coordinator
Calls to the stream SAC coordinator can fail for various reason
(e.g. a timeout because of a network partition). The stream reader does not
take into account what the SAC coordinator returns and moves on even
in case of errors. This can lead to inconsistent state for SAC groups.

This commit changes this behavior by handling unexpected errors from the
SAC coordinator and closing the connection. The client is expected to
reconnect. This is safer than risking inconsistent state.

Fixes #14040
2025-06-17 11:56:37 +02:00
Arnaud Cogoluègnes a9cf049030
Remove only stream subscriptions affected by down stream member
The clean-up of a stream connection state when a stream member goes down can
remove subscriptions not affected by the member. The subscription state is
removed from the connection, but the subscription is not removed from
the SAC state (if the subscription is a SAC), because the subscription member
PID does not match the down member PID.

When the actual member of the subscription goes down, the subscription is no
longer part of the state, so the clean-up does not find the subscription
and does not remove it from the SAC state. This lets a ghost consumer in
the corresponding SAC group.

This commit makes sure only the affected subscriptions are removed from
the state when a stream member goes down.

Fixes #13961
2025-06-17 11:56:36 +02:00
Arnaud Cogoluègnes d1aab61566
Prevent blocked groups in stream SAC with fine-grained status
A boolean status in the stream SAC coordinator is not enough to follow
the evolution of a consumer. For example a former active consumer that
is stepping down can go down before another consumer in the group is
activated, letting the coordinator expect an activation request that
will never arrive, leaving the group without any active consumer.

This commit introduces 3 status: active (formerly "true"), waiting
(formerly "false"), and deactivating. The coordinator will now know when
a deactivating consumer goes down and will trigger a rebalancing to
avoid a stuck group.

This commit also introduces a status related to the connectivity state
of a consumer. The possible values are: connected, disconnected, and
presumed_down. Consumers are by default connected, they can become
disconnected if the coordinator receives a down event with a
noconnection reason, meaning the node of the consumer has been
disconnected from the other nodes. Consumers can become connected again when
their node joins the other nodes again.

Disconnected consumers are still considered part of a group, as they are
expected to come back at some point. For example there is no rebalancing
in a group if the active consumer got disconnected.

The coordinator sets a timer when a disconnection occurs. When the timer
expires, corresponding disconnected consumers pass into the "presumed
down" state. At this point they are no longer considered part of their
respective group and are excluded from rebalancing decision. They are expected
to get removed from the group by the appropriate down event of a
monitor.

So the consumer status is now a tuple, e.g. {connected, active}. Note
this is an implementation detail: only the stream SAC coordinator deals with
the status of stream SAC consumers.

2 new configuration entries are introduced:
 * rabbit.stream_sac_disconnected_timeout: this is the duration in ms of the
   disconnected-to-forgotten timer.
 * rabbit.stream_cmd_timeout: this is the timeout in ms to apply RA commands
   in the coordinator. It used to be a fixed value of 30 seconds. The
   default value is still the same. The setting has been introduced to
   make integration tests faster.

Fixes #14070
2025-06-17 11:56:20 +02:00
Michael Klishin b8a9cf12c5
Merge pull request #14088 from rabbitmq/rabbit_fifo_min
Avoid list allocation
2025-06-17 12:50:47 +04:00
David Ansari 2ca47665be Avoid list allocation
This is simmilar to https://github.com/rabbitmq/rabbitmq-server/pull/14056.
The performance benefit is probably negligbile though since this is
called only after each batch of Ra commands.
Nevertheless, it's unnecessary to allocate a list with 3 elements and
therefore 6 words on the heap, so let's optimise it.
2025-06-17 09:37:41 +02:00
Arnaud Cogoluègnes 90cb5571cf
Merge pull request #14083 from rabbitmq/stream-leader-can-be-undefined
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Return error if stream leader is undefined in stream manager
2025-06-16 16:12:08 +00:00
Arnaud Cogoluègnes 13e8564238
Return error if stream leader is undefined in stream manager
A stream may not have a leader temporarily for several reasons, e.g.
after it has been restarted. The stream manager may return undefined in
this case. Some client code may crash because it expects a PID or an
error, but not undefined.

This commit makes sure the leader PID is an actual Erlang PID and
returns {error, not_available} if it is not.

References #13962
2025-06-16 16:38:29 +02:00
Jean-Sébastien Pédron 63f7da23c7
Delete symlinks to `erlang.mk` and `rabbitmq-components.mk`
[Why]
They make it more difficult to compile RabbitMQ on Windows. They were
probably useful at the time of the switch to a monorepository but I
don't see their need anymore.
2025-06-16 15:19:18 +02:00
Michael Klishin c6e2405366
Merge pull request #14079 from rabbitmq/ik-internal-shovels
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Internal/Protected shovels
2025-06-16 14:31:47 +04:00
Michael Klishin a7c21a1b28
Rename a function, use ?assertMatch #14079 2025-06-16 13:18:58 +04:00
Michal Kuratczyk 2b83238e72
[skip ci] Add 4.1.1 to discussion template 2025-06-16 09:14:08 +02:00
Iliia Khaprov f13f99303a
Management part for internal shovels. Experimenting with owner linking 2025-06-15 18:46:42 +02:00
Iliia Khaprov 7a34bf8053
Like internal/protected queues, but shovels 2025-06-15 00:59:37 +02:00
Michael Klishin 20f89b2e0b
Merge pull request #14074 from rabbitmq/ik-tests-helpers
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Move clustering and queue utils to ct_helpers
2025-06-13 20:16:44 +04:00
Michael Klishin fbcb9fea23
Merge pull request #14073 from rabbitmq/ik-generalize-rebalance-module-handling
Generalize rebalance module handling
2025-06-13 19:36:12 +04:00
Iliia Khaprov 9a2f702f4f
Log queue_utils ra's local_query rpc error 2025-06-13 14:51:41 +02:00
Iliia Khaprov 2f3bed5a5b
Move clustering_utils and queue_utils to ct_helpers 2025-06-13 14:43:23 +02:00
Iliia Khaprov 93025bf05a
Generalize rebalance module handling 2025-06-13 14:37:48 +02:00
David Ansari 5c5026d977 Fix `export` attribute for rabbitmq_amqp_client
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Nightly OCI (make) / build-package-generic-unix (main, 27, 4.2.0) (push) Has been cancelled Details
Nightly OCI (make) / build-package-generic-unix (v4.0.x, 27) (push) Has been cancelled Details
Nightly OCI (make) / build-package-generic-unix (v4.1.x, 27) (push) Has been cancelled Details
Nightly OCI (make) / build-and-push (main, 27) (push) Has been cancelled Details
Nightly OCI (make) / build-and-push (v4.0.x, 27) (push) Has been cancelled Details
Nightly OCI (make) / build-and-push (v4.1.x, 27) (push) Has been cancelled Details
The correct format is:
```
-export(Functions).
```

ELP detected this malformed syntax.

Interestingly, prior to this commit, the functions were still exported:
```
rabbitmq_amqp_address:module_info(exports).
[{exchange,1},
 {exchange,2},
 {queue,1},
 {module_info,0},
 {module_info,1}]
```
2025-06-12 12:24:39 +02:00
David Ansari a1205ff778 Fix `export` module attribute
The correct format is:
```
-export(Functions).
```

ELP detected this malformed syntax.

Interestingly, prior to this commit, the functions were still exported:
```
rabbitmq_amqp_address:module_info(exports).
[{exchange,1},
 {exchange,2},
 {queue,1},
 {module_info,0},
 {module_info,1}]
```
2025-06-12 12:12:53 +02:00
Arnaud Cogoluègnes e4db147f34
Merge pull request #14067 from rabbitmq/ci/tweak-oci-tags
ci: update project version in nightly OCI
2025-06-12 09:51:10 +00:00
Aitor Perez 5a83ec98b1
ci: nightly OCI project version without leading 'v'
The leading `v` in the PROJECT_VERSION is breaking some tests, that
expect to parse the version returned by the broker, without a leading
`v`.
2025-06-12 10:36:27 +01:00
David Ansari 1850ff1363 Avoid using the size/1 BIF
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Avoid using the size/1 BIF for performance critical code because
according to
https://whatsapp.github.io/erlang-language-platform/docs/erlang-error-index/w/W0050/
"The BIF is not optimized by the JIT".
2025-06-11 14:14:01 +02:00
Michael Klishin 1277a4b8b3
Merge pull request #14039 from rabbitmq/mqtt-test-deps
MQTT tests: start just required dependencies
2025-06-11 15:31:18 +04:00
Aitor Pérez Cedres 0942fd8723
Merge pull request #14061 from rabbitmq/ci/use-moving-tag
Add an additional tag to nightly OCI
2025-06-11 09:18:41 +00:00
Aitor Perez d304d98ac1
ci: build nightly with `{{branch_name}}-{{otp_version}}` tag 2025-06-11 10:08:22 +01:00
Diana Parra Corbacho d4148cd611 Mqtt test: Solve dependencies for web mqtt 2025-06-11 09:44:14 +02:00
Diana Parra Corbacho fdc5376d4f Mqtt tests: start just required dependencies
MQTT tests depend on a few plugins, which are just used in 1 or 2
suites each. These have caused issues in CI, triggering a bug in
rabbitmq_federation where the mirrored supervisor submits a transaction
while the cluster is being shut down. The transaction hangs and the
whole rabbitmq_mqtt job times out.

This bug has been addressed, however it is best to start just the required
plugins on each SUITE.
2025-06-11 09:44:14 +02:00
Michael Klishin 5140c1c81c
Merge pull request #14057 from rabbitmq/ct-plugins
CT broker helpers: use rabbitmq-plugins from the given node with a secondary umbrella
2025-06-11 11:30:22 +04:00
Jean-Sébastien Pédron f84828ec62
Merge pull request #14054 from rabbitmq/terminate-links-when-federation-plugins-stop
rabbitmq_*_federation: Stop links during plugin stop
2025-06-11 09:17:23 +02:00
Jean-Sébastien Pédron 033ab45664
rabbitmq_*_federation: Stop links during plugin stop
[Why]
Links are started by the plugins but put under the `rabbit` supervision
tree. The federation plugins supervision tree is empty unfortunately...

Links are stopped by a boot step executed by `rabbit`, as a concequence
of unregistering the plugins' parameters.

Unfortunately, links can be terminated if the channel, and implicitly
the connection stops. This happens when the `amqp_client` application
stops.

We end up with a race here:

* Because the federation plugins supervision trees are empty and the
  application stop functions barely stop the pg group (which doesn't
  terminate the group members), nothing waits for the links to stop.
  Therefore, `rabbit` can stop `amqp_client' which is a dependency of
  the federation plugins. Therefore, the links underlying channels and
  connections are stopped.

* `rabbit` unregister the federation parameters, terminating the links.
  The exchange links `terminate/2` function needs the channel to delete
  the remote queue. But the channel and the underlying connection might
  be gone.

This simply logs a `badmatch` exception:

    [error] <0.884.0> Federation link could not create a disposable (one-off) channel due to an error error: {badmatch,
    [error] <0.884.0>                                                                                         {error,
    [error] <0.884.0>                                                                                          {noproc,
    [error] <0.884.0>                                                                                           {gen_server,
    [error] <0.884.0>                                                                                            call,
    [error] <0.884.0>                                                                                            [<0.911.0>,
    [error] <0.884.0>                                                                                             {command,
    [error] <0.884.0>                                                                                              {open_channel,
    [error] <0.884.0>                                                                                               none,
    [error] <0.884.0>                                                                                               {amqp_selective_consumer,
    [error] <0.884.0>                                                                                                []}}},
    [error] <0.884.0>                                                                                             130000]}}}}

[How]
The solution is to make sure links are stopped as part of the stop of
the plugins.

`rabbit_federation_pg:stop_scope/1` is expanded to stop all members of
all groups in this scope, before terminating the pg scope itself. The
new code waits for the stopped processes to exit.

We have to handle the `EXIT` signal in the link processes and change
their restart strategy in their parent supervisor from permanent to
transient. This ensures they are restarted only if they crash. This also
skips a error log message about each stopped link.
2025-06-11 08:21:42 +02:00
David Ansari 50e5fc77bb Avoid unnecessary list allocation
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Avoid unnecessary list allocation for every message being sent to a
classic queue.
2025-06-10 18:46:02 +02:00
Diana Parra Corbacho e1d71b185c CT broker helpers: use rabbitmq-plugins from the given node with a secondary umbrella 2025-06-10 18:14:30 +02:00
Michael Klishin 87a1a0208c
Merge pull request #14051 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-f31e853040
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
2025-06-08 13:56:01 +04:00
dependabot[bot] 9740accaf3
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-07 18:35:18 +00:00
David Ansari 796508f648 Disable eqwalizer
See
https://whatsapp.github.io/erlang-language-platform/docs/get-started/configure-project/elp-toml/#eqwalizer

The RabbitMQ code base is full of errors with eqwalizer enabled, which makes elp unusable.
2025-06-07 14:34:14 +02:00
David Ansari eccf9fee1e Run Quorum Queue property test on different OTP versions
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
## What?

PR #13971 added a property test that applies the same quorum queue Raft
command on different quorum queue members on different Erlang nodes
ensuring that the state machine ends up in exaclty the same state.
The different Erlang nodes run the **same** Erlang/OTP version however.

This commit adds another property test where the different Erlang nodes
run **different** Erlang/OTP versions.

 ## Why?

This test allows spotting any non-determinism that could occur when
running quorum queue members in a mixed version cluster, where mixed
version means in our context different Erlang/OTP versions.

 ## How?

CI runs currently tests with Erlang 27.

This commit starts an Erlang 26 node in docker, specifically for the
`rabbit_fifo_prop_SUITE`.

Test case `two_nodes_different_otp_version` running Erlang 27 then transfers
a few Erlang modules (e.g. module `rabbit_fifo`) to the Erlang 26 node.
The test case then runs the Ra commands on its own node in Erlang 27 and
on the Erlang 26 node in Docker.

By default, this test case is skipped locally.
However, to run this test case locally, simply start an Erlang node as
follows:
```
erl -sname rabbit_fifo_prop@localhost
```
2025-06-06 17:08:28 +02:00
Michael Klishin 724338e632
Merge pull request #14033 from rabbitmq/rabbitmq-server-13973-2
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Fix issue introduced by #13512
2025-06-06 10:25:48 +04:00
Michael Klishin d5cdcd95b1
Correct a 4.1.1 release notes typo
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
2025-06-05 16:46:41 +04:00
Aitor Pérez Cedres dc276d54ed
Merge pull request #14036 from rabbitmq/ci/nightly-oci
CI: workflow to build container image nightly
2025-06-05 12:38:50 +00:00
Michael Klishin 1a4f0ff905
Shorter 4.1.1 release notes 2025-06-05 16:30:13 +04:00
Luke Bakken ca15fa70f7
Run `prettier` on title.js 2025-06-04 15:07:23 -07:00
Luke Bakken 1014183906 Fix issue introduced by #13512
Moves Sammy.Title plugin into its own file
2025-06-04 15:04:31 -07:00
Michael Klishin 71adabc2f3
Closes #14032
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
2025-06-05 01:29:07 +04:00
Michael Klishin 4874ab5355
Fix a 4.1.1 release notes typo 2025-06-05 01:27:31 +04:00
Michael Klishin 2c7ebd4425
4.1.1 release notes 2025-06-05 01:24:01 +04:00
Michael Klishin 0c5b3da55a
Expand #13947 to web_mqtt and web_stomp 2025-06-04 21:34:52 +04:00
Michael Klishin 5a29e29909
Merge pull request #14031 from rabbitmq/add-missing-test
Add missing test
2025-06-04 20:58:17 +04:00
David Ansari 98d6973b01 Add missing test
Follow up of https://github.com/rabbitmq/rabbitmq-server/pull/14006
2025-06-04 18:37:55 +02:00
Aitor Perez 4f35561ed6
ci: build nightly OCI image
It's a middle ground between building on every commit, and not building
at all. We currently have a workflow to build the OCI on every PR.
However, building on every PR does not cover some use cases. For
example, providing an image to a user to preview some changes coming in
the next minor or patch. Another use case: compare main with a PR in
Kubernetes.

It's better to have a separate workflow, even at the expense of
duplication, because the "on schedule" trigger only runs on the default
branch of the repository. This "limitation" makes it complicated to
extend the current "build OCI on PRs" to also build nightly for main and
release branches.
2025-06-04 17:03:25 +01:00
Michael Klishin 24464a6c9b
Propagate one more Web MQTT test #14006
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
2025-06-04 19:41:09 +04:00
Michael Klishin d8b3288857
Merge pull request #14006 from rabbitmq/delete-qos0-queue
Delete mqtt qos0 queue when mqtt 5.0 connection is closed
2025-06-04 18:49:18 +04:00
Michael Klishin ae9e1953fc
Trailing whitespace 2025-06-04 18:48:47 +04:00
Michael Klishin 69baf91df6
MQTT: correct a comment in v5_SUITE #14006 2025-06-04 18:30:31 +04:00
Marcial Rosales bc7a8be85a Move test to v5
because it is a feature exclusive of v5
2025-06-04 16:14:46 +02:00
Michael Klishin 3a086e8e78
rabbitmqadmin v1 suite: nuke an environment-sensitive test
(cherry picked from commit bc8c5fc6ab7805a7627771bef70e0f4208da264a)
2025-06-04 17:29:35 +04:00
Michael Klishin 7b42dd7dae
Merge pull request #14023 from rabbitmq/rabbitmq-server-13958-round-2
Wrap TLS options password into a function in more places
2025-06-04 15:17:02 +04:00
Michael Klishin 74317c76f9
Merge pull request #14026 from rabbitmq/issue-13785_followup
MQTT: send acks before disconnecting consumer
2025-06-04 15:16:52 +04:00
Diana Parra Corbacho 607b1fda72 MQTT: send acks before disconnecting consumer 2025-06-04 12:17:52 +02:00
David Ansari 21b6088f00 Skip failing QQ leader locator test
For test case leader_locator_balanced the actual leaders elected were
nodes 1, 3, 1 because they know about machine version 6 while node 2
only knows about machine version 5.
2025-06-04 11:16:42 +02:00
David Ansari 2f78318ee3 Apply Ra commands on different nodes
This commit adds a property test that applies the same Ra commands in
the same order on two different Erlang nodes. The state in which both nodes end
up should be exactly the same.

Ideally, the two nodes should run different OTP versions because this
way we could test for any non-determinism across OTP versions.

However, for now, having a test with both nodes having the same OTP
verison is good enough because running this test with rabbit_fifo
machine version 5 fails while machine version 6 succeeds.

This reveales another interesting: The default "undefined" map order can
even be different using different Erlang nodes with the **same** OTP
version.
2025-06-04 11:16:42 +02:00
David Ansari 2db48432d9 Make map operations deterministic in quorum queues
Prior to this commit map iteration order was undefined in quorum queues
and could therefore be different on different versions of Erlang/OTP.

Example:

OTP 26.2.5.3
```
Erlang/OTP 26 [erts-14.2.5.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Eshell V14.2.5.3 (press Ctrl+G to abort, type help(). for help)
1> maps:foreach(fun(K, _) -> io:format("~b,", [K]) end, maps:from_keys(lists:seq(1, 33), ok)).
4,25,8,1,23,10,7,9,11,12,28,24,13,3,18,29,26,22,19,2,33,21,32,20,17,30,14,5,6,27,16,31,15,ok
```

OTP 27.3.3
```
Erlang/OTP 27 [erts-15.2.6] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Eshell V15.2.6 (press Ctrl+G to abort, type help(). for help)
1> maps:foreach(fun(K, _) -> io:format("~b,", [K]) end, maps:from_keys(lists:seq(1, 33), ok)).
18,4,12,19,29,13,2,7,31,8,10,23,9,15,32,1,25,28,20,6,11,17,24,14,33,3,16,30,21,5,27,26,22,ok
```

This can lead to non-determinism on different members. For example, different
members could potentially return messages in a different order.

This commit introduces a new machine version fixing this bug.
2025-06-04 11:16:42 +02:00
David Ansari f293c11a04 Remove unused function 2025-06-04 11:16:42 +02:00
Diana Parra Corbacho 081dee8883 Tests: sort nested proplists 2025-06-04 11:12:14 +02:00
Marcial Rosales 57ef5ea64f Delete mqtt qos0 when connection closes 2025-06-04 10:49:19 +02:00
Michael Klishin 61dcfd5fa6
Use the standard 'undefined' here 2025-06-04 12:31:27 +04:00
Michael Klishin e9fc656241
Wrap TLS options password into a function in more places
A follow-up to #13958 #13999.

Pair: @dcorbacho.
2025-06-04 12:24:45 +04:00
Michael Klishin f7a238a8f4
Merge pull request #13981 from rabbitmq/selenium-test-mqtt-queue
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Management UI: fix MQTT qos0 queue [type] rendering
2025-06-03 19:16:24 +04:00
David Ansari 3f6211cda1 Address review of PR #13996 2025-06-03 16:33:14 +02:00
Marcial Rosales cc86ffe30a
Fix issue around rendering a mqtt qos0 queue 2025-06-03 16:40:55 +04:00
Michael Klishin 8e78c102c6
Merge pull request #14017 from rabbitmq/ci/tweak-selenium-triggers
Adjust triggers for Selenium workflow
2025-06-03 16:38:26 +04:00
D Corbacho 63df5f0945
Merge pull request #14018 from rabbitmq/fix-error-handling-in-mirrored_supervisor
mirrored_supervisor: Rework error handling after a failed update
2025-06-03 14:30:17 +02:00
Jean-Sébastien Pédron 376dd2ca60
mirrored_supervisor: Rework error handling after a failed update
[Why]
The retry logic I added in 4621fe7730
was completely wrong. If Khepri reached its own timeout of 30 seconds (as
of this writing), the mirrored supervisor would retry 50 times because
it would not check the time spent. This means it would retry for 25
minutes. Nice.

That retry would be terminated forcefully by the parent supervisor after
5 minutes if it was part of a shutdown.

[How]
This time, the code simply pass the error (timeout or something else)
down to the following `case`. It will shut the mirrored supervisor down.

This fixes very long RabbitMQ node termination (at least 5 minutes,
sometimes more) in testsuites. An example to reproduce:

    gmake -C deps/rabbitmq_mqtt \
      RABBITMQ_METADATA_STORE=khepri \
      ct-v5 t=cluster_size_3:session_takeover_v3_v5

In this one, the third node of the cluster will take 5+ minutes to stop.
2025-06-03 12:23:18 +02:00
Aitor Perez 40fcc1cdf3
ci: fix indentation in selenium workflow
From #14014, we learned that the indentation was causing workflows to
not trigger. However, this did not seem to affect when the workflow file
itself was changed. In any case, YAML is sensible to indentation,
therefore this change is 'correct'. Removing single quotes from paths
with '*' at the end, because it is not required according to YAML and
GitHub documentation.

The path triggers now match the Selenium workflow that runs on commits
to main and release branches.
2025-06-03 11:03:46 +01:00
Michael Klishin f882a28c71
Merge pull request #13996 from rabbitmq/issue-13785
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
MQTT: disconnect consumer when queue is deleted
2025-06-03 08:51:19 +04:00
Michael Klishin b48ab7246d
Revert "REVERT try ubuntu 22.04"
This reverts commit 5a0260440539a7e350d410f8f046164d582cd7f0.
2025-06-03 00:40:04 +04:00
Diana Parra Corbacho 610c83867e
REVERT try ubuntu 22.04 2025-06-03 00:40:04 +04:00
Diana Parra Corbacho d91c9d61d4
web_mqtt: propagate notify_consumer_quorum/qos0_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
Michael Klishin 9eaa22066b
web_mqtt: propagate notify_consumer_classic_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
Diana Parra Corbacho bf468bdd52
MQTT: disconnect consumer when queue is deleted
Queues are automatically declared for MQTT consumers, but they can be externally
deleted. The consumer should be disconnected in such case, because it has no way
of knowing this happened - from its perspective there are simply no messages to consume.

In RabbitMQ 3.11 the consumer was disconnected in such situation.
This behaviour changed with native MQTT, which doesn't use AMQP internally.
2025-06-03 00:40:04 +04:00
Michael Klishin 2b2e4d4716
Merge pull request #14000 from rabbitmq/test-sac-with-priorities
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test SAC with priority consumers
2025-06-03 00:38:00 +04:00
Michael Klishin 8b7067d999
Merge branch 'main' into test-sac-with-priorities 2025-06-02 23:48:36 +04:00
Michael Klishin 797e54330b
Merge pull request #14007 from rabbitmq/backpressure-flake
Remove AMQP backpressure test expectation
2025-06-02 23:00:12 +04:00
David Ansari 0c391a52d3 Remove AMQP backpressure test expectation
Test case `tcp_back_pressure_rabbitmq_internal_flow_quorum_queue` succeeds
consistently locally on macOS and fails consistently in CI since 30 May
2025.

CI also shows a test failure instance of `tcp_back_pressure_rabbitmq_internal_flow_classic_queue`, albeit much rearer.

This test case succeeds in CI when using ubuntu-22.04 but fails with ubuntu-24.04.
Even before 30 May 2025, ubuntu-24.04 was used. However the GitHub runner
version was updated from Version: 20250511.1.0 to Version: 20250527.1.0
which presumably started to cause this test to fail.
This hypothesis cannot be validated because the GitHub actions
definitions YAML file doesn't provide a means to configure this version.

File `images/ubuntu/Ubuntu2404-Readme.md` in https://github.com/actions/runner-images/compare/ubuntu24/20250511.1...ubuntu24/20250527.1 shows the diff.
The most notable changes are probably the kernel version change from Kernel Version: 6.11.0-1013-azure to Kernel Version: 6.11.0-1015-azure and some changes to file `images/ubuntu/scripts/build/configure-environment.sh`

There seem to be no RabbitMQ related changes causing this test to fail
because this test also fails with an older RabbitMQ version with the new runner
Version: 20250527.1.0.

Neither `meck` nor `inet:setopts(Socket, [{active, once}])` cause the
test failure because the test also fails with the former
`erlang:suspend_process/1` and `erlang:resume_process/1`.

The test fails due to the following timeout in the writer proc on the
server:
```
** Last message in was {'$gen_cast',
                           {send_command,<0.760.0>,0,
                               {'v1_0.transfer',
                                   {uint,3},
                                   {uint,2211},
                                   {binary,<<0,0,8,162>>},
                                   {uint,0},
                                   true,undefined,undefined,undefined,
                                   undefined,undefined,undefined},
                               <<"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">>}}
** When Server state == #{pending => 3510,socket => #Port<0.49>,
                          reader => <0.755.0>,
                          monitored_sessions => [<0.760.0>],
                          pending_size => 3510}
** Reason for termination ==
** {{writer,send_failed,timeout},
    [{rabbit_amqp_writer,flush,1,
                         [{file,"src/rabbit_amqp_writer.erl"},{line,250}]},
     {rabbit_amqp_writer,handle_cast,2,
                         [{file,"src/rabbit_amqp_writer.erl"},{line,106}]},
     {gen_server,try_handle_cast,3,[{file,"gen_server.erl"},{line,2371}]},
     {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,2433}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,329}]}]}
```

For unknown reasons, even after the CT test case resumes consumption,
the server still times out writing to the socket.

The most important test expectation that is kept in place is that the
server won't send all the messages if the client can't receive fast
enough.
2025-06-02 19:35:35 +02:00
Michael Klishin e19d2b0163
Merge pull request #13941 from rabbitmq/feature-13894
Oauth2: Support variable expansion when checking resource access
2025-06-02 21:30:49 +04:00
Michael Klishin 50c095d25a
Merge pull request #14003 from rabbitmq/fix-federation
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Federation: move ETS initialisation to supervisor
2025-06-02 18:29:20 +04:00
Marcial Rosales bd037a1699 Verify previous active consumer is waiting 2025-06-02 15:38:49 +02:00
Diana Parra Corbacho 6ccdd9ce80 Federation: move ETS initialisation to supervisor
Events can be received after the boot step but before the application
is started. Creating the ETS in the supervisor solves this, as it is
started just before the event handler is installed.
2025-06-02 15:30:02 +02:00
Michael Klishin 034ef2c99c
Merge pull request #13999 from rabbitmq/mk-pass-in-tls-certificate-password-as-a-function
TLS listener startup: wrap private key password option into a function
2025-06-02 16:32:48 +04:00
Michael Klishin 67ee867a7c
Improve rabbit_ssl:wrap_password_opt/1 tests 2025-06-02 15:25:42 +04:00
Michael Klishin 9931386f05
Add unit_rabbit_ssl to CT parallel set 1A 2025-06-02 15:21:53 +04:00
Michael Klishin 30c32ee502
Use rabbit_ssl:wrap_password_opt in relevant places
We do it at the latest possible moment to not break
encrypted value support in 'rabbitmq.conf' files.

See #13998 for context.

Closes #13958.
2025-06-02 15:18:35 +04:00
Michael Klishin 08a74dadd9
Merge pull request #13994 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-507952ce20
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
2025-06-01 11:24:00 +04:00
Michael Klishin dbf62b20ca
Merge pull request #13995 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-6214df9cac
[skip ci] Bump the prod-deps group across 4 directories with 1 update
2025-06-01 11:23:46 +04:00
dependabot[bot] 506d670b80
[skip ci] Bump the prod-deps group across 4 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 19:01:01 +00:00
dependabot[bot] a0cec40783
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 19:00:08 +00:00
Loïc Hoguin 0278980ba0
CQ shared store: Delete from index on remove or roll over (#13959)
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
It was expensive to delete files because we had clean up
the index and to get the messages in the file we have to
scan it.

Instead of cleaning up the index on file delete this
commit deletes from the index as soon as possible.
There are two scenarios: messages that are removed
from the current write file, and messages that are
removed from other files. In the latter case, we
can just delete the index entry on remove. For messages
in the current write file, we want to keep the entry
in case fanout is used, because we don't want to write
the fanout message multiple times if we can avoid it.
So we keep track of removes in the current write file
and do a cleanup of these entries on file roll over.

Compared to the previous implementation we will no
longer increase the ref_count of messages that are
not in the current write file, meaning we may do more
writes in fanout scenarios. But at the same time the
file delete operation is much cheaper.

Additionally, we prioritise delete calls in rabbit_msg_store_gc.
Without that change, if the compaction was lagging behind,
we could have file deletion requests queued behind many compaction
requests, leading to many unnecessary compactions of files
that could already be deleted.

Co-authored-by: Michal Kuratczyk <michal.kuratczyk@broadcom.com>
2025-05-30 17:51:08 +02:00
Michael Klishin 795e66c663
Merge pull request #13979 from cloudamqp/tls-handshake-logging
Log TCP acceptor (Ranch) timeout and TLS [handshake-related] errors
2025-05-30 18:28:07 +04:00
Michael Klishin fb3b00e8e2
TLS listener startup: wrap private key password option into a function 2025-05-30 16:39:42 +04:00
LoisSotoLopez 2cdf6f8803
Merge branch 'main' into tls-handshake-logging 2025-05-30 11:45:24 +02:00
Lois Soto Lopez 3a5dc94eb4 Apply PR suggestions 2025-05-30 09:51:24 +02:00
Michael Klishin 8806e56fdd
Merge pull request #13977 from rabbitmq/fix-warning-formatting
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
[skip ci] Fix plugin version warning formatting
2025-05-29 18:08:33 +04:00
Lois Soto Lopez 94d93a84d3 Log ranch timeout and tls errors 2025-05-29 15:25:43 +02:00
Michal Kuratczyk b9c38560c1
[skip ci] Fix plugin version warning formatting
This doesn't fail the test, but shows up
as a end_per_testcase failure.

https://github.com/rabbitmq/rabbitmq-server/actions/runs/15322789846/job/43110071803?pr=13959
2025-05-29 14:23:34 +02:00
Marcial Rosales efcbde4f34 Add missing id tag 2025-05-29 09:27:26 +02:00
Marcial Rosales c73fdf79ff Remove log statement 2025-05-29 09:02:29 +02:00
Marcial Rosales 1d942027a9 Add system test for variable expansion 2025-05-29 09:02:29 +02:00
Marcial Rosales 0023ba2a01 Add var expansion to vhost and resource access 2025-05-29 09:02:29 +02:00
Michael Klishin b09e2f2dad
Merge pull request #13970 from rabbitmq/stream-plugin-emit-consumer-deleted
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Always emit consumer_deleted event when stream consumer goes away
2025-05-29 10:24:18 +04:00
Michael Klishin 3c4fc996e4
Merge pull request #13972 from rabbitmq/md/clear-auth-session-on-expiry
Clear management auth storage when redirecting to login
2025-05-29 09:57:24 +04:00
Michael Klishin e0a79f3f1e
Merge pull request #13963 from rabbitmq/selenium-use-var-over-tmp
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Selenium: minor refactoring
2025-05-28 22:13:21 +04:00
Michael Davis 2a1b65df17
Clear management auth storage when redirecting to login
This branch redirects the client to the login page when the cookie
expires. To complete the logout process we should also clear any auth
data stored in local storage: local storage has no built-in expiration
mechanism.

To test this locally you can use `make run-broker`, set the session
timeout to one minute for quick testing:

    application:set_env(rabbitmq_management, login_session_timeout, 1)

go to the management page (`http://localhost:15672/#/`), login with
default credentials and wait a minute. After this change the local
storage only contains info like `rabbitmq.vhost` and `rabbitmq.version`.
2025-05-28 12:42:53 -04:00
Arnaud Cogoluègnes 52c89ab7a3
Always emit consumer_deleted event when stream consumer goes away
Not only when it is removed explicitly by the client. This is necessary
to make sure the consumer record is removed from the management ETS
tables (consumer_stats) and to avoid ghost consumers.

For other protocols like AMQP 091, the consumer_status ETS table is
cleaned up when a channel goes down, but there is no channel concept in
the stream protocol.

This is not consistent with other protocols or queue implementations
(which emits the event only on explicit consumer cancellation)
but is necessary to clean up stats correctly.

References #13092
2025-05-28 17:10:50 +02:00
Marcial Rosales 94cba43e75 Relocate temp folder from /tmp to /var 2025-05-28 13:01:46 +02:00
Michael Klishin 924b451b73
Merge pull request #13964 from rabbitmq/ik-qq-tests-reorg
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Refactor QQ tests slightly so useful parts are accessible elsewhere
2025-05-28 13:30:58 +04:00
Michael Klishin 49341b71ec
Merge pull request #13950 from rabbitmq/fix-13045
Selenium: Verify consumer state when using SAC
2025-05-28 11:52:12 +04:00
Iliia Khaprov 0c01e0b30f
Refactor rabbit/test/queue_utils to support other Ra-based queue types 2025-05-27 18:07:44 +02:00
Iliia Khaprov 76a5531d8c
Move test_utils.erl from rabbit to rabbitmq_ct_helpers
fake_pid function is useful for other plugins
2025-05-27 18:06:59 +02:00
Marcial Rosales 09fc5357a7 Fix credentials used to create vhost 2025-05-27 16:05:55 +02:00
Marcial Rosales a92242918b Stop page refresh
To prevent state element exception
2025-05-27 15:41:30 +02:00
Marcial Rosales 98061c8e96 Fix typo 2025-05-27 15:19:13 +02:00
Michael Klishin 7b1691dc67
Merge pull request #13921 from rabbitmq/split-federation
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Split federation plugin
2025-05-27 16:03:15 +04:00
Marcial Rosales 23eb9854ee Test SAC with consumres w/o priorities 2025-05-27 14:00:18 +02:00
Marcial Rosales 870c66734b Use different way to parse tables for consuers 2025-05-27 14:00:18 +02:00
Marcial Rosales 8960d19492 Apply patch that addresses the issue with SAC
And improve how to parse a html table to
extract its rows
2025-05-27 14:00:18 +02:00
Marcial Rosales d2767983dc Reproduce issue 2025-05-27 14:00:18 +02:00
Marcial Rosales 4fdbcb33e1 Add amqplib
Required to subscribe with a priority in the arguments
which is only possible in AMQP 0.9.1
2025-05-27 14:00:18 +02:00
Marcial Rosales 586a946213 Remove log statements 2025-05-27 14:00:18 +02:00
Marcial Rosales 70ec8dffdd Selenium test with SAC 2025-05-27 14:00:18 +02:00
Diana Parra Corbacho 4f86ae00ad Skip exchange federation testscase in mixed-version 2025-05-27 07:55:30 +02:00
Diana Parra Corbacho 597fb419f3 Update rabbitmq_cli federation test dependency 2025-05-27 07:55:29 +02:00
Diana Parra Corbacho 1616b7f295 Update Github workflows with new federation plugins 2025-05-27 07:55:29 +02:00
Diana Parra Corbacho a501a2c795 Make rabbitmq_federation a no-op plugin 2025-05-27 07:55:29 +02:00
Diana Parra Corbacho 74dfa06c29 Split rabbitmq_federation: rabbitmq_queue_federation, rabbitmq_exchange_federation and rabbitmq_federation_common 2025-05-27 07:55:29 +02:00
Michael Klishin 4c34155886
Merge pull request #13947 from rabbitmq/ik-rabbit_ct_hook
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Run rabbit_ct_hook before cth_styledout so that removing default logger handler works
2025-05-26 21:03:06 +04:00
Iliia Khaprov 6b528e2caf
Replace ct:pal with ct:log in select places 2025-05-26 16:57:41 +02:00
Iliia Khaprov 8512a4459b
Hardcode rabbit_ct_hook and cth_styledout inside our ct_master_fork.
Helps cleaning-up/coloring stdout for parallel targets
TODO: there are obvious races for different nodes outputs
In the next iteration I hope to implement cursor tracking for each node
2025-05-26 16:57:40 +02:00
Iliia Khaprov 8dcad8a4fd
Run rabbit_ct_hook for management, and mqtt 2025-05-26 16:57:40 +02:00
Iliia Khaprov - VMware by Broadcom 5ed2fbe2b6
Merge pull request #13955 from rabbitmq/ik-qq-reconciliation-followup
QQ Reconciliator - implement handle_info/2 for the event subscriber
2025-05-26 16:09:02 +02:00
Iliia Khaprov 458dc89614
QQ Reconciliator - implement handle_info/2 for the event subscriber to avoid warnings 2025-05-26 14:43:32 +02:00
Michael Klishin 7289487702
Merge pull request #13946 from rabbitmq/ik-qq-reconiliation
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
QQ member reconciliation: switch to gen_event events instead of hardcoded triggers
2025-05-26 08:13:28 +04:00
Iliia Khaprov 77477dee6e
Run rabbit_ct_hook before cth_styledout, so that default logger handler properly removed
As a follow-up to my GChat thread about removing default logger handler to clean CT stdout, I was looking at
injecting logger config with undefined default handler to ct_run. It is possible but breaks cth_styledout - no
nice green things whatsoever. Then I found rabbit_ct_hook which calls redirect_logger_to_ct_logs which in turn
calls logger:remove_handler(default) apparently with zero effect! To cut story short - turned out rabbit_ct_hook
must run before cth_styledout for remove_handler line to have any effect
2025-05-25 18:59:40 +02:00
Michael Klishin a71d0f93d0
More test comment wording 2025-05-25 14:44:03 +04:00
Michael Klishin 940e58c051
Test comment wording 2025-05-25 14:42:01 +04:00
Michael Klishin b527fc31ed
Merge pull request #13942 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-801db9dc1e
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-05-25 13:29:59 +04:00
Iliia Khaprov 1e4460459a
QQ Reconciliator - add comments to SUITE, add new group for explicit triggers tests 2025-05-24 23:56:11 +02:00
Iliia Khaprov d47d7f9160
QQ Reconciliator - switch to Logger 2025-05-24 23:34:46 +02:00
Iliia Khaprov 8ea452d54f
QQ Reconciliator - move hardcoded triggers to events subscription 2025-05-24 23:34:46 +02:00
dependabot[bot] 395d3fd04c
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.5 to 3.5.0
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.5...v3.5.0)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.5 to 3.5.0
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.5...v3.5.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-24 18:14:17 +00:00
Michael Klishin 5f1bef6141
Merge pull request #13548 from rabbitmq/rabbitmq-server-13175-mk
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
For 4.1.x, by @aaron-seo: introduce a command that would force QQs to take a checkpoint and truncate its segments
2025-05-23 07:11:40 +04:00
Michael Klishin bf8fd69ba4
Merge pull request #13932 from cloudamqp/cq_index_v2_bounds_test
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Add tests for rabbit_classic_queue_index_v2:bounds/2
2025-05-23 06:05:59 +04:00
Michael Klishin 87b966ef0c
Merge pull request #13930 from rabbitmq/ik-observer-cli-plugins-as-boot-steps
Add CQ and QQ Observer CLI plugins from boot steps
2025-05-23 05:07:03 +04:00
Michael Klishin 510d2ca0ab
Merge pull request #13931 from rabbitmq/fix-selenium-issue
Fix selenium issue closing popup warning dialog since recent upgrade
2025-05-23 03:22:44 +04:00
Diana Parra Corbacho 0c2b6a1cb3 Force checkpoint in all members 2025-05-22 15:52:41 +02:00
Michael Klishin 7d3292cedd quorum_queue_SUITE: keep Raft state logging in force_checkpoint_on_queue 2025-05-22 15:09:57 +02:00
Michael Klishin d17b085653 Quorum queue machine: do not publish certain state records
we can use log state in tests.
2025-05-22 15:09:55 +02:00
Michael Klishin d54fee2e7a Update a #13175 test to not use private Ra machine state
(cherry picked from commit e49acf956c806849068f543f282683978ca5a385)
2025-05-22 15:09:25 +02:00
Aaron Seo 6a78e9f7ba Add timeout to rpc call for force_checkpoint
(cherry picked from commit 4439150e50)
2025-05-22 15:09:25 +02:00
Aaron Seo fa310864d7 Fix force_checkpoint tests and CLI command
(cherry picked from commit 12bf3e094e)

Conflicts:
	deps/rabbit/src/rabbit_quorum_queue.erl
2025-05-22 15:09:23 +02:00
Aaron Seo 0d3dfd9695 Add force checkpoint functions for quorum queues and command line tool
(cherry picked from commit b54ab1d5e5)
2025-05-22 14:58:12 +02:00
Péter Gömöri ec455d5cff Fix comment about CQ v1->v2 index recovery 2025-05-22 14:05:44 +02:00
Péter Gömöri 55e3c458c2 Add tests for rabbit_classic_queue_index_v2:bounds/2 2025-05-22 14:05:44 +02:00
Iliia Khaprov 2d029649a2
Add CQ and QQ Observer CLI plugins from boot steps
Do not hard code them, also preserve user-provided plugins list
Type fix by @kura
2025-05-22 10:58:35 +02:00
Marcial Rosales 27b3e21554 Fix issue related to popup warning
And in particular locating the span#close button
2025-05-22 10:08:22 +02:00
Michael Klishin 6dd7447b92
Merge pull request #13929 from rabbitmq/queue-checks
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Use more idiomatic `maybe` feature
2025-05-21 21:51:43 +04:00
Michael Klishin dfa06d91ca
Merge pull request #13928 from rabbitmq/sac-policy
Delete single-active-consumer policy
2025-05-21 19:59:18 +04:00
David Ansari 3189686510 Add maybe_expr feature for OTP 26
GitHub action Build and Xref on OTP 26 errored with:
```
src/rabbit_quorum_queue.erl:252:9: syntax error before: ok
%  252|         ok ?= rabbit_queue_type_util:check_auto_delete(Q),
%     |         ^
```
2025-05-21 17:48:51 +02:00
David Ansari 4a3752a87f Use more idiomatic `maybe` feature 2025-05-21 17:32:04 +02:00
David Ansari 90e7e1065c Delete single-active-consumer policy
`single-active-consumer` shouldn't be listed under `unsupported_policies` for quorum
queues and streams because it isn't a valid policy in the first place, see
https://www.rabbitmq.com/docs/consumers#sac-cannot-be-enabled-with-a-policy
2025-05-21 17:11:16 +02:00
Michael Klishin 1679d0ced0
Merge pull request #13925 from rabbitmq/bump-up-chromedriver
Bump up chrome driver
2025-05-21 18:21:52 +04:00
Michael Klishin 6e0ba8e9ff
Merge pull request #13924 from rabbitmq/remove-unused-channel-field
Remove unused field in channel record.
2025-05-21 18:20:20 +04:00
Marcial Rosales a028db8156 Briefly explain how to start a second rabbitmq server
interactively
2025-05-21 15:50:29 +02:00
Marcial Rosales 44dd282ed4 Eliminate flake around listing live amqp connections 2025-05-21 15:15:35 +02:00
Marcial Rosales 6578c83a0e Bump up chrome driver
This is needed when running tests interactively.
The OS updates the local chrome binary and this
node.js library has to be upgraded too.
2025-05-21 14:10:30 +02:00
Karl Nilsson 542c0fe512 Remove unused field in channel record. 2025-05-21 09:22:36 +01:00
Michael Klishin 8199c0f401
Merge pull request #13920 from rabbitmq/md/prop-ra-indexes
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Add a proptest checking `ra_indexes` indices
2025-05-21 00:55:44 +04:00
Michael Davis 01b4051b03
Add a proptest checking `ra_indexes` indices
This is mostly the same as the `messages_total` property test but checks
that the Raft indexes in `ra_indexes` are the set of the indexes checked
out by all consumers union any indexes in the `returns` queue. This is
the intended state of `ra_indexes` and failing this condition could
cause bugs that would prevent snapshotting.
2025-05-20 10:34:18 -04:00
David Ansari 8546bcfecd
Merge pull request #13918 from rabbitmq/amqp-durable
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Follow AMQP spec for durable field
2025-05-20 13:20:55 +02:00
David Ansari 67895da04d Mention AMQP durable field in 4.2 release notes 2025-05-20 08:32:52 +02:00
David Ansari f8f1396c90 Follow AMQP spec for durable field
The AMQP spec defines:
```
<field name="durable" type="boolean" default="false"/>
```

RabbitMQ 4.0 and 4.1 interpret the durable field as true if not set.
The idea was to favour safety over performance.
This complies with the AMQP spec because the spec allows other target or
node specific defaults for the durable field:
> If the header section is omitted the receiver MUST assume the appropriate
> default values (or the meaning implied by no value being set) for the fields
> within the header unless other target or node specific defaults have otherwise
> been set.

However, some client libraries completely omit the header section if the
app expliclity sets durable=false. This complies with the spec, but it
means that RabbitMQ cannot diffentiate between "client app forgot to set
the durable field" vs "client lib opted in for an optimisation omitting
the header section".

This is problematic with JMS message selectors where JMS apps can filter
on JMSDeliveryMode. To be able to correctly filter on JMSDeliveryMode,
RabbitMQ needs to know whether the JMS app sent the message as
PERSISTENT or NON_PERSISTENT.

Rather than relying on client libs to always send the header section
including the durable field, this commit makes RabbitMQ comply with the
default value for durable in the AMQP spec.
Some client lib maintainers accepted to send the header section, while
other maintainers refused to do so:
https://github.com/Azure/go-amqp/issues/330
https://issues.apache.org/jira/browse/QPIDJMS-608

Likely the AMQP spec was designed to omit the header section when
performance is important, as is the case with durable=false. Omitting
the header section means saving a few bytes per message on the wire and
some marshalling and unmarshalling overhead on both client and server.

Therefore, it's better to push the "safe by default" behaviour from the broker
back to the client libs. Client libs should send messages as durable by
default unless the client app expliclity opts in to send messages as
non-durable. This is also what JMS does: By default JMS apps send
messages as PERSISTENT:
> The message producer's default delivery mode is PERSISTENT.

Therefore, this commit also makes the AMQP Erlang client send messages as
durable, by default.

This commit will apply to RabbitMQ 4.2.
It's arguably not a breaking change because in RabbitMQ, message durability
is actually more determined by the queue type the message is sent to rather than the
durable field of the message:
* Quroum queues and streams store messages durably (fsync or replicate)
  no matter what the durable field is
* MQTT QoS 0 queues hold messages in memory no matter what the
  durable field is
* Classic queues do not fsync even if the durable field is set to true

In addition, the RabbitMQ AMQP Java library introduced in RabbitMQ 4.0 sends messages with
durable=true:
53e3dd6abb/src/main/java/com/rabbitmq/client/amqp/impl/AmqpPublisher.java (L91)

The tests for selecting messages by JMSDeliveryMode relying on the
behaviour in this commit can be found on the `jms` branch.
2025-05-20 08:32:52 +02:00
Michael Klishin 4f1076d89c
Merge pull request #13916 from rabbitmq/otp28-fixes
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
OTP28: re:split change; street-address macro
2025-05-19 16:18:40 +04:00
Michal Kuratczyk 9fefcc4827
Remove rabbitmq_mqtt from DEPS (it's a TEST_DEP) 2025-05-19 09:40:05 +02:00
Michal Kuratczyk 637a2bc8cc
OTP28: re:split change; street-address macro
https://github.com/erlang/otp/issues/9739

In OTP28+, splitting an empty string returns an empty list, not an empty
string (the input).

Additionally `street-address` macro was removed in OTP28 - replace with
the value it used to be.

Lastly, rabbitmq_auth_backend_oauth2 has an MQTT test, so add
rabbitmq_mqtt to TEST_DEPS
2025-05-19 08:59:50 +02:00
Michael Klishin 4b714f4f7c
Merge pull request #13913 from rabbitmq/mk-ra-2.16.9
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Bump Ra to 2.16.9
2025-05-19 08:11:21 +04:00
Michael Klishin d68ca77ec5
Merge pull request #13912 from rabbitmq/mk-osiris-1.8.8
Bump Osiris to 1.8.8
2025-05-19 07:30:02 +04:00
Michael Klishin c2d6dee8e8
Bump Ra to 2.16.9 2025-05-18 23:26:46 -04:00
Michael Klishin 94575bc76d
Bump Osiris to 1.8.8 2025-05-18 22:46:40 -04:00
Michael Klishin 92a4d2c2ab
Merge pull request #13910 from rabbitmq/ik-queues-with-plugins-mgmt
Queues with plugins - Managment UI parts
2025-05-19 06:31:28 +04:00
Michael Klishin c29fc82158
Merge pull request #13909 from rabbitmq/ik-queue-protection-mgmt
Do not render Delete button for internal queues
2025-05-19 06:24:42 +04:00
Michael Klishin eb7634c678
Merge pull request #13905 from rabbitmq/ik-queues-with-plugins
Queues with plugins  - Core
2025-05-19 06:22:48 +04:00
Michael Klishin 551a300f78
Merge pull request #13903 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/dev-deps-5ac378ddf0
[skip ci] Bump the dev-deps group across 1 directory with 2 updates
2025-05-19 06:22:15 +04:00
Iliia Khaprov 180e7b1c1c
Queues with plugins - switch to get_queue_type in Management UI 2025-05-18 23:52:58 +02:00
Iliia Khaprov de17a77df4
Queues with plugins - Enable adding queues with plugins, Management UI 2025-05-18 23:52:58 +02:00
Iliia Khaprov 5fd3bddcfe
Protected queues - do not render Delete button for internal queues
with fix for rabbit_mgmt_wm_queue by MK
2025-05-18 23:50:53 +02:00
Iliia Khaprov bcdb0b7067
Queues with plugins - remove unused include form rabbit registry suite 2025-05-17 23:33:12 +02:00
Iliia Khaprov fd6b40c14a
Queues with plugins - adapt qos0 queue from MQTT plugin 2025-05-17 23:33:11 +02:00
Iliia Khaprov 3a33163d98
Queues with plugins - remove queue_topology callback 2025-05-17 23:33:11 +02:00
Iliia Khaprov 1eeaef4874
Queues with plugins - move is_(replicated->replicable) to capabilities 2025-05-17 23:33:11 +02:00
Iliia Khaprov 9ef170f4e7
Queues with plugins - short_alias_of spec fix 2025-05-17 20:48:14 +02:00
Iliia Khaprov c12c76ae45
Queues with plugins - sync with queue topologies updates 2025-05-17 20:48:09 +02:00
Iliia Khaprov 34f0d12dab
Queues with plugins - address Karl's comments
revive_local_queue_replicas -> revive_local_queue_members
can_redeliver converted from callback to capabilities key
rebalance_moduled converted from callback to capabilities key
2025-05-17 20:48:05 +02:00
Diana Parra Corbacho cfd51bac6c
Queues with plugins - fix rabbit_registry_SUITE 2025-05-17 20:48:00 +02:00
Iliia Khaprov 59701a0ea9
Queues with plugins - Diana's review 2025-05-17 20:47:55 +02:00
Diana Parra Corbacho 3f4fa167c5
Queues with plugins - tests, run amqqueue:to_printable in broker
It needs access to registry for the queue type
2025-05-17 20:47:49 +02:00
Iliia Khaprov e408c9e0f2
Queues with plugins - core 2025-05-17 20:47:43 +02:00
dependabot[bot] 988754ce85
[skip ci] Bump the dev-deps group across 1 directory with 2 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.


Updates `org.jetbrains.kotlin:kotlin-test` from 2.1.20 to 2.1.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.1.20...v2.1.21)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.1.20 to 2.1.21

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-17 18:40:58 +00:00
Michael Klishin abe306ed8e
Merge pull request #13899 from lukebakken/lukebakken/optional-deterministic-build
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Allow non-deterministic builds
2025-05-17 06:55:04 +04:00
Michael Klishin a0c6a0b41d
Merge pull request #13898 from rabbitmq/md/rabbit_mgmt_gc-memory
Improve memory use of `rabbit_mgmt_gc`
2025-05-17 03:58:44 +04:00
Luke Bakken eae657fc38
Allow non-deterministic builds
Building from source using this command:

```
make RMQ_ERLC_OPTS= FULL=1
```

... then starting RabbitMQ via `make run-broker`, allows re-compilation
from the erl shell:

```
1> c(rabbit).
Recompiling /home/lbakken/development/rabbitmq/rabbitmq-server/deps/rabbit/src/rabbit.erl
{ok,rabbit}
```

When `+deterministic` is passed to `erlc`, the `compile` data in each
modules' information is missing the source path for the module.

Follow-up to #3442
2025-05-16 12:45:19 -07:00
Michael Davis 5a32322778
rabbit_mgmt_gc: Switch from `gb_sets` to `sets` v2
`sets` v2 were not yet available when this module was written. Compared
to `gb_sets`, v2 `sets` are faster and more memory efficient:

    > List = lists:seq(1, 50_000).
    > tprof:profile(sets, from_list, [List, [{version, 2}]], #{type => call_memory}).

    ****** Process <0.94.0>  --  100.00% of total ***
    FUNCTION          CALLS   WORDS   PER CALL  [     %]
    maps:from_keys/2      1  184335  184335.00  [100.00]
                             184335             [ 100.0]
    ok
    > tprof:profile(gb_sets, from_list, [List], #{type => call_memory}).

    ****** Process <0.97.0>  --  100.00% of total ***
    FUNCTION                  CALLS   WORDS   PER CALL  [    %]
    lists:rumergel/3              1       2       2.00  [ 0.00]
    gb_sets:from_ordset/1         1       3       3.00  [ 0.00]
    lists:reverse/2               1  100000  100000.00  [16.76]
    lists:usplit_1/5          49999  100002       2.00  [16.76]
    gb_sets:balance_list_1/2  65535  396605       6.05  [66.48]
                                     596612             [100.0]
2025-05-16 14:23:24 -04:00
Michael Davis ce5d42a9d6
Hibernate after collecting garbage in `rabbit_mgmt_gc`
The `rabbit_mgmt_gc` gen_server performs garbage collections
periodically. When doing so it can create potentially fairly large
terms, for example by creating a set out of
`rabbit_exchange:list_names/0`. With many exchanges, for example, the
process memory usage can climb steadily especially when the management
agent is mostly idle since `rabbit_mgmt_gc` won't hit enough reductions
to cause a full-sweep GC on itself. Since the process is only active
periodically (once every 2min by default) we can hibernate it to GC the
terms it created.

This can save a medium amount of memory in situations where there are
very many pieces of metadata (exchanges, vhosts, queues, etc.). For
example on an idle single-node broker with 50k exchanges,
`rabbit_mgmt_gc` can hover around 50MB before being naturally GC'd. With
this patch the process memory usage stays consistent between `start_gc`
timer messages at around 1KB.
2025-05-16 14:16:58 -04:00
Aitor Pérez Cedres 98d1634ce3
Merge pull request #13890 from rabbitmq/tweak-oci-triggers
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
CI: tweak OCI workflow trigger
2025-05-13 16:49:13 +00:00
Michael Davis 314e4261fc
minor: Avoid flake in `rabbit_mgmt_http_health_checks_SUITE`
The `below_node_connection_limit_test` and `ready_to_serve_clients_test`
cases could possibly flake because `is_quorum_critical_single_node_test`
uses the channel manager in `rabbit_ct_client_helpers` to open a
connection. This can cause the line

     true = lists:all(fun(E) -> is_pid(E) end, Connections),

to fail to match. The last connection could have been rejected if the
channel manager kept its connection open, so instead of being a pid the
element would have been `{error, not_allowed}`.

With `rabbit_ct_client_helpers:close_channels_and_connection/2` we can
reset the connection manager and force it to close its connection.
2025-05-13 10:50:14 -04:00
Aitor Perez 4efb3df39e
CI: tweak OCI build triggers
Building on push to any branch is wasteful and unnecessary, because most
of built images are never used. The workflow dispatch trigger covers the
use case to build an image from the latest commit in a branch.

The use case to validate/QA a PR is now covered by on pull request
trigger. This trigger has a caveat: PRs from forks won't produce a
docker image.

Why?
Because PRs from forks do not inject rabbitmq-server secrets. This is a
security mechanism from GitHub, to protect repository secrets.

With this trigger is possible to QA/validate PRs from other Core team
members. Technically, anyone with 'write' access to our repo to push
branches.
2025-05-13 11:10:19 +01:00
Michael Davis 3e1fa7bee7
Merge pull request #13888 from rabbitmq/md/scrub-health-check-returns
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
2025-05-12 20:42:05 -04:00
Michael Davis 3f53e0172d
Remove connection counts and limits from public API health checks
Returning the connection limit and active count are not really necessary
for these checks. Instead of returning them in the response to the
health check we log a warning when the connection limit is exceeded.
2025-05-12 19:59:25 -04:00
Michael Klishin 8805cdd9bf
Merge pull request #13883 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-dd1c27f4c1
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Peer Discovery AWS Integration Test / Integration Test (push) Has been cancelled Details
[skip ci] Bump com.google.googlejavaformat:google-java-format from 1.26.0 to 1.27.0 in /deps/rabbit/test/amqp_jms_SUITE_data in the dev-deps group across 1 directory
2025-05-11 09:23:14 +04:00
dependabot[bot] 2365b94f98
[skip ci] Bump com.google.googlejavaformat:google-java-format
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).


Updates `com.google.googlejavaformat:google-java-format` from 1.26.0 to 1.27.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-10 18:16:48 +00:00
Michael Klishin d19e90685b
Merge pull request #13878 from rabbitmq/remove-selenium-flakes
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Wait until page is fully loaded
2025-05-09 22:46:49 +04:00
Michael Klishin 44cebf2d6d
Merge pull request #13879 from rabbitmq/md/health-check-ready-to-serve
Add health checks for testing readiness to serve clients
2025-05-09 22:46:11 +04:00
Michael Davis 67bdc011cb
Add a health check for testing readiness to serve clients 2025-05-09 11:36:07 -04:00
Michael Davis 028b69213e
Add a health check for testing the node connection limit 2025-05-09 11:28:11 -04:00
Marcial Rosales f79c7229d5 Wait until page is fully loaded 2025-05-09 14:27:32 +02:00
Michael Klishin 4f9a55baad
Merge pull request #13868 from rabbitmq/fix-selenium-issue-starting-others
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Fix selenium issues when running two rabbitmq
2025-05-08 21:45:05 +04:00
Michael Klishin a4afc2a44a
Merge pull request #13872 from rabbitmq/md/health-check-is-in-service
Add an 'is-in-service' health check wrapping `rabbit:is_serving/0`
2025-05-08 21:42:27 +04:00
Marcial Rosales 81cf5f2e46 Exclude other_rabbitmq when running start-others. And fix some issues 2025-05-08 18:29:54 +02:00
Michael Klishin 98ba31a381
Merge pull request #13871 from rabbitmq/md/health-check-multi-protocol-listener
Allow multiple protocols in protocol listener health check
2025-05-08 20:22:22 +04:00
Michael Davis 07fe6307c6
Add an 'is-in-service' health check wrapping `rabbit:is_serving/0`
This is useful for a load balancer, for example, to be able to avoid
sending new connections to a node which is running and has listeners
bound to TCP ports but is being drained for maintenance.
2025-05-08 11:11:52 -04:00
Michael Davis 5d319be3f9
Accept multiple protocols in protocol listener health check
This updates the health check for protocol listeners to accept a set of
protocols, comma-separated. The check only returns 200 OK when all
requested protocols have active listeners.
2025-05-08 11:01:59 -04:00
Michael Davis 0d692fa161
Prefer node-local listeners helper in protocol-listener health check
This is a minor change that avoids a cluster-wide query for active
listeners. The old code called `rabbit_networking:active_listeners/0`
and then filtered the results by ones available on the local node. This
caused an RPC and concatenation of all other cluster members' listeners
and then in the next line filtered down to local nodes. Equivalently we
can use `rabbit_networking:node_listeners(node())` which dumps a local
ETS table.

This is not a very impactful change but it's nice to keep the latency of
the health-check handlers low and reduce some unnecessary cluster noise.
2025-05-08 10:43:33 -04:00
Michael Klishin d27d5c48ce
Merge pull request #13856 from cloudamqp/faster_empty_cq_init
Make empty CQ init faster in case of clean shutdown
2025-05-08 18:24:28 +04:00
Michael Klishin f50a8d39cc
Merge pull request #13861 from rabbitmq/move-os_mon-users-back-to-rabbit
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Move `file_handle_cache` and `vm_memory_monitor` back to `rabbit`
2025-05-07 21:59:22 +04:00
Michael Klishin 6ba73c2093
Merge pull request #13848 from rabbitmq/extend-mgt-api-selenium-lib
Add several functions to mgt-api.js for wsr testing with selenium
2025-05-07 19:59:37 +04:00
Marcial Rosales ea0dd8beb8 Add functions to mgt-api for selenium 2025-05-07 17:38:31 +02:00
Péter Gömöri 150172f008 Make empty CQ init faster in case of clean shutdown
At CQ startup variable_queue went through each seqid from 0 to
next_seq_id looking for the first message even if there were no
messages in the queue (no segment files).

In case of a clean shutdown the value next_seq_id is stored in
recovery terms. This value can be utilized by the queue index to
provide better seqid bounds in absence of segment files.

Before this patch starting an empty classic queue with next_seq_id =
100_000_000 used to take about 26 seconds. With this patch it takes
less than 1ms.
2025-05-07 14:59:46 +02:00
David Ansari cddfe3ba41 Removed unused function 2025-05-07 14:52:02 +02:00
Jean-Sébastien Pédron e58eb1807a
Move `file_handle_cache` and `vm_memory_monitor` back to `rabbit`
[Why]
They were moved from `rabbit` to `rabbit_common` several years ago to
solve an dependency issue because `amqp_client` depended on the file
handle cache. This is not the case anymore.

[How]
The modules are moved back to `rabbit`.

`rabbit_common` doesn't need to depend on `os_mon` anymore. `rabbit`
already depends on it, so no changes needed here.

`include/rabbit_memory.hrl` and some test cases are moved as well to
follow the `vm_memory_monitor` module.
2025-05-07 09:46:14 +02:00
Arnaud Cogoluègnes 8cc26c4acd
Merge pull request #13857 from rabbitmq/stream-coordinator-fix-partition-index-conflict
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Fix partition index conflict in stream SAC coordinator
2025-05-06 15:16:25 +00:00
Michael Klishin 1c0539f862
Merge pull request #13858 from rabbitmq/ik-stomp-utf8-check
STOMP: confirm utf-8 handling
2025-05-06 18:12:57 +04:00
Arnaud Cogoluègnes cad8b70ee8
Fix partition index conflict in stream SAC coordinator
Consumers with a same name, consuming from the same stream should have
the same partition index. This commit adds a check to enforce this rule
and make the subscription fail if it does not comply.

Fixes #13835
2025-05-06 16:11:46 +02:00
Iliia Khaprov 0ec25997b6
STOMP: confirm utf-8 handling 2025-05-06 13:51:37 +02:00
Michael Klishin 99a9237abb
Merge pull request #13850 from rabbitmq/ik-stomp-evergreen
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
STOMP: queue type tests - add queue.type assertions
2025-05-05 21:31:53 +04:00
Michael Klishin 53f511fa15
Merge pull request #13837 from rabbitmq/dqt-export-fix
Modify default queue type injection logic
2025-05-05 21:20:24 +04:00
Michael Klishin 451850f325
Merge pull request #13836 from rabbitmq/super-streams-ui
Management UI: new page and elements for superstreams (partitioned streams)
2025-05-05 20:34:04 +04:00
Iliia Khaprov a91371dfe6
STOMP: queue type tests - add queue.type assertions 2025-05-05 11:42:39 +02:00
Diana Parra Corbacho ef09b190ce Mgmt UI: Add super streams page 2025-05-04 19:53:55 +02:00
Michael Klishin c458cba923
4.1.0 release notes edits
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
2025-05-03 11:41:49 -04:00
Michael Klishin 6bda6a610f
Minor 4.1.0 release notes correction 2025-05-03 11:37:51 -04:00
Michael Klishin cc33379f27
Merge pull request #13843 from rabbitmq/launch-other-rabbitmq
Launch another rabbitmq server from a Selenium test suite
2025-05-03 18:36:59 +04:00
Marcial Rosales 7653b6522a Fix test
it was necessary to add a queue first before checking which
columns are available
2025-05-03 11:27:05 +02:00
Marcial Rosales fa315e4d86 Fix location of definitions file 2025-05-03 10:56:05 +02:00
Marcial Rosales 64f7aa2c95 Minor test chnage 2025-05-02 18:08:09 +02:00
Marcial Rosales 438b77443c Modify scripts so that it is possible to start 2 rabbitmqs 2025-05-02 17:29:42 +02:00
Michael Klishin 8cbd7e6243
Merge pull request #13838 from rabbitmq/selenium-select-columns-for-virtualhosts
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Test management ui selection of vhost's tags columns
2025-05-02 18:35:14 +04:00
Marcial Rosales fb02466b20 Test columns for queues and exchanges 2025-05-02 16:25:01 +02:00
Michael Klishin 6c75497ac1
Merge pull request #13840 from rabbitmq/fix-formatter-crash
Fix formatter crash in rabbit_reader
2025-05-02 18:21:53 +04:00
Marcial Rosales ba0510f85d Test columns available for queues and stream 2025-05-02 16:12:32 +02:00
Marcial Rosales 175abbff87 Test virtual hosts and select tags column 2025-05-02 15:47:32 +02:00
Marcial Rosales ea66a25dfa Testing new vhost has the tag 2025-05-02 14:56:49 +02:00
Michal Kuratczyk 435274bc83
Fix formatter crash in rabbit_reader 2025-05-02 14:56:07 +02:00
Michal Kuratczyk f61b9d9bf4
Add a test for DQT upon vhost creation 2025-05-02 14:01:10 +02:00
Michal Kuratczyk 9bd11b449f
Set the DQT in rabbit_vhost:do_add 2025-05-02 13:58:00 +02:00
Marcial Rosales 7003fefa44 Select columns of vhosts 2025-05-02 13:05:25 +02:00
Michal Kuratczyk 9d0f01b45b
Add DQT to vhost metadata on recovery
Vhosts that currently don't have their own default queue type, now
inherit it from the node configuration and store it in their metadata
going forward.
2025-05-01 17:28:32 +02:00
Michal Kuratczyk 0e743b5fe7
Adjust tests to the new behaviour 2025-05-01 17:28:32 +02:00
Michal Kuratczyk 3c95bf32e7
vhost inherits DQT from node
Rather than injecting node-level DQT when exporting definitions,
inject it into vhost's metadata when a vhost is created.
2025-05-01 17:28:32 +02:00
Michal Kuratczyk 5eb65f5f72
Remove vhost.default_queue_type from HTTP defs export 2025-05-01 17:28:32 +02:00
Michal Kuratczyk 73da2a3fbb
Fix DQT in definition export (redundant property)
The correct place for the `default_queue_type` property
is inside the `metadata` block. However, right now we'd
always export the value outside of `metadata` AND only
export it inside `metadata`, if it was not `undefined`.

This value outside of `metadata` was just misleading:
if a user exported the definitins from a fresh node,
changed `classic` to `quorum` and imported such modified
values, the DQT would still be `classic`, because RMQ looks
for the value inside `metadata`. Just to make it more confusing,
if the DQT was changed successfully one way or another, the
value outside of `metadata` would reflect that
(it always shows the correct value, but is ignored on import).
2025-05-01 17:28:32 +02:00
Marcial Rosales 1ab81f7901 Select tags column on vhosts table 2025-04-30 18:22:20 +02:00
Marcial Rosales 01ca72edc0 Test adding vhost 2025-04-30 18:08:58 +02:00
Michael Klishin 467601a62d
Merge pull request #13822 from rabbitmq/lukebakken/delete-unused-js
Remove unused Javascript functions
2025-04-29 03:09:10 +04:00
Luke Bakken 61b0f152fd
Remove unused Javascript functions
A security scanner flagged the use of `RegExp` with unsanitized input.
Turns out, these functions are no longer used and can be deleted.
2025-04-28 12:18:06 -07:00
Michael Klishin 41e7306208
Merge pull request #13820 from rabbitmq/fix-shovel-test-flakes
Shovel test flakes and logging fixes
2025-04-28 19:42:06 +04:00
Michal Kuratczyk 0f36610e9d
Don't log a crash on connection termination 2025-04-28 15:39:13 +02:00
Michal Kuratczyk 0ce6ad0f0f
Add a `flush` handler to amqp_channel
rabbit_channel may use amqp_channel as the writer.
When terminating, rabbit_channel sends a `flush` message
to its writer. If amqp_channel is in use, that led to
a `function_clause` crash.
2025-04-28 15:39:02 +02:00
Michal Kuratczyk 0ec41c6c41
Shovel: de-flake dynamic_SUITE
checking that not a single process has a message in the mailbox
is prone to flakes.
2025-04-28 14:05:27 +02:00
Michael Klishin 005bb2c790
4.0.1 release notes: remove a pre-GA leftover 2025-04-27 16:53:10 -04:00
Michael Klishin 812d51be56
4.1.0 release notes: correct a confusing typo 2025-04-27 16:50:20 -04:00
Michael Klishin 164d495dfc
Merge pull request #13818 from rabbitmq/rabbitmq-server-13767
By @aaron-seo: Adds a new auth backend that only accepts loopback connections
2025-04-27 12:58:02 +04:00
Aaron Seo 85e14c74fa
Filter out sockOrAddr from http auth backend's request query
(cherry picked from commit 844f25d77a)
2025-04-27 04:04:20 -04:00
Michael Klishin c9b2b7fb22
Naming #13809 2025-04-26 18:40:50 -04:00
Razvan Grigore 09c546a1c8
Add Socket SSL column to management UI 2025-04-26 18:40:50 -04:00
Michael Klishin 55dc63a801
Merge pull request #13817 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-ad66588521
[skip ci] Bump the prod-deps group across 2 directories with 1 update
2025-04-26 23:55:20 +04:00
Michael Klishin f8f5a5f91a
Merge pull request #13816 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/dev-deps-87f496a585
[skip ci] Bump com.google.code.gson:gson from 2.13.0 to 2.13.1 in /deps/rabbitmq_stream_management/test/http_SUITE_data in the dev-deps group across 1 directory
2025-04-26 23:55:12 +04:00
dependabot[bot] 47e65df77d
[skip ci] Bump the prod-deps group across 2 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.4 to 3.4.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.4...v3.4.5)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.4 to 3.4.5
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.4...v3.4.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.4.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-version: 3.4.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-26 18:59:25 +00:00
dependabot[bot] 1a6f603254
[skip ci] Bump com.google.code.gson:gson
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.google.code.gson:gson](https://github.com/google/gson).


Updates `com.google.code.gson:gson` from 2.13.0 to 2.13.1
- [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.13.0...gson-parent-2.13.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-26 18:58:40 +00:00
Michael Klishin 8bf8c2e688
Merge pull request #13787 from rabbitmq/add-id-tag-to-some-management-ui-pages
Add queues and streams page and test suite
2025-04-25 23:26:53 +04:00
Michael Klishin 8dd27ee7ff
Merge pull request #13804 from rabbitmq/dependabot/github_actions/main/google-github-actions/auth-2.1.10
Bump google-github-actions/auth from 2.1.9 to 2.1.10
2025-04-25 23:18:38 +04:00
dependabot[bot] 715823c5bb
Bump google-github-actions/auth from 2.1.9 to 2.1.10
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.9 to 2.1.10.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.9...v2.1.10)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: 2.1.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 18:39:38 +00:00
Michael Klishin 1806a45461
Merge pull request #13798 from rabbitmq/amqp091-to-amqp10-shovel-bug
Fix amqp091->amqp10 shovel with complex headers
2025-04-25 21:19:29 +04:00
Marcial Rosales 0cb63bb544 Add queues and streams page and test suite 2025-04-25 17:04:40 +02:00
Michael Klishin 5bd8b3d09f
Merge pull request #13752 from rabbitmq/use-env-var-list-plugins
Selenium suites: use RABBITMQ_ENABLED_PLUGINS over RABBITMQ_ENABLED_PLUGINS_FILE
2025-04-25 18:56:41 +04:00
Marcial Rosales 0b1a4d283b Remove commented out exchange 2025-04-25 16:34:09 +02:00
Michal Kuratczyk c5271ea602
Some AMQP 0.9.1 headers, in particular x-death headers, cannot be set as
application properties. Before this change, trying to shovel
dead-lettered messages from an AMQP 0.9.1 source to AMQP 1.0 destination
would fail with:
```
reason: {badarg,
            [{unicode,characters_to_binary,
                 [[{table,
                       [{<<"count">>,long,1},
                        {<<"reason">>,longstr,<<"maxlen">>},
                        {<<"queue">>,longstr,<<"tmp">>},
                        {<<"time">>,timestamp,1745575728},
                        {<<"exchange">>,longstr,<<>>},
                        {<<"routing-keys">>,array,
                         [{longstr,<<"tmp">>}]}]}]],
                 [{file,"unicode.erl"},
                  {line,1219},
                  {error_info,#{module => erl_stdlib_errors}}]},
             {amqp10_client_types,utf8,1,
                 [{file,"amqp10_client_types.erl"},{line,99}]},
             {amqp10_msg,'-set_application_properties/2-fun-0-',3,
                 [{file,"amqp10_msg.erl"},{line,385}]},
             {maps,fold_1,4,[{file,"maps.erl"},{line,860}]},
             {amqp10_msg,set_application_properties,2,
                 [{file,"amqp10_msg.erl"},{line,384}]},
             {maps,fold_1,4,[{file,"maps.erl"},{line,860}]},
             {rabbit_amqp10_shovel,forward,4,
                 [{file,"rabbit_amqp10_shovel.erl"},{line,337}]},
             {rabbit_shovel_worker,handle_info,2,
                 [{file,"rabbit_shovel_worker.erl"},{line,104}]}]}
```
2025-04-25 15:46:45 +02:00
Marcial Rosales 9e69496c85 Remove event exchange 2025-04-25 14:23:07 +02:00
Marcial Rosales b6d2ff85b2 Parse multi-line enabled_plugins
Use only needed required plugins for basic auth suite
2025-04-25 14:23:07 +02:00
Marcial Rosales ceb7b244f2 Convert multiline enabled_plugins to single value 2025-04-25 14:23:07 +02:00
Marcial Rosales 6262c849a2 Use RABBITMQ_ENABLED_PLUGINS instead of RABBITMQ_ENABLED_PLUGINS_FILE
gmake was ignoring the former env var.
2025-04-25 14:23:07 +02:00
Aaron Seo 3bcdc0f359
Fallback to original implementation of plain auth_mechanism if socket is not provided 2025-04-24 13:41:57 -07:00
Michael Klishin a22fa85784
Merge pull request #13792 from rabbitmq/dependabot/github_actions/main/google-github-actions/auth-2.1.9
Bump google-github-actions/auth from 2.1.8 to 2.1.9
2025-04-24 23:11:08 +04:00
dependabot[bot] 0ea1b4b5e6
Bump google-github-actions/auth from 2.1.8 to 2.1.9
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.8 to 2.1.9.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.8...v2.1.9)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: 2.1.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-24 18:59:17 +00:00
Jean-Sébastien Pédron d84d3a1491
Merge pull request #13781 from rabbitmq/cleanup-rabbit_khepri
Khepri: Clean up the setup/clustering code of the integration code
2025-04-24 18:27:32 +02:00
Jean-Sébastien Pédron 5300076e33
Khepri: Clean up the proxy functions of the integration code
[Why]
The `rabbit_khepri` module grew during the work to add Khepri support to
RabbitMQ and while Khepri was itself written. The current code is
therefore unorganized.

[How]
This commit tries to change proxy functions to be close to their Khepri
equivalent.

The module continues to set non-default options for write functions. We
also add the variants that take an option map to be consistent and not
have to deal with that in the future.

Several legacy functions were removed, either because they were no
longer called or because they were replace by a regular Khepri call.
2025-04-24 16:06:20 +02:00
Jean-Sébastien Pédron bd3aee35b4
Khepri: Clean up the setup/clustering code of the integration code
[Why]
The `rabbit_khepri` module grew during the work to add Khepri support to
RabbitMQ and while Khepri was itself written. The current code is
therefore unorganized.

[How]
This commit tries to sort the code that manages the setup of Khepri and
the functions tha deal with the Khepri cluster. It also groups functions
which provide support for CLI commands.

It also adds documentation to several functions.

Finally, when a node joins a cluster, we stop displaying the content of
the Khepri tree.
2025-04-24 11:57:51 +02:00
Jean-Sébastien Pédron d2b5f51bfd
release-notes/4.2.0: Mention Khepri enabled by default 2025-04-23 15:10:20 +02:00
David Ansari 229edb1827 Fix links in 4.2.0 release notes 2025-04-23 14:10:40 +02:00
David Ansari 77e73deede Intercept outgoing just before conversion
Intercept outgoing message just before conversion to target protocol as
this will give most flexibility to 3rd party plugins.
2025-04-23 14:01:42 +02:00
David Ansari f447e84e93 Add 4.2.0 release notes
[skip ci]
2025-04-23 14:01:42 +02:00
David Ansari a24ba55d45 Store message interceptor context in MQTT proc state
It's a tradeoff between building the map for each incoming and outgoing
message (now that there are also outgoing interceptors) vs increased
memory usage for the MQTT proc state.

Connecting with MQTT 5.0 and client ID "xxxxxxxx", the number of words
are 201 before this commit vs 235 after this commit as determined by:
```
S = sys:get_state(MQTTConnectionPid),
erts_debug:size(S).
```
Therefore, this commit requires 34 word * 8 bytes = 272 bytes more per MQTT
connection, that is 272 MB more for 1,000,000 MQTT connections.
2025-04-23 14:01:42 +02:00
David Ansari 21bd300d61 Support outgoing message interceptors 2025-04-23 14:01:42 +02:00
David Ansari 6ade94f50b Improve message interceptors
1. Force the config for timestamp and routing node message interceptors
   to be configured with the overwrite boolean() to avoid defining
   multiple default values throughout the code.
2. Add type specs
3. Extend existing test case for new MQTT client ID interceptor
4. routing node and timestamp should only set the annotation for
   incoming_message_interceptors group
5. Fix `rabbitmq.conf`.
   Prior to this commit there were several issue:
   a.) Setting the right configuration was too user unfriendly, e.g. the user has to set
   ```
   message_interceptor.incoming.rabbit_mqtt_message_interceptor_client_id.annotation_key = x-opt-mqtt-client-id
   ```
   just to enable the MQTT message interceptor.
   b.) The code that parses was too difficult to understand
   c.) MQTT plugin was setting the env for app rabbit, which is an anti-pattern
   d.) disabling a plugin (e.g. MQTT), left its message interceptors still in place
   This is now all fixed, the user sets the rabbitmq.conf as follows:
   ```
   message_interceptors.incoming.set_header_timestamp.overwrite = true
   message_interceptors.incoming.set_header_routing_node.overwrite = false
   mqtt.message_interceptors.incoming.set_client_id_annotation.enabled = true
   ```
   Note that the first two lines use the same format as for RabbitMQ 4.0
   for backwards compatiblity. The last line (MQTT) follows a similar
   pattern.
2025-04-23 14:01:42 +02:00
Lois Soto Lopez 9936b8de69 Add incoming message interceptors
This commit enables users to provide custom message interceptor modules,
i.e. modules to process incoming and outgoing messages. The
`rabbit_message_interceptor` behaviour defines a `intercept/4` callback,
for those modules to implement.

Co-authored-by: Péter Gömöri <gomoripeti@users.noreply.github.com>
2025-04-23 14:01:42 +02:00
Jean-Sébastien Pédron f28963c0f9
Merge pull request #12682 from rabbitmq/mark-khepri_db-as-stable
Khepri: Mark `khepri_db` feature flag as stable
2025-04-23 12:40:29 +02:00
Jean-Sébastien Pédron a34ce08f8f
rabbitmq_cli: Adapt `force_reset_command_test.exs` testsuites
[Why]
`force_reset` is unsupported with Khepri.
2025-04-23 11:34:37 +02:00
Jean-Sébastien Pédron 0541996b30
rabbitmq_4_0_deprecations_SUITE: Add more assertions to ram node tests 2025-04-23 11:34:36 +02:00
Jean-Sébastien Pédron a528a415d3
Khepri: Mark `khepri_db` as stable
[Why]
The intent is to have it stable and enabled by default for new
deployment in RabbitMQ 4.1.x.

To prepare for this goal, it is time to mark the feature flag as stable
to let us iron out the library and its integration into RabbitMQ.

This is not a commitment at this stage: we will revisit this near the
beginning of the release cycle and commit to it or revert to
experimental.
2025-04-23 11:34:32 +02:00
Jean-Sébastien Pédron d6a9c63cd2
Merge pull request #13779 from rabbitmq/use-rabbitmq-4.0.9-for-mixed-version-testing
GitHub Actions: Use RabbitMQ 4.0.9 for mixed-version testing
2025-04-23 11:34:05 +02:00
Jean-Sébastien Pédron ac90d13af6
GitHub Actions: Use RabbitMQ 4.0.9 for mixed-version testing
[Why]
We used a 4.0.x snapshot so far because we needed RabbitMQ 4.0.x to use
khepri_mnesia_migration 0.7.2.

RabbitMQ 4.0.9 was released with this update of khepri_mnesia_migration,
thus we don't need the snapshot anymore.
2025-04-23 10:45:50 +02:00
Aaron Seo 614ce25cc7
Add test suite for rabbitmq_auth_backend_internal_loopback 2025-04-21 12:11:36 -07:00
Michael Klishin d265fdd889
Drop the 4.0.x alphas workflow
Now that 4.1.0 is out, 4.0.x binary releases will
no longer be available publicly.

(cherry picked from commit cf98ba5a8c)

Conflicts:
	.github/workflows/release-4.0.x-alphas.yaml
(cherry picked from commit 4dc2395d63)
2025-04-19 14:25:41 -04:00
Michael Klishin d3ffe65f3f
Merge pull request #13771 from rabbitmq/loic-fix-rare-msg-store-eof
CQ: Fix rare eof crash of message store with fanout
2025-04-19 12:11:18 +04:00
Loïc Hoguin 7138e8a0cc
CQ: Fix rare eof crash of message store with fanout 2025-04-18 13:50:57 +02:00
Michael Klishin 813f1e9b3d
Merge pull request #13765 from rabbitmq/dashboard-update-rmq-4.1
[skip ci] Grafana: update dashboards for RabbitMQ 4.1.x
2025-04-16 19:51:54 +04:00
Michal Kuratczyk c0368a0d24
[skip ci] Update dashboards for RabbitMQ 4.1
Key changes:
- endpoint variable to handle scraping multiple endpoints
- message size panels (new metric in 4.1)
- panels at the top of the Overview dashboard should be more up to date
  (they show the latest value)
- values should be accurate if multiple endpoints are scraped
  (previously, many would be doubled)
- Nodes table shows fewer volumns and shows node uptime
2025-04-16 17:48:21 +02:00
Michal Kuratczyk e90b47f7e1
[skip ci] Add new versions to GH Discussion template 2025-04-16 14:15:32 +02:00
Michael Klishin 2592dff63a
One more 4.1.0 release notes update 2025-04-15 15:49:50 -04:00
Michael Klishin beb7e83aa7
4.1.0 release notes: update a compatible amqplib release link
(cherry picked from commit a68af5a98883aac352ff1e7e079889dcb23a713f)
2025-04-15 15:14:15 -04:00
Michael Klishin 52fcd15bef
Merge pull request #13756 from rabbitmq/4.1-release-notes-prometheus
[skip-ci] Additional Prometheus-related release notes
2025-04-15 21:18:37 +04:00
Michael Klishin 4d162257b4
4.1.0 release notes edits 2025-04-15 13:17:54 -04:00
Michal Kuratczyk b03b3cabf3
[skip-ci] Additional Prometheus-related release notes 2025-04-15 18:46:57 +02:00
Michael Klishin cb4676da88
4.1.0 release notes: prepare for 4.1.0 GA 2025-04-15 01:03:04 -04:00
Michael Klishin 95332ddad1
Use a functional token for rabbitmq/server-packages event dispatch 2025-04-15 01:00:20 -04:00
Michael Klishin 596e3ef41a
Cosmetics 2025-04-15 00:57:39 -04:00
Aaron Seo 803cd3956b
Fix doc typo for internal_loopback auth backend 2025-04-14 11:02:49 -07:00
Michael Klishin 118236b1dd
Another 4.0.9 release notes update 2025-04-14 10:49:30 -04:00
Michael Klishin 97b98c1f5f
4.0.9 release notes 2025-04-14 08:54:53 -04:00
Michael Klishin b11d853880
Merge commit '228cbf9776' 2025-04-14 08:38:15 -04:00
Michael Klishin 228cbf9776
Naming, docs #13747 2025-04-14 08:38:03 -04:00
Anh Nguyen e557ab37a3 Add quorum queue config in INI style 2025-04-14 18:55:09 +07:00
Michael Klishin 1aa3342590
Merge pull request #13739 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-2c123be8b9
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
2025-04-13 00:20:54 +04:00
Michael Klishin e31daa65d9
Merge pull request #13740 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-68a44efc4f
[skip ci] Bump the prod-deps group across 4 directories with 1 update
2025-04-13 00:20:47 +04:00
dependabot[bot] 578552e765
[skip ci] Bump the prod-deps group across 4 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.3 to 2.44.4
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.3...maven/2.44.4)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.3 to 2.44.4
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.3...maven/2.44.4)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.3 to 2.44.4
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.3...maven/2.44.4)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.3 to 2.44.4
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.3...maven/2.44.4)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 18:22:42 +00:00
dependabot[bot] dee14f21a3
[skip ci] Bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 3 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) and [com.google.code.gson:gson](https://github.com/google/gson).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.1 to 5.12.2
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.1...r5.12.2)

Updates `com.google.code.gson:gson` from 2.12.1 to 2.13.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.12.1...gson-parent-2.13.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-12 18:21:52 +00:00
Michael Klishin 983b4d3d7c
4.1.0 release notes updates 2025-04-11 19:00:47 -04:00
Michael Klishin 9b4dd0fbd8
4.1.0 release notes updates 2025-04-11 18:59:55 -04:00
Michael Klishin a98e539927
Merge pull request #13735 from rabbitmq/ra-2.16.8
Ra 2.16.8
2025-04-11 22:13:43 +04:00
Karl Nilsson 8a30dd563a Ra 2.16.8
Includes a performance optimisation to avoid certain many queues
scenarios from timing out after a reboot.
2025-04-11 17:19:55 +01:00
Michael Klishin 25f8741f62
Merge pull request #13726 from rabbitmq/osiris-1.8.7
Osiris v1.8.7
2025-04-11 19:09:36 +04:00
Michal Kuratczyk 589e0b578c
Remove log level tests (#13723)
When debug logging is enabled, we log something at each log level
to test if logs are emitted. I don't think this is particularly useful,
but it's certainly annoying, because I constatnly need to filter
out these logs when searching if any errors happened during tests.
2025-04-11 12:13:06 +02:00
David Ansari 6eb1f87e14
Fix concurrent AMQP queue declarations (#13727)
* Fix concurrent AMQP queue declarations

Prior to this commit, when AMQP clients declared the same queues
concurrently, the following crash occurred:
```
  │ *Error{Condition: amqp:internal-error, Description: {badmatch,{<<"200">>,
  │            {map,[{{utf8,<<"leader">>},{utf8,<<"rabbit-2@carrot">>}},
  │                  {{utf8,<<"message_count">>},{ulong,0}},
  │                  {{utf8,<<"consumer_count">>},{uint,0}},
  │                  {{utf8,<<"name">>},{utf8,<<"cq-145">>}},
  │                  {{utf8,<<"vhost">>},{utf8,<<"/">>}},
  │                  {{utf8,<<"durable">>},{boolean,true}},
  │                  {{utf8,<<"auto_delete">>},{boolean,false}},
  │                  {{utf8,<<"exclusive">>},{boolean,false}},
  │                  {{utf8,<<"type">>},{utf8,<<"classic">>}},
  │                  {{utf8,<<"arguments">>},
  │                   {map,[{{utf8,<<"x-queue-type">>},{utf8,<<"classic">>}}]}},
  │                  {{utf8,<<"replicas">>},
  │                   {array,utf8,[{utf8,<<"rabbit-2@carrot">>}]}}]},
  │            {[{{resource,<<"/">>,queue,<<"cq-145">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-144">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-143">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-142">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-141">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-140">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-139">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-138">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-137">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-136">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-135">>},configure},
  │              {{resource,<<"/">>,queue,<<"cq-134">>},configure}],
  │             []}}}
  │ [{rabbit_amqp_management,handle_http_req,8,
  │                          [{file,"rabbit_amqp_management.erl"},{line,130}]},
  │  {rabbit_amqp_management,handle_request,5,
  │                          [{file,"rabbit_amqp_management.erl"},{line,43}]},
  │  {rabbit_amqp_session,incoming_mgmt_link_transfer,3,
  │                       [{file,"rabbit_amqp_session.erl"},{line,2317}]},
  │  {rabbit_amqp_session,handle_frame,2,
  │                       [{file,"rabbit_amqp_session.erl"},{line,963}]},
  │  {rabbit_amqp_session,handle_cast,2,
  │                       [{file,"rabbit_amqp_session.erl"},{line,539}]},
  │  {gen_server,try_handle_cast,3,[{file,"gen_server.erl"},{line,2371}]},
  │  {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,2433}]},
  │  {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,329}]}], Info: map[]}
```

To repro, run the following command in parallel in two separate terminals:
```
./omq amqp -x 10000 -t /queues/cq-%d -y 0 -C 0 --queues classic  classic
```

* Simplify
2025-04-11 12:04:00 +02:00
Karl Nilsson bd96f86dc4 Osiris v1.8.7
This release contains some logging improvements to avoid logging
large stack traces during normal operations such as rolling restarts.
2025-04-11 08:54:50 +01:00
Aaron Seo 6d24aef9b0
Adds rabbit_auth_backend_internal_loopback
This auth backend behaves the same as the internal backend provided in
the core broker, but it only accepts loopback connections. External
connection attempts will receive an error.
2025-04-09 12:53:29 -07:00
Karl Nilsson 4a122df99b
Merge pull request #13718 from rabbitmq/ra-system-order
Start coordination Ra system before quorum_queues
2025-04-09 14:40:01 +01:00
Karl Nilsson 274f12f063 Start the coordination Ra system before quorum_queues
This ensures that quorum_queues shuts down _before_
coordination where khepri run inside.
Quorum queues depend on khepri so need to be shut down first.
2025-04-09 12:53:34 +01:00
Jean-Sébastien Pédron dc5a703c23
Merge pull request #12753 from rabbitmq/md/khepri-0-17
Bump Khepri to 0.17.0
2025-04-09 10:26:53 +02:00
Michael Klishin 9bb5dc2ef0
Merge pull request #13698 from rabbitmq/loic-require-auth-api-desc-page
Add new option require_auth_for_api_desc_page to mgmt
2025-04-09 02:29:47 -04:00
Michael Klishin 20188a770e
rabbitmq.conf schema and tests for #13698 2025-04-09 02:02:47 -04:00
Michael Klishin b4fe2cc661
Merge pull request #13703 from rabbitmq/qq-handle-tick-tweaks
QQ: handle tick tweaks
2025-04-08 15:57:59 -04:00
Michael Klishin 12bdf54969
Merge pull request #13685 from rabbitmq/merge-changes-from-tanzu
Upstream changes from Tanzu RabbitMQ's Selenium suite
2025-04-08 15:20:48 -04:00
Michael Klishin 593ec26337
Merge pull request #13701 from rabbitmq/avoid-crash-on-federation-status
Avoid crash when reporting federation status
2025-04-08 15:19:47 -04:00
Jean-Sébastien Pédron 2754fb7d05
GitHub Actions: Use a 4.0.x snapshot for mixed-version testing
This is to make sure the old node uses the latest
khepri_mnesia_migration patch release.
2025-04-08 18:47:27 +02:00
Jean-Sébastien Pédron c8fafa3772
rabbit_db: Note that rabbit_db_msup:create_or_update() is not atomic
... with Khepri.
2025-04-08 18:47:27 +02:00
Jean-Sébastien Pédron 440eb5b355
Khepri: Export `fence/1` 2025-04-08 18:47:27 +02:00
Jean-Sébastien Pédron b4cda4a96a
Improve many testsuites to make them work with mixed versions of Khepri 2025-04-08 18:47:27 +02:00
Jean-Sébastien Pédron 124467e620
rabbitmq_ct_helpers: Use node 2 as seed node, even with secondary umbrella
[Why]
This makes sure that nodes are clustered the same way, whether the tests
are executed with or without a secondary umbrella.
2025-04-08 18:47:27 +02:00
Jean-Sébastien Pédron 4811fd44fd
Khepri: Don't sync cluster if the node is already clustered in `khepri_db` enable function
[Why]
The feature flag enable function is called during the initial migration
or when a node is later added to a cluster.

In this latter situation, the cluster is already formed and the Mnesia
tables were already migrated. Syncing the cluster in this specific
situation might kick another node that is currently unreachable.

[How]
If the node running the enable function is already clustered, we skip
the cluster sync.
2025-04-08 18:47:27 +02:00
Michael Davis f5805b83d2
Khepri: Handle breaking change in khepri adv API return type
[Why]
All callers of `khepri_adv` and `khepri_tx_adv` need updates to handle
the now uniform return type of `khepri:node_props_map()` in Khepri
0.17.0.

[How]
We don't need any compatibility code to handle "either the old return
type or the new return type" from the khepri_adv API because the
translation is done entirely in the "client side" code in Khepri -
meaning that the return value from the Ra server is the same but it is
translated differently by the functions in `khepri_adv`.

However, we need to adapt transaction functions because they may be
executed on different versions of Khepri and the behaviour of
`khepri_tx_adv` can be different. To take the possible change of return
value format, we use the new `khepri_tx:does_api_comply_with/1` to know
what to expect.
2025-04-08 18:47:27 +02:00
Michael Davis 9b5ab14faf
Khepri: Adapt to new khepri_cluster:members/2 API
[Why]
In Khepri 0.17.0, `khepri_cluster:locally_known_members/1` and
`khepri_cluster:locally_known_node/1` were replaced with
`khepri_cluster:members/2` and `khepri_cluster:nodes/2` with `favor` set
to `low_latency` - this matches the interface for queries in Khepri.
2025-04-08 18:47:26 +02:00
Michael Davis cbe271e52f
Update Khepri from 0.16.0 to 0.17.1
... and khepri_mnesia_migration from 0.7.2 to 0.8.0.

Khepri release notes:
* https://github.com/rabbitmq/khepri/releases/tag/v0.17.0
* https://github.com/rabbitmq/khepri/releases/tag/v0.17.1

khepri_mnesia_migration release notes:
https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.8.0
2025-04-08 18:47:26 +02:00
Jean-Sébastien Pédron 9c23e7f2d4
Merge pull request #13705 from rabbitmq/update-ra-to-2.16.7
Update Ra from 2.16.6 to 2.16.7
2025-04-08 17:09:02 +02:00
Karl Nilsson 27ef97ecd7 QQ: handle_tick improvements
Move leader repair earlier in tick function to ensure more
timely update of meta data store record after leader change.

Also use RPC_TIMEOUT macro for metric/stats multicalls to improve
liveness when a node is connected but partitioned / frozen.
2025-04-08 15:39:20 +01:00
Jean-Sébastien Pédron 8dec1abcd3
Update Ra from 2.16.6 to 2.16.7
Release notes:
https://github.com/rabbitmq/ra/releases/tag/v2.16.7

What's changed:
* ra_server: Ignore `#info_reply{}` from a node that is not part of
  cluster (rabbitmq/ra#536).
2025-04-08 15:38:30 +02:00
Michal Kuratczyk 6513d028e3
Avoid crash when reporting federation status
This should address crashes like this in (found in user's logs):
```
exception error: no case clause matching
                  [[{connection_details,[]},
                    {name,<<"10.0.13.41:50497 -> 10.2.230.128:5671 (1)">>},
                    {node,rabbit@foobar},
                    {number,1},
                    {user,<<"...">>},
                    {user_who_performed_action,<<"...">>},
                    {vhost,<<"/">>}],
                   [{connection_details,[]},
                    {name,<<"10.0.13.41:50142 -> 10.2.230.128:5671 (1)">>},
                    {node,rabbit@foobar},
                    {number,1},
                    {user,<<"...">>},
                    {user_who_performed_action,<<"...">>},
                    {vhost,<<"/">>}]]
   in function  rabbit_federation_mgmt:format/3 (rabbit_federation_mgmt.erl, line 100)
   in call from rabbit_federation_mgmt:'-status/3-lc$^0/1-0-'/4 (rabbit_federation_mgmt.erl, line 89)
   in call from rabbit_federation_mgmt:'-status/4-lc$^0/1-0-'/3 (rabbit_federation_mgmt.erl, line 82)
   in call from rabbit_federation_mgmt:'-status/4-lc$^0/1-0-'/3 (rabbit_federation_mgmt.erl, line 82)
   in call from rabbit_federation_mgmt:status/4 (rabbit_federation_mgmt.erl, line 82)
   in call from rabbit_federation_mgmt:to_json/2 (rabbit_federation_mgmt.erl, line 57)
   in call from cowboy_rest:call/3 (src/cowboy_rest.erl, line 1590)
   in call from cowboy_rest:set_resp_body/2 (src/cowboy_rest.erl, line 1473)
```
2025-04-08 12:05:10 +02:00
Marcial Rosales 06bd98ddd1 Renconcile changes from tanzu rabbitmq 2025-04-08 11:06:50 +02:00
Arnaud Cogoluègnes f10e084c51
Bump Logback to 1.5.18 in JMS-over-AMQP tests
The project uses SLF4J 2.x, Logback 1.5.x is compatible with it.
2025-04-08 09:20:20 +02:00
Arnaud Cogoluègnes 12d094bdb3
Use Netty version from AMQP client in JMS-over-AMQP tests
AMQP Java client uses Netty 4.2, QPid JMS uses Netty 4.1. This commit
forces the use of Netty 4.2 (which is backward-compatible with 4.1).
2025-04-08 09:19:49 +02:00
David Ansari 561376052e Fix type spec for AMQP 1.0 address
The target address can be null which denotes the anonymous terminus.
https://docs.oasis-open.org/amqp/anonterm/v1.0/anonterm-v1.0.html
2025-04-07 16:37:17 +02:00
David Ansari 35b5ab3cdc Determine queue topology without checking queue type
## What?
This commit determines the queue topology without checking the queue type.

 ## Why?
This way, checking leader and replicas works the same across all queue
types without the need to introduce other rabbit_queue_type behaviour as
suggested in other PRs.

 ## How?
pid is the leader, nodes in queue_type_states are the members/replicas.

This commit results in an unknown stream leader during queue
declaration. However the correct leader will be returned eventually when
calling GET on the stream.
2025-04-07 16:37:03 +02:00
Loïc Hoguin 400e8006e5
Add new option require_auth_for_api_desc_page to mgmt
This allows restricting access to the /api/index.html and
the /cli/index.html page to authenticated users should the
user really want to. This can be enabled via advanced.config.
2025-04-07 15:59:13 +02:00
Arnaud Cogoluègnes 6f5c8e0c7f
Pin Java AMQP 1.0 client to 0.5.0
Because of Netty version mismatch with QPid JMS.
2025-04-07 14:54:31 +02:00
David Ansari ac49cc638c Link from 4.1.0 release notes to blog post 2025-04-07 10:31:35 +02:00
Michael Klishin 6d1689c27c
Merge pull request #13690 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-4b109dad77
[skip ci] Bump the prod-deps group across 4 directories with 1 update
2025-04-05 16:15:22 -04:00
dependabot[bot] 74d7fbe3a2
[skip ci] Bump the prod-deps group across 4 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire).


Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 18:51:59 +00:00
Jean-Sébastien Pédron be19fc95ee
Merge pull request #13686 from rabbitmq/update-khepri_mnesia_migration-to-0.7.2
Update khepri_mnesia_migration from 0.7.1 to 0.7.2
2025-04-04 19:35:42 +02:00
Jean-Sébastien Pédron 860d9fcd9c
Update khepri_mnesia_migration from 0.7.1 to 0.7.2
Release notes:
https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.7.2

In particular, it makes sure that the Erlang node with the lowest Khepri
machine version is use as the cluster seed node. Otherwise these nodes
would not be able to apply commands from newer Khepri machines. See
rabbitmq/khepri_mnesia_migration#30.
2025-04-04 18:47:28 +02:00
Jean-Sébastien Pédron 9704d230fa
quorum_queue_SUITE: Improve reliability of a test
... by waiting for a state.
2025-04-04 18:46:29 +02:00
Michael Klishin 2af6181ece
Update 4.0.8 release notes
[skip ci]
2025-04-03 00:24:50 -04:00
Michael Klishin e23266253e
Merge pull request #13674 from rabbitmq/avoid-crash-on-stream-connections
Ignore stream connections in unexpected states
2025-04-02 22:56:20 -04:00
Michael Klishin 095e89718e
Merge pull request #13673 from rabbitmq/su_aws/peer_discovery_unlimited
Added 'unlimited' config setting for peer_discovery_retry_limit
2025-04-02 22:28:05 -04:00
Michal Kuratczyk 09ed8fdc07
Ignore stream connections in unexpected states
A connection which terminated before it was fully established
would lead to a function_clause, since metadata is not available
to really call notify_connection_closed. We can just ignore such
connections and not notify about them.

Resolves https://github.com/rabbitmq/rabbitmq-server/discussions/13670
2025-04-02 23:38:55 +02:00
Simon Unge b7c4f66a69 Added 'unlimited' config setting for peer_discovery_retry_limit 2025-04-02 18:34:32 +00:00
Michael Klishin 5a9482dfef
One more tweak to 4.1.0-rc.1 release notes 2025-04-02 13:00:45 -04:00
Michael Klishin 82480e42a7
4.1.0 release notes: upgrades from 3.13.x are supported 2025-04-01 22:48:03 -04:00
Michael Klishin 13542dcc5e
4.1.0 release notes: we're at rc.1 2025-04-01 22:41:23 -04:00
Michael Klishin 9360f671e8
4.1.0 release notes: QQ parallelism improvements is a release highlight 2025-04-01 22:36:57 -04:00
Michael Klishin 45f0f1cb97
4.0.8 release notes fixes 2025-04-01 22:05:18 -04:00
Michael Klishin 402eb3a883
Update 4.1.0 release notes 2025-04-01 22:03:55 -04:00
Michael Klishin 5b99c6b5b9
4.1.0-rc.1 release notes 2025-04-01 22:02:01 -04:00
Michael Klishin 213822eb5d
4.0.8 release notes
[skip ci]
2025-04-01 18:57:30 -04:00
Michael Klishin e83c286367
Merge pull request #13643 from rabbitmq/su_aws/try_to_leave_cluster_before_joining
Allow a previously reset node to rejoin its original cluster
2025-04-01 13:20:26 -04:00
Michael Klishin c8c7bfb9bf
Merge pull request #13664 from rabbitmq/use-relative-path-for-oauth-cookie
Use relative path for the path linked to the cookie
2025-04-01 13:06:00 -04:00
Michael Klishin e6bc6a451f
Naming #13643 2025-04-01 12:13:43 -04:00
Marcial Rosales 03fae668e0 Test management custom path on each commit to PRs 2025-04-01 17:01:09 +02:00
Marcial Rosales 8dfcfa61e4 Use relative path for the path linked to the cookie
used by mangement ui oauth logic to store the
token until it is moved onto the local storage
2025-04-01 14:02:51 +02:00
Karl Nilsson 4556999a84
Ra 2.16.6 (#13662)
What's Changed
* Allow force shrink to non-voter member
* ra_server_proc: Handle aux_command in all Raft states
* Increase shutdown timeout for segment writer.
* Avoid modification checks when reading sparse entries inside the Ra process
2025-04-01 12:01:11 +02:00
Simon Unge 36eb6cafc1 Update spec, noconnection is also a possible error 2025-03-31 21:54:02 +00:00
Simon Unge cdeabe22bc Dont handle the exception just let it out there 2025-03-31 21:16:06 +00:00
Simon Unge e1f2865eae Return the exception 2025-03-31 17:55:49 +00:00
Simon Unge 9ba545cbef Fix dialyzer issue. 2025-03-31 17:52:01 +00:00
Michael Klishin a1ec795184
Merge pull request #13657 from rabbitmq/stream-sac-re-evaluate-group-after-connection-down
Re-evaluate stream SAC group after connection down event
2025-03-31 12:33:54 -04:00
Arnaud Cogoluègnes 602b6acd7d
Re-evaluate stream SAC group after connection down event
The same connection can contain several consumers belonging to a SAC
group (group key = vhost + stream + consumer name). The whole new group
must be re-evaluated to select a new active consumer after the consumers
of the down connection are removed from it.

The previous behavior would not re-evaluate the new group and could
select a consumer from the down connection, letting the group with only
inactive consumers, as the selected active consumer would never receive
the activation message from the stream SAC coordinator.

This commit fixes this problem by removing the consumers of the down
down connection from the affected groups and then performing the
appropriate operations for the groups to keep on consuming (e.g.
notifying an active consumer that it needs to step down).

References #13372
2025-03-31 14:59:59 +02:00
Michael Klishin 12e600a791
Merge pull request #13653 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-cb8666ad41
[skip ci] Bump com.google.googlejavaformat:google-java-format from 1.25.2 to 1.26.0 in /deps/rabbit/test/amqp_jms_SUITE_data in the dev-deps group across 1 directory
2025-03-29 17:45:43 -04:00
dependabot[bot] d5fcab2af2
[skip ci] Bump com.google.googlejavaformat:google-java-format
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).


Updates `com.google.googlejavaformat:google-java-format` from 1.25.2 to 1.26.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.25.2...v1.26.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 18:07:51 +00:00
Simon Unge dd49cbe6c3 Mnesia: Ask to leave a cluster and retry to join if cluster already consider node a member.
Khepri: no-op. Khepri is less strict already, and rabbit_khepri:can_join would accept a join request from a node that is already a member
2025-03-28 21:24:08 +00:00
Michael Klishin cbb23d65bf
Merge pull request #13648 from rabbitmq/fix-flake-in-rabbit-fifo-int-SUITE
Fix flake(s) in rabbit_fifo_int_SUITE
2025-03-28 14:21:54 -04:00
Karl Nilsson e71fa51925 Speculative flake fix for amqpl_consumer_ack_SUITE.erl 2025-03-28 16:51:32 +00:00
Karl Nilsson 27be6c39d2
Merge pull request #13649 from rabbitmq/fix-debug-log-formatting
[skip ci] fix debug log formatting
2025-03-28 16:51:04 +00:00
Michal Kuratczyk 9699393da7
[skip ci] fix debug log formatting 2025-03-28 17:47:13 +01:00
Karl Nilsson 1d9f179562 Fix flake(s) in rabbit_fifo_int_SUITE
The start_cluster helper used the same UID (!!) for all members
in the local cluster. This resulted in shared mem tables and
all sorts of havoc.
2025-03-28 13:37:18 +00:00
Michal Kuratczyk f0976b48b2
queue info metric: guard against whereis returning `undefined` (#13646) 2025-03-28 12:37:42 +01:00
Michael Klishin 00a7898dbe
Merge pull request #13645 from rabbitmq/revert-13344-issue-12545
Revert "Redirect to end_session_endpoint for idp_initiated logon when it is configured"
2025-03-28 02:31:48 -04:00
Michael Klishin 3756775ebe
Revert "Redirect to end_session_endpoint for idp_initiated logon when it is configured" 2025-03-28 02:31:09 -04:00
Michael Klishin bde9868c1e
Merge pull request #13344 from rabbitmq/issue-12545
Redirect to end_session_endpoint for idp_initiated logon when it is configured
2025-03-27 20:32:20 -04:00
Marcial Rosales 46808c3ea6
Test with oauth2-proxy 2025-03-27 19:01:13 -04:00
Michael Klishin ab8799a739
Redirect to end_session_endpoint for idp-initiated logon
Conflicts:
	selenium/bin/components/fakeportal
2025-03-27 19:01:01 -04:00
Michael Klishin 860bb7c47b
Merge pull request #13638 from rabbitmq/ra-2.16.5 2025-03-27 14:33:19 -04:00
Karl Nilsson 4fe96dfd27 Ra 2.16.5 - bug fixes and minor improvements
Ra improvements:

* Don't allow a non-voter to start elections
* Register with ra directory before initialising ra server.
* Trigger tick_timeout immediately after entering leader state.
* Set a configurable segment max size

This commit also includes a change to turn the quorum queue
become leader callback to become a noop and instead rely on
the more promptly tick_handler to handle the meta data store
update after a leader election.

This more prompt tick update means there should be a much shorter
gap between the queue metrics being deleted from the old leader
node to them being available again on the new node resulting
in smoother message count metrics.

Fix test that relied on waiting on too simplistic a property
before asserting.
2025-03-27 17:06:31 +00:00
Michal Kuratczyk 2a93bbcebd
RMQ-1460: Emit queue_info metric (#13583)
To allow filtering on queue type or membership status,
we need an info metric for queues; see
https://grafana.com/blog/2021/08/04/how-to-use-promql-joins-for-more-effective-queries-of-prometheus-metrics-at-scale/#info-metrics

With this change, per-object metrics and the detailed metrics
(if queue-related families are requested) will contain
rabbitmq_queue_info / rabbitmq_detailed_queue_info with a value of 1
and labels including the queue name, vhost, queue type and membership
status.
2025-03-27 15:54:26 +01:00
David Ansari c151806f7c Apply PR formatting feedback
https://github.com/rabbitmq/rabbitmq-server/pull/13625#discussion_r2016008850
https://github.com/rabbitmq/rabbitmq-server/pull/13625#discussion_r2016010107
2025-03-27 11:30:23 +01:00
David Ansari ef1a595a13 Fix crash when consuming from unavailable quorum queue
Prior to this commit, when a client consumed from an unavailable quorum
queue, the following crash occurred:
```
{badmatch,{error,noproc}}
[{rabbit_quorum_queue,consume,3,[{file,\"rabbit_quorum_queue.erl\"},{line,993}]}
```

This commit fixes this bug by returning any error when registering a
quorum queue consumer to rabbit_queue_type.

This commit also refactors errors returned by
rabbit_queue_type:consume/3 to simplify and ensure seperation of
concerns.

For example prior to this commit, the channel did error
formatting specifically for consuming from streams. It's better if
the channel is unaware of what queue type it consumes from and have each
queue type implementation format their own errors.
2025-03-27 11:30:23 +01:00
David Ansari 44657cd393 Bump timeout in RabbitMQ AMQP 1.0 Erlang client
Bump the timeout for management operations and link attachments from 20s
to 30s. We've seen timeouts in CI.

We bump the poll interval of the `?awaitMatch` macro because CI
sometimes flaked by crashing in
0e803de6dd/deps/rabbitmq_amqp_client/src/rabbitmq_amqp_client.erl (L411)
which indicates that the client lib received a response from a previous
request.
2025-03-27 10:48:49 +01:00
Michael Klishin 0e803de6dd
Merge pull request #13634 from rabbitmq/mk-shovel-http-api-metrics
New Shovel management UI metrics
2025-03-27 00:53:43 -04:00
Iliia Khaprov 9efa0d9ffe
RMQ-1263: Shovel Management - add help strings for shovel counters
(cherry picked from commit 8e79a7f500c2df355f3ec7ac1fa1bdd3a8dff6a4)
2025-03-27 00:49:46 -04:00
Iliia Khaprov 6e871f6ab3
RMQ-1263: Shovels Management: show metrics (incl. forwarded counter) in the Shovel Status page
(cherry picked from commit f90dab71f147548c5e9ad921a0bc618179bd34c2)

Conflicts:
	deps/rabbitmq_shovel_management/src/rabbit_shovel_mgmt_util.erl
2025-03-27 00:49:08 -04:00
Michael Klishin bb7cd8381e
Merge pull request #13629 from rabbitmq/lukebakken/rmq-1585
Use case-insensitive `lists:member`
2025-03-26 22:20:49 -04:00
Luke Bakken 9bcd4328d2
Use case-insensitive `lists:member`
References:
* [`RMQ-1585`](https://vmw-jira.broadcom.net/browse/RMQ-1585)
* https://github.com/lukebakken/rmq-1585
2025-03-26 16:40:23 -07:00
Michael Klishin 9439756d62
Merge pull request #13628 from rabbitmq/ik-13620-shovel-forward-counter-followup
RMQ-1263: An attempt to make shovel status tuple handling backwards compatible
2025-03-26 16:20:46 -04:00
Michael Klishin 03526b51db
#13628 pass Dialyzer 2025-03-26 15:12:24 -04:00
Iliia Khaprov 4eda17bee2 RMQ-1263: An attempt to make shovel status tuple handling backwards compatible 2025-03-26 20:03:09 +01:00
Michael Klishin 11546aafa5
Merge pull request #13620 from rabbitmq/mk-shovel-forwarding-header-and-metric
Shovel: keep track of forwarded message count (a new metric)
2025-03-26 13:54:46 -04:00
Iliia Khaprov 1f20543ee3 RMQ-1263: shovel forward counter: try fixing rolling_upgrade_SUITE 2025-03-26 18:03:20 +01:00
Michael Klishin b568214980
Merge pull request #13623 from rabbitmq/loic-fix-cli-windows
Fix the CLI's main module on Windows
2025-03-26 11:47:28 -04:00
Loïc Hoguin fb985bb8b9
Fix the CLI's main module on Windows 2025-03-26 16:32:38 +01:00
Michael Klishin a0e6c23a82
Update 4.1.0.md 2025-03-26 09:26:06 -04:00
Karl Nilsson 26fa541e2c
Merge pull request #13587 from rabbitmq/qq-checkpointing-tweaks-2
QQ: Revise checkpointing logic to take more frequent checkpoints for large message workloads
2025-03-26 10:43:50 +00:00
Iliia Khaprov 63b5859360 RMQ-1263: readd lost shovel_prometheus parts 2025-03-26 11:22:36 +01:00
Karl Nilsson 6695282640 QQ: Revise checkpointing logic
To take more frequent checkpoints for large message workload

Lower the min_checkpoint_interval substantially to allow quorum queues
better control over when checkpoints are taken.

Track bytes enqueued in the aux state and suggest a checkpoint after
every 64MB enqueued (this value is scaled according to backlog just
like the indexes condition).
This should help with more timely checkpointing when very large
messages is used.

Try evaluating byte size independently of time window

also increase max size
2025-03-26 08:23:52 +00:00
Iliia Khaprov c2569d26f2
RMQ-1263: Shovels forward counter - fix dialyzer
(cherry picked from commit af22cf427a7054d93b3dd64fda01a86649fdd7c5)
2025-03-25 21:11:37 -04:00
Diana Parra Corbacho d4c1121c77
RMQ-1263: dialyze, unused var
(cherry picked from commit 68872f81074d378f76ffa44e7111e7979cdd8fd0)
2025-03-25 21:11:30 -04:00
Iliia Khaprov e3430aa56d
RMQ-1263: Shovel: add forwarded counter
Delayed queuese can automatically create associated Shovels to transfer Ready messages
to the desired destination. This adds forwarded messages counter which will be used
in Management UI for better Shovel internals visibility.

(cherry picked from commit a8800b6cd75d8dc42a91f88655058f2ffa3b6ea6)
2025-03-25 21:11:22 -04:00
Michael Klishin 3a30917809
Merge pull request #13603 from rabbitmq/remove-redundant-queue-type-function
Remove redundant rabbit_queue_type APIs
2025-03-25 17:43:43 -04:00
Loïc Hoguin 0a7c86b480
Fix the exception logged by Cowboy caused by double reply (#13612)
Issue introduced in 383ddb1634.

Authored-by: @lhoguin.
2025-03-25 17:12:57 -04:00
Michael Klishin 28a407cf7b
Merge pull request #13604 from rabbitmq/ik-fix-is_type-in-management-ui
Switch is_<queue_type> to using queue.type field in Management UI
2025-03-25 01:31:17 -04:00
Michael Klishin d65457df74
Merge pull request #13607 from rabbitmq/mk-cuttlefish-3.5.0
Bump Cuttlefish to 3.5.0
2025-03-25 01:00:20 -04:00
Michael Klishin 265e273eda
Bump Cuttlefish to 3.5.0 2025-03-25 00:04:25 -04:00
Iliia Khaprov 8ae0163643 Switch is_<queue_type> to using queue.type field
Also, since queue.type field rendered by QueueMod:format and all queues had it hard-coded here,
I unhardcode them here to use Type name.
2025-03-24 19:15:20 +01:00
Karl Nilsson 0410b7e4a6 Remove rabbit_queue_type:to_binary/1
As it is covered by rabbit_queue_type:short_alias_of/1
2025-03-24 16:28:35 +00:00
Karl Nilsson 73c6f9686f Remove rabbit_queue_type:feature_flag_name/1
As this functionality is covered by the rabbit_queue_type:is_enabled/1
API.
2025-03-24 14:49:54 +00:00
Arnaud Cogoluègnes b8244f70f4
Pull from socket up to 10 times in stream test utils (#13588)
To make sure to have enough data to complete a command.
2025-03-24 09:13:31 +01:00
Michael Klishin 41dfa6aa99
Merge pull request #13591 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/prod-deps-66a7dc9ee7
[skip ci] Bump the prod-deps group across 2 directories with 3 updates
2025-03-22 17:55:58 -04:00
dependabot[bot] 513ade1b8c
[skip ci] Bump the prod-deps group across 2 directories with 3 updates
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 3 updates in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot), [org.jetbrains.kotlin:kotlin-test](https://github.com/JetBrains/kotlin) and org.jetbrains.kotlin:kotlin-maven-allopen.


Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.3 to 3.4.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.3...v3.4.4)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.3 to 3.4.4
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.3...v3.4.4)

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

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

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 18:12:07 +00:00
Loïc Hoguin bb208858a1
Merge pull request #13580 from rabbitmq/loic-update-erlang.mk
Update Erlang.mk
2025-03-20 20:15:52 +01:00
Loïc Hoguin b34a7227b3
Update Erlang.mk 2025-03-20 15:24:05 +01:00
Michael Klishin 22e4853e7d
4.1.0 release notes: update Ra version 2025-03-20 02:13:14 -04:00
Michael Klishin 5d882a18f7
4.1.0 release notes updates for beta.5 2025-03-20 02:05:58 -04:00
Michael Klishin 41245faa80
Merge pull request #13512 from rabbitmq/mgmt-ui-page-name
Change browser tab/window title according to currently loaded view (tab)
2025-03-19 15:45:48 -04:00
Michael Klishin f2da1b5544
Extend the idea in #13512 to a few more tabs 2025-03-19 15:44:18 -04:00
Michael Klishin e275f77c4c
HTTP API: tests for the /health/checks/quorum-queues-without-elected* endpoints 2025-03-19 15:44:18 -04:00
Michael Klishin c8f24f535c
New HTTP API health check endpoints
for the check introduced in #13487.

Note that encoding a regular expression pattern
with percent encoding is a pain (e.g. '.*' = '.%2a'),
so these endpoints fall back to a default pattern
value that matches all queues.
2025-03-19 15:44:18 -04:00
David Ansari a7fb56beeb
Auto widen session incoming-window in AMQP 1.0 client
This commit fixes a bug in the Erlang AMQP 1.0 client.

Prior to this commit, to repro this bug:
1. Send more than 2^16 messages to a queue.
2. Grant more than a total of 2^16 link credit initially (on a single link
   or across multiple links) on a single session without any
   auto or manual link credit renewal.

The expectation is that thanks to sufficiently granted initial link-credit,
the client will receive all messages.
However, consumption stops after exactly 2^16-1 messages.

That's because the client lib was never sending a flow frame to the server.
So, after the client received all 2^16-1 messages (the initial
incoming-window set by the client), the server's remote-incoming-window
reached 0 causing the server to stop delivering messages.

The expectation is that the client lib automatically handles session
flow control without any manual involvement of the client app.

This commit implements this fix:
* We keep the server's remote-incoming window always large by default as
  explained in https://www.rabbitmq.com/blog/2024/09/02/amqp-flow-control#incoming-window
* Hence, the client lib sets its incoming-window to 100,000 initially.
* The client lib tracks its incoming-window decrementing it by 1 for
  every transfer it received. (This wasn't done prior to this commit.)
* Whenever this window shrinks below 50,000, the client sends a flow
  frame without any link information widening its incoming-window back to 100,000.
* For test cases (maybe later for apps as well), there is a new function
  `amqp10_client_session:flow/3`, which allows for a test case to do manual
  session flow control. Its API is designed very similar to
  `amqp10_client_session:flow_link/4` in that the test can optionally request
  the lib to auto widen the session window whenever it falls below a certain threshold.
2025-03-19 15:44:18 -04:00
Ayanda Dube 1ccfc0dbfd
extend rabbit_amqqueue_SUITE with internal_no_owner_queue_delete_with/1 and add amqqueue:make_internal/{1,2} type specs 2025-03-19 15:44:17 -04:00
Michael Klishin 2472e450ff
By @efimov90: a dark theme for the management UI (#13567)
This is a squashed commit that includes the following changes by @efimov90:

* Initial-theme-fix

Added light.css
Added dark.css
Added link for light.css and dark.css with media attribute
Added switcher

* Rework-light-style

* dark theme

* Removed not needed div

* Fix folder name

* Color scheme fix

Removes color-scheme from main.css
Added color-scheme: dark to dark.css
Added color-scheme: light to light.css

* Fixed theme switch bug with sammy.js

Adapts code to works with sammy.js

* Icons update

* Reworked theme switcher

* Fix updating attributes

---------

Authored-by: Sergey Efimov <efimov90@gmail.com>
2025-03-19 15:44:17 -04:00
Jean-Sébastien Pédron 0ec51745f0
rabbit_khepri: Remove setup retries
[Why]
Khepri already managed retries if needed, we can just use a timeout.

Note that the timeout was already bumped to a more appropriate 5
minutes, which also matches what we had with Mnesia. However, with 10
retries by default, it meant that this timeout at the end of `init/1`
would thus be 5 * 10 = 50 minutes.
2025-03-19 15:44:17 -04:00
David Ansari 8b9e7ce4f6
Improve log message for non-AMQP clients on AMQP port
This is a follow up to #13559 addressing the feedback in
https://github.com/rabbitmq/rabbitmq-server/pull/13559#discussion_r2000439237

The improved logs look as follows:
```
openssl s_client -connect localhost:5672 -tls1_3

[info] <0.946.0> accepting AMQP connection [::1]:49321 -> [::1]:5672
[error] <0.946.0> closing AMQP connection [::1]:49321 -> [::1]:5672 (duration: '0ms'):
[error] <0.946.0> TLS client detected on non-TLS AMQP port. Ensure the client is connecting to the correct port.
```

```
curl http://localhost:5672

[info] <0.954.0> accepting AMQP connection [::1]:49402 -> [::1]:5672
[error] <0.954.0> closing AMQP connection [::1]:49402 -> [::1]:5672 (duration: '0ms'):
[error] <0.954.0> HTTP GET request detected on AMQP port. Ensure the client is connecting to the correct port
```

```
telnet localhost 5672
Trying ::1...
Connected to localhost.
Escape character is '^]'.
hello

[info] <0.946.0> accepting AMQP connection [::1]:49664 -> [::1]:5672
[error] <0.946.0> closing AMQP connection [::1]:49664 -> [::1]:5672 (duration: '2s'):
[error] <0.946.0> client did not start with AMQP protocol header: <<"hello\r\n\r">>
```
2025-03-19 15:44:17 -04:00
Loïc Hoguin 2f0595a95a
Use Erlang.mk's native Elixir support for CLI
This avoids using Mix while compiling which simplifies
a number of things and let us do further build improvements
later on.

Elixir is only enabled from within rabbitmq_cli currently.

Eunit is disabled since there are only Elixir tests.

Dialyzer will force-enable Elixir in order to process
Elixir-compiled beam files.

This commit also includes a few changes that are
related:

 * The Erlang distribution will now be started for parallel-ct

 * Many unnecessary PROJECT_MOD lines have been removed

 * `eunit_formatters` has been removed, it provides little value

 * The new `maybe_flock` Erlang.mk function is used where possible

 * Build test deps when testing rabbitmq_cli (Mix won't do it anymore)

 * rabbitmq_ct_helpers now use the early plugins to have Dialyzer
   properly set up
2025-03-19 15:44:17 -04:00
David Ansari 76033adc6e
Detect misconfigured HTTP clients
It also happens from time to time that HTTP clients use the wrong port
5672. Like for TLS clients connecting to 5672, RabbitMQ now prints a
more descriptive log message.

For example
```
curl http://localhost:5672
```
will log
```
[info] <0.946.0> accepting AMQP connection [::1]:57736 -> [::1]:5672
[error] <0.946.0> closing AMQP connection <0.946.0> ([::1]:57736 -> [::1]:5672, duration: '1ms'):
[error] <0.946.0> {detected_unexpected_http_header,<<"GET / HT">>}
```

We only check here for GET and not for all other HTTP methods, since
that's the most common case.
2025-03-19 15:44:17 -04:00
David Ansari e33d4d5489
Log clearer message if TLS client connects to AMQP port
## What?

If a TLS client app is misconfigured trying to connect to AMQP port 5672
instead to the AMQPS port 5671, this commit makes RabbitMQ log a more
descriptive error message.

```
openssl s_client -connect localhost:5672 -tls1_3
openssl s_client -connect localhost:5672 -tls1_2
```

RabbitMQ logs prior to this commit:
```
[info] <0.1073.0> accepting AMQP connection [::1]:53535 -> [::1]:5672
[error] <0.1073.0> closing AMQP connection <0.1073.0> ([::1]:53535 -> [::1]:5672, duration: '0ms'):
[error] <0.1073.0> {bad_header,<<22,3,1,0,192,1,0,0>>}

[info] <0.1080.0> accepting AMQP connection [::1]:53577 -> [::1]:5672
[error] <0.1080.0> closing AMQP connection <0.1080.0> ([::1]:53577 -> [::1]:5672, duration: '1ms'):
[error] <0.1080.0> {bad_header,<<22,3,1,0,224,1,0,0>>}
```

RabbitMQ logs after this commit:
```
[info] <0.969.0> accepting AMQP connection [::1]:53632 -> [::1]:5672
[error] <0.969.0> closing AMQP connection <0.969.0> ([::1]:53632 -> [::1]:5672, duration: '0ms'):
[error] <0.969.0> {detected_unexpected_tls_header,<<22,3,1,0,192,1,0,0>>

[info] <0.975.0> accepting AMQP connection [::1]:53638 -> [::1]:5672
[error] <0.975.0> closing AMQP connection <0.975.0> ([::1]:53638 -> [::1]:5672, duration: '1ms'):
[error] <0.975.0> {detected_unexpected_tls_header,<<22,3,1,0,224,1,0,0>>}
```

 ## Why?

I've seen numerous occurrences in the past few years where misconfigured TLS apps
connected to the wrong port. Therefore, RabbitMQ trying to detect a TLS client
and providing a more descriptive log message seems appropriate to me.

 ## How?

The first few bytes of any TLS connection are:

Record Type (1 byte):
Always 0x16 (22 in decimal) for a Handshake message.

Version (2 bytes):
This represents the highest version of TLS that the client supports. Common values:
0x0301 → TLS 1.0 (or SSL 3.1)
0x0302 → TLS 1.1
0x0303 → TLS 1.2
0x0304 → TLS 1.3

Record Length (2 bytes):
Specifies the length of the following handshake message.

Handshake Type (1 byte, usually the 6th byte overall):
Always 0x01 for ClientHello.
2025-03-19 15:44:17 -04:00
Michael Klishin 480687f3d8
Mention #13541 #13542 #13549 13551 in release notes
References #13537.
2025-03-19 15:44:16 -04:00
Arnaud Cogoluègnes 70827dee4a
Commit generated code after FRAME-MIN-SIZE change
References #13541
2025-03-19 15:44:16 -04:00
Aitor Perez a458b93876
Trigger OCI builds on changes to its Dockerfile 2025-03-19 15:44:16 -04:00
Aitor Perez b28b25e4b4
Trigger OCI builds only on code changes
Prior to this change, we built the OCI for almost any change. That
doesn't make sense. For example, when there were changes to CI, it
didn't make because RabbitMQ had not changed.

CI will now build dev OCI images when there are actual code changes, or
changes to rabbit dependencies.
2025-03-19 15:44:16 -04:00
Aitor Perez 2e118aebb7
CI: use OTP 27 for tests
Erlang 27 is fully supported in main and v4.1.x. Support for Erlang 26
in v4.1 remains. It's better to "drop" erlang 26 from CI because, at the
moment, our PRs and commits to main trigger about 270 jobs. If we just
add '27' to the matrix, we would spawn ~216 more jobs, totalling around
496 jobs per PR and commit to main. That's simply too much, because it's
reaching the usage limits of Github Actions [1], namely the 256 limit of
matrix jobs.

[1]
https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits
2025-03-19 15:44:16 -04:00
Arnaud Cogoluègnes 7e7a0f3a71
Increase FRAME-MIN-SIZE in AMQP 0-9-1 code generation file
References #13541
2025-03-19 15:44:16 -04:00
Michael Klishin 8910430aef
Increase initial AMQP 0-9-1 connection frame size limit
Before the client authenticates, the standard
frame_max is not used. Instead, the limit is
a special constant.

This is fine for password or x.509 certificate-based
authentication but not for some JWT tokens,
which can vary in size, and take multiple
kilobytes.

8 kB specifically is the default HTTP header
length limit used by Nginx.
Sounds like this value was good enough
for a lot of Bearer headers with JWT tokens.

Closes #13541.
2025-03-19 15:44:15 -04:00
dependabot[bot] f50691b2cd
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-19 15:44:15 -04:00
Aitor Perez 16f8e515c2
Remove Bazel lines from Makefile 2025-03-19 15:44:15 -04:00
Aitor Perez be30e9dc1d
Remove Bazel files 2025-03-19 15:44:15 -04:00
Michael Klishin 826e6c72f6
Merge pull request #13571 from rabbitmq/rabbitmq-server-13433-mk-http-api-endpoints
New HTTP API health check endpoints
2025-03-19 13:23:27 -04:00
Michael Klishin c8866933da
Merge pull request #13574 from rabbitmq/amqp-client-incoming-window
Auto widen session incoming-window in AMQP 1.0 client
2025-03-19 13:20:53 -04:00
David Ansari 32854e8d34 Auto widen session incoming-window in AMQP 1.0 client
This commit fixes a bug in the Erlang AMQP 1.0 client.

Prior to this commit, to repro this bug:
1. Send more than 2^16 messages to a queue.
2. Grant more than a total of 2^16 link credit initially (on a single link
   or across multiple links) on a single session without any
   auto or manual link credit renewal.

The expectation is that thanks to sufficiently granted initial link-credit,
the client will receive all messages.
However, consumption stops after exactly 2^16-1 messages.

That's because the client lib was never sending a flow frame to the server.
So, after the client received all 2^16-1 messages (the initial
incoming-window set by the client), the server's remote-incoming-window
reached 0 causing the server to stop delivering messages.

The expectation is that the client lib automatically handles session
flow control without any manual involvement of the client app.

This commit implements this fix:
* We keep the server's remote-incoming window always large by default as
  explained in https://www.rabbitmq.com/blog/2024/09/02/amqp-flow-control#incoming-window
* Hence, the client lib sets its incoming-window to 100,000 initially.
* The client lib tracks its incoming-window decrementing it by 1 for
  every transfer it received. (This wasn't done prior to this commit.)
* Whenever this window shrinks below 50,000, the client sends a flow
  frame without any link information widening its incoming-window back to 100,000.
* For test cases (maybe later for apps as well), there is a new function
  `amqp10_client_session:flow/3`, which allows for a test case to do manual
  session flow control. Its API is designed very similar to
  `amqp10_client_session:flow_link/4` in that the test can optionally request
  the lib to auto widen the session window whenever it falls below a certain threshold.
2025-03-19 16:29:02 +00:00
Michael Klishin e93afc5c5b
Merge pull request #13565 from Ayanda-D/extend-amqqueue-tests
Extend rabbit_amqqueue_SUITE and add amqqueue:make_internal/{1,2} type specs
2025-03-19 02:54:45 -04:00
Michael Klishin e6bd1fea84
HTTP API: tests for the /health/checks/quorum-queues-without-elected* endpoints 2025-03-19 01:57:05 -04:00
Michael Klishin ab1664c8de
By @efimov90: a dark theme for the management UI (#13567)
This is a squashed commit that includes the following changes by @efimov90:

* Initial-theme-fix

Added light.css
Added dark.css
Added link for light.css and dark.css with media attribute
Added switcher

* Rework-light-style

* dark theme

* Removed not needed div

* Fix folder name

* Color scheme fix

Removes color-scheme from main.css
Added color-scheme: dark to dark.css
Added color-scheme: light to light.css

* Fixed theme switch bug with sammy.js

Adapts code to works with sammy.js

* Icons update

* Reworked theme switcher

* Fix updating attributes

---------

Authored-by: Sergey Efimov <efimov90@gmail.com>
2025-03-19 00:30:00 -04:00
Michael Klishin 601d4f2b6c
New HTTP API health check endpoints
for the check introduced in #13487.

Note that encoding a regular expression pattern
with percent encoding is a pain (e.g. '.*' = '.%2a'),
so these endpoints fall back to a default pattern
value that matches all queues.
2025-03-18 11:04:56 -04:00
Jean-Sébastien Pédron 14d53f83cd
Merge pull request #13533 from rabbitmq/remove-setup-retries-in-rabbit_khepri
Khepri: Remove setup retries
2025-03-18 14:29:32 +01:00
David Ansari 5bfccbaa28 Improve log message for non-AMQP clients on AMQP port
This is a follow up to #13559 addressing the feedback in
https://github.com/rabbitmq/rabbitmq-server/pull/13559#discussion_r2000439237

The improved logs look as follows:
```
openssl s_client -connect localhost:5672 -tls1_3

[info] <0.946.0> accepting AMQP connection [::1]:49321 -> [::1]:5672
[error] <0.946.0> closing AMQP connection [::1]:49321 -> [::1]:5672 (duration: '0ms'):
[error] <0.946.0> TLS client detected on non-TLS AMQP port. Ensure the client is connecting to the correct port.
```

```
curl http://localhost:5672

[info] <0.954.0> accepting AMQP connection [::1]:49402 -> [::1]:5672
[error] <0.954.0> closing AMQP connection [::1]:49402 -> [::1]:5672 (duration: '0ms'):
[error] <0.954.0> HTTP GET request detected on AMQP port. Ensure the client is connecting to the correct port
```

```
telnet localhost 5672
Trying ::1...
Connected to localhost.
Escape character is '^]'.
hello

[info] <0.946.0> accepting AMQP connection [::1]:49664 -> [::1]:5672
[error] <0.946.0> closing AMQP connection [::1]:49664 -> [::1]:5672 (duration: '2s'):
[error] <0.946.0> client did not start with AMQP protocol header: <<"hello\r\n\r">>
```
2025-03-18 13:36:12 +01:00
Ayanda Dube 762c2ee65a extend rabbit_amqqueue_SUITE with internal_no_owner_queue_delete_with/1 and add amqqueue:make_internal/{1,2} type specs 2025-03-18 11:49:58 +00:00
Loïc Hoguin d52b333649
Merge pull request #12922 from rabbitmq/loic-native-elixir
Native Elixir support in Erlang.mk
2025-03-18 11:03:04 +01:00
Loïc Hoguin c5d150a7ef
Use Erlang.mk's native Elixir support for CLI
This avoids using Mix while compiling which simplifies
a number of things and let us do further build improvements
later on.

Elixir is only enabled from within rabbitmq_cli currently.

Eunit is disabled since there are only Elixir tests.

Dialyzer will force-enable Elixir in order to process
Elixir-compiled beam files.

This commit also includes a few changes that are
related:

 * The Erlang distribution will now be started for parallel-ct

 * Many unnecessary PROJECT_MOD lines have been removed

 * `eunit_formatters` has been removed, it provides little value

 * The new `maybe_flock` Erlang.mk function is used where possible

 * Build test deps when testing rabbitmq_cli (Mix won't do it anymore)

 * rabbitmq_ct_helpers now use the early plugins to have Dialyzer
   properly set up
2025-03-18 10:02:49 +01:00
Michael Klishin d5b883223f
Merge pull request #13559 from rabbitmq/tls-header
Log clearer message if TLS client connects to AMQP port
2025-03-17 19:26:25 -04:00
David Ansari 11e56bdd2d Detect misconfigured HTTP clients
It also happens from time to time that HTTP clients use the wrong port
5672. Like for TLS clients connecting to 5672, RabbitMQ now prints a
more descriptive log message.

For example
```
curl http://localhost:5672
```
will log
```
[info] <0.946.0> accepting AMQP connection [::1]:57736 -> [::1]:5672
[error] <0.946.0> closing AMQP connection <0.946.0> ([::1]:57736 -> [::1]:5672, duration: '1ms'):
[error] <0.946.0> {detected_unexpected_http_header,<<"GET / HT">>}
```

We only check here for GET and not for all other HTTP methods, since
that's the most common case.
2025-03-17 23:43:07 +01:00
David Ansari 7ed3a0b0d8 Log clearer message if TLS client connects to AMQP port
## What?

If a TLS client app is misconfigured trying to connect to AMQP port 5672
instead to the AMQPS port 5671, this commit makes RabbitMQ log a more
descriptive error message.

```
openssl s_client -connect localhost:5672 -tls1_3
openssl s_client -connect localhost:5672 -tls1_2
```

RabbitMQ logs prior to this commit:
```
[info] <0.1073.0> accepting AMQP connection [::1]:53535 -> [::1]:5672
[error] <0.1073.0> closing AMQP connection <0.1073.0> ([::1]:53535 -> [::1]:5672, duration: '0ms'):
[error] <0.1073.0> {bad_header,<<22,3,1,0,192,1,0,0>>}

[info] <0.1080.0> accepting AMQP connection [::1]:53577 -> [::1]:5672
[error] <0.1080.0> closing AMQP connection <0.1080.0> ([::1]:53577 -> [::1]:5672, duration: '1ms'):
[error] <0.1080.0> {bad_header,<<22,3,1,0,224,1,0,0>>}
```

RabbitMQ logs after this commit:
```
[info] <0.969.0> accepting AMQP connection [::1]:53632 -> [::1]:5672
[error] <0.969.0> closing AMQP connection <0.969.0> ([::1]:53632 -> [::1]:5672, duration: '0ms'):
[error] <0.969.0> {detected_unexpected_tls_header,<<22,3,1,0,192,1,0,0>>

[info] <0.975.0> accepting AMQP connection [::1]:53638 -> [::1]:5672
[error] <0.975.0> closing AMQP connection <0.975.0> ([::1]:53638 -> [::1]:5672, duration: '1ms'):
[error] <0.975.0> {detected_unexpected_tls_header,<<22,3,1,0,224,1,0,0>>}
```

 ## Why?

I've seen numerous occurrences in the past few years where misconfigured TLS apps
connected to the wrong port. Therefore, RabbitMQ trying to detect a TLS client
and providing a more descriptive log message seems appropriate to me.

 ## How?

The first few bytes of any TLS connection are:

Record Type (1 byte):
Always 0x16 (22 in decimal) for a Handshake message.

Version (2 bytes):
This represents the highest version of TLS that the client supports. Common values:
0x0301 → TLS 1.0 (or SSL 3.1)
0x0302 → TLS 1.1
0x0303 → TLS 1.2
0x0304 → TLS 1.3

Record Length (2 bytes):
Specifies the length of the following handshake message.

Handshake Type (1 byte, usually the 6th byte overall):
Always 0x01 for ClientHello.
2025-03-17 22:48:42 +01:00
Michael Klishin 18533d4dee
Mention #13541 #13542 #13549 13551 in release notes
References #13537.
2025-03-17 16:54:31 -04:00
Arnaud Cogoluègnes 302fb38df2
Merge pull request #13554 from rabbitmq/increase-frame-size-limit-091-generated-code
Commit generated code after FRAME-MIN-SIZE change
2025-03-17 17:23:52 +01:00
Arnaud Cogoluègnes 0dc55be1d3 Commit generated code after FRAME-MIN-SIZE change
References #13541
2025-03-17 17:04:38 +01:00
Aitor Pérez Cedres 24a0f29ae1
Merge pull request #13534 from rabbitmq/ci/refine-oci-triggers
Refine CI triggers for building OCI
2025-03-17 13:29:33 +00:00
Aitor Pérez Cedres dcf1bbc72d
Merge pull request #13552 from rabbitmq/ci/ci-otp-27
Use Erlang 27 in CI for tests
2025-03-17 12:54:43 +00:00
Aitor Perez 3596ee9533
CI: use OTP 27 for tests
Erlang 27 is fully supported in main and v4.1.x. Support for Erlang 26
in v4.1 remains. It's better to "drop" erlang 26 from CI because, at the
moment, our PRs and commits to main trigger about 270 jobs. If we just
add '27' to the matrix, we would spawn ~216 more jobs, totalling around
496 jobs per PR and commit to main. That's simply too much, because it's
reaching the usage limits of Github Actions [1], namely the 256 limit of
matrix jobs.

[1]
https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits
2025-03-17 11:23:21 +00:00
Aitor Perez 8fc3ce990a
Trigger OCI builds on changes to its Dockerfile 2025-03-17 10:53:09 +00:00
Aitor Perez ed033772cb
Trigger OCI builds only on code changes
Prior to this change, we built the OCI for almost any change. That
doesn't make sense. For example, when there were changes to CI, it
didn't make because RabbitMQ had not changed.

CI will now build dev OCI images when there are actual code changes, or
changes to rabbit dependencies.
2025-03-17 10:53:02 +00:00
Arnaud Cogoluègnes 60fc3b14a6
Merge pull request #13549 from rabbitmq/increase-frame-size-limit-091
Increase FRAME-MIN-SIZE in AMQP 0-9-1 code generation file
2025-03-17 11:19:59 +01:00
Arnaud Cogoluègnes 34ed66037c Increase FRAME-MIN-SIZE in AMQP 0-9-1 code generation file
References #13541
2025-03-17 11:05:20 +01:00
Michael Klishin cc0989f679
Merge pull request #13542 from rabbitmq/rabbitmq-server-13541
Increase initial AMQP 0-9-1 connection frame size limit
2025-03-15 19:55:47 -04:00
Michael Klishin b8078874a7
Increase initial AMQP 0-9-1 connection frame size limit
Before the client authenticates, the standard
frame_max is not used. Instead, the limit is
a special constant.

This is fine for password or x.509 certificate-based
authentication but not for some JWT tokens,
which can vary in size, and take multiple
kilobytes.

8 kB specifically is the default HTTP header
length limit used by Nginx.
Sounds like this value was good enough
for a lot of Bearer headers with JWT tokens.

Closes #13541.
2025-03-15 18:22:55 -04:00
Michael Klishin ecf26b2670
Merge pull request #13538 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-1af6299c8b
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
2025-03-15 14:45:53 -04:00
dependabot[bot] ea71ef5ab6
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.0 to 5.12.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.0...r5.12.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 18:31:53 +00:00
Jean-Sébastien Pédron 67d9d89f1a
rabbit_khepri: Remove setup retries
[Why]
Khepri already managed retries if needed, we can just use a timeout.

Note that the timeout was already bumped to a more appropriate 5
minutes, which also matches what we had with Mnesia. However, with 10
retries by default, it meant that this timeout at the end of `init/1`
would thus be 5 * 10 = 50 minutes.
2025-03-14 17:25:25 +01:00
Aitor Pérez Cedres dcd5415a18
Merge pull request #13514 from rabbitmq/remove-bazel-files
Remove Bazel files
2025-03-14 12:06:19 +00:00
Iliia Khaprov a0abfaa5b0 Change browser tab/window title according to currently loaded 'page'.
It is very hard now to distinguish different tabs. With this addition
we have titles like 'RabbitMQ - Queue vhost/name', 'RabbitMQ - Exchanges'.
To be continued...
2025-03-14 09:42:53 +01:00
Michael Klishin f9a1ed9559
Merge pull request #13528 from rabbitmq/ik-dpc-cli-force-queue-deletion
By @ikavgo: add a --force option to 'rabbitmqctl delete_queue'
2025-03-14 01:02:54 -04:00
Michael Klishin 4bb21d7549
RMQ-1263 CLI tools: replace Erlang files with Elixir
otherwise we end up with two copies of the compiled
module on the code path some of the time.

We don't need to mix Erlang and Elixir even
more to bring in one constant that hasn't changed
since its introduction some eight years ago.

(cherry picked from commit c32b948258f226a86be91cab80448d7a536afd7d)
2025-03-14 00:06:18 -04:00
Diana Parra Corbacho d2f66ced1b
RMQ-1263: Add a --force option to rabbitmqctl delete_queue command
RMQ-1263: Add a --force option to rabbitmqctl delete_queue command.

This work was originally done by Iliia Khaprov <iliia.khaprov@broadcom.net>.

---------

Co-authored-by: Iliia Khaprov <iliia.khaprov@broadcom.net>
Co-authored-by: Michael Klishin <klishinm@vmware.com>
(cherry picked from commit d9522d3ee708250cc84443af5c3556b14f7c5ab9)
2025-03-14 00:06:09 -04:00
Michael Klishin f1396b5695
Merge pull request #13525 from rabbitmq/ik-dpc-queue-protection
By @ikavgo: introduce a deletion protection marker for queues
2025-03-13 21:41:06 -04:00
Diana Parra Corbacho c69403e3e9
RMQ-1263: a mechanism for marking queues as protected (e.g. from deletion) (#44)
* RMQ-1263: Check if queue protected from deleted inside rabbit_amqqueue:with_delete

Delayed exchange automatically manages associated Delayed Queue. We don't want users to delete it accidentally.

If queue is indeed protected its removal can be forced by calling  with
?INTERNAL_USER as ActingUser.

* RMQ-1263: Correct a type spec of amqqueue:internal_owner/1

* RMQ-1263: Add protected queues test

---------

Co-authored-by: Iliia Khaprov <iliia.khaprov@broadcom.net>
Co-authored-by: Michael Klishin <klishinm@vmware.com>
(cherry picked from commit 97f44adfad6d0d98feb1c3a47de76e72694c19e0)
2025-03-13 19:41:36 -04:00
Aitor Perez 43f99912de
Remove Bazel lines from Makefile 2025-03-13 17:30:20 +00:00
Jean-Sébastien Pédron 3eeb8f9c01
Merge pull request #13518 from rabbitmq/update-meck-to-1.0.0
rabbitmq-components.mk: Update meck from 0.9.2 to 1.0.0
2025-03-13 17:17:52 +01:00
Jean-Sébastien Pédron 94b8ef6792
rabbitmq-components.mk: Update meck from 0.9.2 to 1.0.0
[Why]
Hopefully it will fix a crash we observe fairly regularily in CI.
2025-03-13 16:32:42 +01:00
Karl Nilsson 9ef0483b02
Merge pull request #13513 from rabbitmq/ra-2.16.3
Ra 2.16.3 - bug fixes.
2025-03-13 15:35:50 +01:00
Aitor Perez 07adc3e571
Remove Bazel files 2025-03-13 13:42:34 +00:00
Karl Nilsson 2efb9d7edc Ra 2.16.3 - bug fixes.
* Add num_segments to Ra counters
* ra_server_proc: Fix handling of local query replies
* Remove Bazel-related files by @mkuratczyk in #520
* Replication bug fixes that could cause replication to stall
* Use infinity timeout for ra_log_ets:mem_table_please
2025-03-13 12:15:22 +00:00
Jean-Sébastien Pédron 8486728f85
Merge pull request #13511 from rabbitmq/fix-test-flakes-in-python_SUITE
Fix test flakes in `python_SUITE`
2025-03-13 12:52:31 +01:00
Jean-Sébastien Pédron 337292758c
python_SUITE: Increase timeout in `x_queue_name.py` 2025-03-13 10:34:38 +01:00
Jean-Sébastien Pédron 4b6e1af09c
python_SUITE: Fix syntax error 2025-03-13 10:34:38 +01:00
Jean-Sébastien Pédron 38e7bd7f43
Merge pull request #13470 from rabbitmq/fix-test-flakes-in-various-testsuites
Fix test flakes in various testsuites
2025-03-13 10:33:13 +01:00
Michael Klishin 36be7bbe0d
Alpha release workflows: produce 4.2.x releases off of main
and 4.1.x ones off of v4.1.x, which is getting closer
to the RC stage.
2025-03-13 00:55:07 -04:00
Michael Klishin cf1bfa0b15
CLI: remove a non-essential flaky test 2025-03-12 19:01:55 -04:00
Michael Klishin b023062749
CLI distribution_test.exs: skip it on CI
it flakes specifically on CI. We can afford
to skip this specific test there and only
run it locally.
2025-03-12 18:33:13 -04:00
Michael Klishin 69bd5ef0e0
Merge pull request #13485 from cloudamqp/no_obs_cli_in_cli
Minor improvement: Remove observer_cli from CLI escritps
2025-03-12 15:18:13 -04:00
Michael Klishin ea5345e045
Merge pull request #13476 from rabbitmq/mgt-oauth-login-without-redirect
Improve oauth2 idp-initiated login
2025-03-12 15:16:41 -04:00
Jean-Sébastien Pédron 3a278e7e7c
rabbitmq-run.mk: Stop node in `start-background-broker` in case of error
[Why]
The CLI sometimes crashes early because it fails to configure the Erlang
distribution.

Because we use two CLI commands to watch the start of RabbitMQ, if one
of them fails, the Make recipe will exit with an error, leaving the
RabbitMQ node running.

[How]
We use a shell trap to stop the node if the shell is about to exit with
an error.

While here, we retry the `await_startup` CLI command several times
because this is the one failing the most. This is until the crash is
understood and a proper fix is committed.
2025-03-12 17:46:11 +01:00
Jean-Sébastien Pédron 0e7f92aba2
rabbit_stream_SUITE: Increase some timeouts 2025-03-12 17:46:11 +01:00
Jean-Sébastien Pédron 43916da581
logging_SUITE: Increase timetrap to 3 minutes
[Why]
We sometimes hit the 1-minute timetrap in CI even though the tests are
running fine.
2025-03-12 17:46:11 +01:00
Jean-Sébastien Pédron 28870f380c
priority_queue_recovery_SUITE: Add suffix to RabbitMQ node names
[Why]
This helps debugging.
2025-03-12 17:46:11 +01:00
Jean-Sébastien Pédron 97da746160
v5_SUITE: Close all connections in `end_per_testcase/2`
[Why]
Many tests do not clean up their connections if they encounter a
failure. This affects subsequent testcases negatively.
2025-03-12 17:46:07 +01:00
Jean-Sébastien Pédron 7c2ee95ed8
Merge pull request #13336 from rabbitmq/ignore-normal-exit-in-channel
rabbit_channel: Ignore DOWN message from monitored process if it exited normally
2025-03-12 17:44:43 +01:00
Michael Klishin 4c5dd95e5c
Merge pull request #13493 from rabbitmq/add-missing-selenium-function
Add missing selenium function
2025-03-12 12:06:04 -04:00
Mirah Gary 0fc07b93da
Merge pull request #13495 from rabbitmq/support-link
Update support link.
2025-03-12 16:52:57 +01:00
Marcial Rosales 69b54869c9 Use POST+Redirect_with_cookie 2025-03-12 16:48:02 +01:00
Mirah Gary f8ae3f1361
Update support link. 2025-03-12 16:06:51 +01:00
Jean-Sébastien Pédron ac4261b208
Merge pull request #13490 from rabbitmq/cache-start-time
rabbit_peer_discovery: Compute start time once
2025-03-12 15:03:46 +01:00
Marcial Rosales e6fe38b504 Fix issue thanks to @zerpet 2025-03-12 13:12:26 +01:00
Marcial Rosales f9eec1ea82 Add initOnly function
For scenarios where rabbitmq needs
the certificates of an idp but the
idp has not been started yet and
hence the cert has not been generated
With this function, the idp generates
its certificates without starting
2025-03-12 11:54:09 +01:00
Aitor Pérez Cedres ad0c209478
Merge pull request #13425 from rabbitmq/fix-selenium-log-collection
Fix log collection in Selenium workflows
2025-03-12 10:00:19 +00:00
Marcial Rosales 8b0589bd5c Add missing function that
checks if element is not visible
2025-03-12 10:32:04 +01:00
Jean-Sébastien Pédron e72d911080
rabbit_peer_discovery: Compute start time once
... and cache it.

[Why]
It happens at least in CI that the computed start time varies by a few
seconds. I think this comes from the Erlang time offset which might be
adjusted over time.

This affects peer discovery's sorting of RabbitMQ nodes which uses that
start time to determine the oldest node. When the start time of a node
changes, it could be considered the seed node to join by some nodes but
ignored by the other nodes, leading to troubles with cluster formation.
2025-03-12 09:36:17 +01:00
Jean-Sébastien Pédron 8945b75322
rabbit_channel: Ignore DOWN message from monitored process if it exited normally
[Why]
It happens in CI from time to time and it was crashing the channel
process. There is always a `channel.close` method pending in the
channel mailbox.

[How]
For now, log something and ignore the DOWN message. The channel will
exit after handling the pending `channel.close` method anyway.
2025-03-12 09:32:42 +01:00
Michael Klishin 09f1ab47b7
By @Ayanda-D: new CLI health check that detects QQs without an elected reachable leader #13433 (#13487)
* Implement rabbitmq-queues leader_health_check command for quorum queues

(cherry picked from commit c26edbef33)

* Tests for rabbitmq-queues leader_health_check command

(cherry picked from commit 6cc03b0009)

* Ensure calling ParentPID in leader health check execution and
reuse and extend formatting API, with amqqueue:to_printable/2

(cherry picked from commit 76d66a1fd7)

* Extend core leader health check tests and update badrpc error handling in cli tests

(cherry picked from commit 857e2a73ca)

* Refactor leader_health_check command validators and ignore vhost arg

(cherry picked from commit 6cf9339e49)

* Update leader_health_check_command description and banner

(cherry picked from commit 96b8bced2d)

* Improve output formatting for healthy leaders and support
silent mode in rabbitmq-queues leader_health_check command

(cherry picked from commit 239a69b404)

* Support global flag to run leader health check for
all queues in all vhosts on local node

(cherry picked from commit 48ba3e161f)

* Return immediately for leader health checks on empty vhosts

(cherry picked from commit 7873737b35)

* Rename leader health check timeout refs

(cherry picked from commit b7dec89b87)

* Update banner message for global leader health check

(cherry picked from commit c7da4d5b24)

* QQ leader-health-check: check_process_limit_safety before spawning leader checks

(cherry picked from commit 17368454c5)

* Log leader health check result in broker logs (if any leaderless queues)

(cherry picked from commit 1084179a2c)

* Ensure check_passed result for leader health internal calls)

(cherry picked from commit 68739a6bd2)

* Extend CLI format output to process check_passed payload

(cherry picked from commit 5f5e9922bd)

* Format leader healthcheck result log and function exports

(cherry picked from commit ebffd7d8a4)

* Change leader_health_check command scope from queues to diagnostics

(cherry picked from commit 663fc9846e)

* Update (c) line year

(cherry picked from commit df82f12a70)

* Rename command to check_for_quorum_queues_without_an_elected_leader
and use across_all_vhosts option for global checks

(cherry picked from commit b2acbae28e)

* Use rabbit_db_queue for qq leader health check lookups
and introduce rabbit_db_queue:get_all_by_type_and_vhost/2.
Update leader health check timeout to 5s and process limit
threshold to 20% of node's process_limit.

(cherry picked from commit 7a8e166ff6)

* Update tests: quorum_queue_SUITE and rabbit_db_queue_SUITE

(cherry picked from commit 9bdb81fd79)

* Fix typo (cli test module)

(cherry picked from commit 615856853a)

* Small refactor - simpler final leader health check result return on function head match

(cherry picked from commit ea07938f3d)

* Clear dialyzer warning & fix type spec

(cherry picked from commit a45aa81bd2)

* Ignore result without strict match to avoid diayzer warning

(cherry picked from commit bb43c0b929)

* 'rabbitmq-diagnostics check_for_quorum_queues_without_an_elected_leader' documentation edits

(cherry picked from commit 845230b0b380a5f5bad4e571a759c10f5cc93b91)

* 'rabbitmq-diagnostics check_for_quorum_queues_without_an_elected_leader' output copywriting

(cherry picked from commit 235f43bad58d3a286faa0377b8778fcbe6f8705d)

* diagnostics check_for_quorum_queues_without_an_elected_leader: behave like a health check w.r.t. error reporting

(cherry picked from commit db7376797581e4716e659fad85ef484cc6f0ea15)

* check_for_quorum_queues_without_an_elected_leader: handle --quiet and --silent

plus simplify function heads.

References #13433.

(cherry picked from commit 7b392315d5e597e5171a0c8196230d92b8ea8e92)

---------

Co-authored-by: Ayanda Dube <adube14@bloomberg.net>
2025-03-12 00:32:59 -04:00
Péter Gömöri f9d3ed732b Remove observer_cli from CLI escritps
observer_cli (and its dependency recon) was declared as a dependency
of rabbitmq_cli and as a consequence included in all escritps. However
the major part of observer_cli runs in the broker. The cli side only
used `observer_cli:rpc_start/2` which is just an rpc call into the
target node.

By using common rpc call we can remove observer_cli and recon from the
escripts. This can be considered a minor improvement based on the
philosophy "simpler is better".

As an additional benefit auto-completing functions of the recon app
now works in `rabbitmq-diagnostics remote_shell`.
(eg. `recon:proc_c<TAB>`)
2025-03-12 00:07:04 +01:00
David Ansari 7cf076673b Fix flake in test case session_upgrade_v3_v5_qos1
CI sometimes failed with the following error:
```
v5_SUITE:session_upgrade_v3_v5_qos failed on line 1068
Reason: {test_case_failed,Received unexpected PUBLISH payload. Expected: <<"2">> Got: <<"3">>}
```

The emqtt client auto acks by default.
Therefore, if Subv3 client was able to successfully auto ack message 2
before Subv3 disconnected, Subv5 client did not receive message 2.

This commit fixes this flake by making sure that Subv3 does not ack
message 2.
2025-03-11 18:43:06 +01:00
Michael Klishin 04a806731b
Bump (c) year in the startup banner 2025-03-08 08:05:58 -05:00
Michael Klishin 916b0327af
Merge pull request #13471 from kartg/source-bundle-make-target
(Updated) Adding a "source-bundle" target to the Makefile
2025-03-07 20:49:21 -05:00
Kartik Ganesh f84c210f37 Refactor "source-dist" and "source-bundle" targets to reduce duplication
This is done by introducing a generic function that holds the common code, which then creates these two targets. The differing properties (like rsync flags) are passed in as function arguments.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2025-03-07 14:25:36 -08:00
Kartik Ganesh 54cbb74658 Adding a "source-bundle" target that largely duplicates the "source-dist" target
The main difference is that the "bundle" target does NOT exclude packaging and testing directories, which enables packaging and testing of the source archive.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2025-03-07 10:38:57 -08:00
Jean-Sébastien Pédron f661c1ef9c
Merge pull request #13409 from rabbitmq/fix-test-flakes-in-amqp_client_SUITE
amqp_client_SUITE: Fix frequent test failures
2025-03-07 17:52:52 +01:00
David Ansari 0f9b693ec4 Apply PR feedback 2025-03-07 16:49:11 +01:00
Jean-Sébastien Pédron 4d12efae21
amqp_client_SUITE: Close all connections in `end_per_testcase/2`
[Why]
Many tests do not clean up their connections if they encounter a
failure. This affects subsequent testcases negatively.
2025-03-07 14:48:43 +01:00
Jean-Sébastien Pédron ce5ba6da04
amqp_client_SUITE: Use a dedicated AMQP-0-9-1 connection per testcase
... instead of a global one. Otherwise, one connection failure, even if
expected by a testcase, will affect all subsequent testcases negatively.
2025-03-07 14:48:43 +01:00
Jean-Sébastien Pédron 6084055183
amqp_client_SUITE: Ensure `idle_time_out_on_server` restores heartbeat value
[Why]
If the testcase fails, it was leaving the low heartbeat value in place,
leading to many subsequent tests to fail.
2025-03-07 14:48:43 +01:00
Jean-Sébastien Pédron 603ad0d7eb
amqp_client_SUITE: Retry connection in two testcases
The testcases are `leader_transfer_credit` and
`dead_letter_into_stream`.
2025-03-07 14:48:43 +01:00
David Ansari 65576863fc
amqp10_client: Fix crash in close_sent
Fix crash in close_sent since the client might receive the open frame if
it previously sent the close frame in state open_sent.

We explicitly ignore the open frame. The alternative is to add another
gen_statem state CLOSE_PIPE which  might be an overkill however.

This commit also fixes a wrong comment: No sessions have begun if the
app requests the connection to be closed in state open_sent.
2025-03-07 14:48:43 +01:00
Jean-Sébastien Pédron 77e3636272
amqp10_client: Handle `close` message in the `open_sent` state
[Why]
Without this, the connection process crashes. We see this happenning in
CI frequently.
2025-03-07 14:48:43 +01:00
Jean-Sébastien Pédron 2c66191043
amqp_client_SUITE: Use a dedicated CI job for this testsuite
[Why]
This testsuite is very unstable and it is difficult to debug while it is
part of a `parallel-ct` group. It also forced us to re-run the entire
`parallel-ct` group just to retry that one testsuite.
2025-03-07 14:48:32 +01:00
Michael Klishin 2a24cfb77d
Merge pull request #13465 from rabbitmq/rabbitmq-server-13464
By @aaron-seo: Optionally allow separate configuration of auth_backends for all HTTP-based plugins (protocols, APIs)
2025-03-06 23:42:55 -05:00
Michael Klishin a8a8249388
Don't log the auth_backends fallback message #13464
Doing so for every HTTP API request is excessive
even at debug level.

(cherry picked from commit 830374cd339ac41668b274a13ea2bb8635fc1a32)
2025-03-06 22:08:00 -05:00
Aaron Seo 81f780a2e9
Rename web_dispatch config prefix to http_dispatch
(cherry picked from commit 8c09e6c7dd)
2025-03-06 22:07:45 -05:00
Aaron Seo 5e24a2bf9c
Explicitly handle undefined case for getting web_dispatch.auth_backends
(cherry picked from commit b619e66730)
2025-03-06 22:07:40 -05:00
Aaron Seo 3908e5c42d
Add new configuration for rabbitmq_web_dispatch.auth_backends with a fallback to the core auth_backends
(cherry picked from commit b048ed55bb)
2025-03-06 22:07:34 -05:00
Michael Klishin 569edb0841
Merge branch 'Ayanda-D-configurable-mgmt-delegate-pool' 2025-03-06 15:54:53 -05:00
Michael Klishin ad42ae31e5
Make sure rabbitmq_management.delegate_count is always set 2025-03-06 15:36:13 -05:00
Ayanda Dube f60b284824 Add schema for management.delegate_count config 2025-03-06 13:09:15 +00:00
Ayanda Dube b5d9ebf16a Configurable management delegate count via: rabbitmq_management.delegate_count 2025-03-06 12:39:52 +00:00
Arnaud Cogoluègnes 852f8243a5
Add one Maven project to dependabot on 3.13 branch 2025-03-05 15:02:39 +01:00
Michael Klishin 059055e944
Merge pull request #13455 from rabbitmq/dependabot/github_actions/main/peter-evans/create-pull-request-7.0.8
Bump peter-evans/create-pull-request from 7.0.7 to 7.0.8
2025-03-04 15:11:50 -05:00
dependabot[bot] 496a827a5d
Bump peter-evans/create-pull-request from 7.0.7 to 7.0.8
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.7 to 7.0.8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7.0.7...v7.0.8)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-04 18:54:07 +00:00
Mirah Gary 98dc11fa55
Merge pull request #13451 from rabbitmq/fix-delete-error
Fix error message to reflect command.
2025-03-04 15:45:49 +01:00
Mirah Gary 34ef4c4e6a
Fix error message to reflect command. 2025-03-04 10:57:28 +01:00
Michael Klishin dc0d4735c2
Merge pull request #13445 from rabbitmq/mk-bump-osiris-to-1.8.6
Osiris 1.8.6
2025-03-02 00:16:34 -05:00
Michael Klishin ffcf9a27a4
Osiris 1.8.6 2025-03-01 19:26:08 -05:00
Michael Klishin c5ecf31fd3
Merge pull request #13442 from slord399/main
Bump Prometheus Version
2025-03-01 19:14:28 -05:00
Tony Lewis Hiroaki URAHAMA 3c5f4d3d39
Bump Prometheus Version 2025-03-01 18:21:51 +00:00
Michael Klishin 9fdd42c0e2
Merge pull request #13435 from rabbitmq/mc-amqp-msg
Handle mc_amqp 3.13 `msg` record in 4.x
2025-02-28 17:20:35 -05:00
Michal Kuratczyk 10693d37f2
[skip ci] Add 4.0.6 an 4.0.7 to the discussion template 2025-02-28 13:25:02 +01:00
Loïc Hoguin 6c3789ee9a
Merge pull request #13363 from rabbitmq/loic-dynamic-buffer
Add dynamic socket buffer functionality to rabbit_reader
2025-02-27 17:30:32 +01:00
Loïc Hoguin 53444107b5
Add dynamic buffer functionality to rabbit_reader
The `buffer` socket option will be changed dynamically
based on how much data is received.

This is restricted to AMQP protocols (old and 1.0).

The algorithm is a little different than Cowboy 2.13.
The moving average is less reactive (div 8 instead of 2)
and floats are used so that using smaller lower buffer
values is possible (otherwise the rounding prevents
increasing buffer sizes). The lower buffer size was
set to 128 as a result.

Compared to the previous which was to set `buffer` to
`rcvbuf` effectively, often to 131072 on Linux for
example, the performance sees a slight improvement
in various scenarios for all message sizes using
AMQP-0.9.1 and a lower memory usage as well. But
the difference is small in the benchmarks we have
run (5% to 10%), whereas Cowboy saw a huge improvement
because its default was very small (1460).

For AMQP-1.0 this seems to be no worse but we didn't
detect a clear improvement. We saw scenarios where
small message sizes showed improvement, and large
message sizes showed a regression. But we are even
less confident with these results. David (AMQP-1.0
native developer) ran a few tests and didn't see a
regression.

The dynamic buffer code is currently identical for
old and 1.0 AMQP. But we might tweak them differently
in the future so they're left as duplicate for now.
This is because different protocols have different
behaviors and so the algorithm may need to be tweaked
differently for each protocol.
2025-02-27 12:46:28 +01:00
David Ansari 91f5ce2544 Handle mc_amqp 3.13 `msg` record in 4.x
The `msg` record was used in 3.13. This commit makes 4.x understand
this record for backward compatibility, specifically for the rare case where:
1. a 3.13 node internally parsed a message from a stream via
```
Message = mc:init(mc_amqp, amqp10_framing:decode_bin(Bin), #{})
```
2. published this Message to a queue
3. RabbitMQ got upgraded to 4.x

(This commit can be reverted in some future RabbitMQ version once it's
safe to assume that these upgraded messages have been consumed.)

The changes were manually tested as described in Jira RMQ-1525.
2025-02-27 10:27:05 +01:00
Michael Klishin cdc042a2fd
4.0.7 release notes: a typo 2025-02-26 14:15:25 -05:00
Michael Klishin 9857128380
4.0.7 release notes 2025-02-26 13:18:37 -05:00
Loïc Hoguin ea7af397c3
Merge pull request #13430 from rabbitmq/loic-fix-fast-large-files-msg-store-delete
Fix CQ shared store files not deleted with large messages
2025-02-26 14:28:38 +01:00
Loïc Hoguin 6cf69e2a19
Fix CQ shared store files not deleted with large messages
We must consider whether the previous current file is empty
(has data written, but was already removed) when writing
large messages and opening a file specifically for the large
message. If we don't, then the file will never get deleted
as we only consider files for deletion when a message gets
removed (and there are none).

This is only an issue for large messages. Small messages
write a message than roll over to a new file, so there is
at least one valid message. Large messages close the current
file first, regardless of there being a valid message.
2025-02-26 11:30:22 +01:00
Michael Klishin 9dd6fa7fdd
Merge pull request #13408 from rabbitmq/mqtt-optional-password-cred
Do not propagate `none` password to http backend
2025-02-25 13:27:10 -05:00
Michael Klishin 026ebe5f23
Merge pull request #13380 from rabbitmq/ct-broker-helpers-diagnostics
Tests: add rabbitmq_diagnostics to test helpers
2025-02-25 13:25:30 -05:00
Michael Klishin 50c98bcecc
Auth backend HTTP: test naming 2025-02-25 12:32:41 -05:00
Aitor Perez d95fc550b6
Fix log collection in Selenium workflows
Prior to this commit, if a test failed, the script 'run-suites.sh' would
exit with non-zero status, stopping the exection of the job; therefore,
the steps to move the logs to the expected location won't be executed.
This commit separates the tests from the log preparation.
2025-02-25 17:23:21 +00:00
Aitor Pérez Cedres 9f336b95a4
Merge pull request #13420 from rabbitmq/ci/update-selenium
Update management UI workflows
2025-02-25 16:31:05 +00:00
Aitor Perez a5b8d194b8
Update selenium README
[skip ci]
2025-02-25 16:30:02 +00:00
Aitor Perez ef8b4fc767
Make Selenium image configurable
In certain environments, we may want to customise the docker image e.g.
to use a proxy to avoid docker hub rate limiting. The default behaviour
remains unchanged.

The `if` logic was broken because `uname -a` returns the entire uname,
including OS, Kernel version, machine type and what not. The string
always starts with the OS i.e. Linux or Darwin, therefore, the matching
for `arm*` was always false; therefore, it was always defaulting to the
`else` image, which happens to be multi-arch. However, it was using
`seleniarm`, which is a community driven effort, not the official
Selenium account.

In the official OSS image, version 123.0 is too old. The oldest
available is 127.0. This commit bumps to the latest available. We could
consider depending on version `4`. Version `4` refers to Selenium
version, whilst version 123.0/133.0 refer to the browser version.
2025-02-25 14:00:41 +00:00
Aitor Perez 6c10cea3ad
CI: remove selenium summary jobs 2025-02-25 11:51:31 +00:00
Marcial Rosales b09bfb25b6 Do not propagate none password for http auth backend 2025-02-25 12:50:58 +01:00
Aitor Perez 73279a8f26
Run full UI management suite on commits
The workflow to tests PRs is meant to run the short suite for management
UI tests. On commits, we want to run the full suite to ensure that
management UI tests are passing.
2025-02-25 11:49:20 +00:00
Aitor Perez e581b16f75
CI: remove bump branches
Those branches were for Bazel builds. Bazel was replaced in main and
4.0+
2025-02-25 11:41:23 +00:00
Aitor Perez c2b9fece78
Selenium: make conf_dir configurable
CI can configure this variable to use a dynamic variable e.g. `${{
worker.temp }}`
2025-02-25 11:23:45 +00:00
Michael Klishin 6e76defe33
Merge pull request #13412 from rabbitmq/dependabot/github_actions/main/peter-evans/create-pull-request-7.0.7
Bump peter-evans/create-pull-request from 7.0.6 to 7.0.7
2025-02-24 15:23:44 -05:00
David Ansari 3d7a027503 Send all received WebSocket frames to app
Prior to this commit, if the WebSocket client received multiple
WebSocket frames in a single Erlang message by gen_tcp, the WebSocket
client sent only the first received WebSocket frame to the application.

This commit fixes this bug by having the WebSocket client send all
WebSocket frames to the application.
2025-02-24 20:50:55 +01:00
dependabot[bot] f6242696f6
Bump peter-evans/create-pull-request from 7.0.6 to 7.0.7
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.6 to 7.0.7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7.0.6...v7.0.7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 18:13:54 +00:00
Michael Klishin df783eb32a
Merge pull request #13402 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-c6b7d907dc
[skip ci] bump the prod-deps group across 6 directories with 3 updates
2025-02-22 16:08:17 -05:00
Michael Klishin 5a8efb9d84
Merge pull request #13401 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-7a6be28e9c
[skip ci] bump the dev-deps group across 5 directories with 4 updates
2025-02-22 16:08:08 -05:00
dependabot[bot] 76ffa31bd1
[skip ci] bump the prod-deps group across 6 directories with 3 updates
Bumps the prod-deps group with 2 updates in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin directory: [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) and [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.13.0 to 3.14.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.2 to 2.44.3
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.2...maven/2.44.3)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.2 to 3.4.3
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.2...v3.4.3)

Updates `org.springframework.boot:spring-boot-starter-parent` from 3.4.2 to 3.4.3
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.4.2...v3.4.3)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.13.0 to 3.14.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.2 to 2.44.3
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.2...maven/2.44.3)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.13.0 to 3.14.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.2 to 2.44.3
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.2...maven/2.44.3)

Updates `org.apache.maven.plugins:maven-compiler-plugin` from 3.13.0 to 3.14.0
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.13.0...maven-compiler-plugin-3.14.0)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.2 to 2.44.3
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.2...maven/2.44.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 18:28:39 +00:00
dependabot[bot] 72224f30cf
[skip ci] bump the dev-deps group across 5 directories with 4 updates
Bumps the dev-deps group with 2 updates in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and org.apache.qpid:qpid-jms-client.
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.apache.qpid:qpid-jms-client` from 2.6.1 to 2.7.0

Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.11.4 to 5.12.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.apache.qpid:qpid-jms-client
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-22 18:27:57 +00:00
Michael Klishin 85ffe95270
Revert "Merge pull request #13385 from kartg/build-dist-make-target"
This reverts commit ea4bdac94c, reversing
changes made to 30591821ea.
2025-02-21 20:43:02 -05:00
Michael Klishin ea4bdac94c
Merge pull request #13385 from kartg/build-dist-make-target
Adding a "source-bundle" target to the Makefile
2025-02-21 19:52:30 -05:00
Kartik Ganesh 741e04b58d Rename "build-dist" target to "source-bundle"
This incorporates PR feedback from @michaelklishin

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2025-02-21 13:17:48 -08:00
Michael Klishin 30591821ea
Merge pull request #13381 from rabbitmq/md/rabbit-registry-boot-step
Run `rabbit_registry` boot step after `pre_boot`
2025-02-21 14:30:54 -05:00
Michael Davis 386701273f
Run `rabbit_registry` boot step after `pre_boot`
The `rabbit_registry` boot step starts up the `rabbit_registry` gen
server from `rabbit_common`. This is a registry somewhat similar to
the feature flag registry - it's meant to protect an ETS table used for
looking up implementers of behaviors. The registry and its ETS table
should be available as early as possible: the step should enable
external_infrastructure rather than require it.
2025-02-21 08:54:50 -05:00
Aitor Pérez Cedres 79febc501b
Merge pull request #13389 from rabbitmq/mocha-dockerfile-configurable
Configure location of mocha-test dockerfile
2025-02-21 11:36:59 +00:00
Marcial Rosales c3da54c3ea Remove duplicate flag 2025-02-21 11:53:27 +01:00
Marcial Rosales 94c28d642b Configure location of mocha-test dockerfile 2025-02-21 11:33:26 +01:00
Michael Klishin 71a7b417d1
Merge pull request #13382 from noxdafox/main
rabbit_backing_queue: pass mc:state() to discard callback
2025-02-20 21:07:42 -05:00
Kartik Ganesh aa9e0a5a28 Adding a "build-dist" target to the Makefile
This target is identical to the existing "source-dist" target, except that it allows for packaging and testing of the source archive. This is done by including the packaging/ and tests/ directories in the output tarball, along with specific subdirectories that are required by tests.

Signed-off-by: Kartik Ganesh <gkart@amazon.com>
2025-02-20 15:42:22 -08:00
Matteo Cafasso b49ba9630a rabbit_backing_queue: pass mc:state() to discard callback 2025-02-20 23:30:10 +02:00
Diana Parra Corbacho c0bd1f5202 Tests: add rabbitmq_diagnostics to test helpers 2025-02-20 15:58:04 +01:00
Jean-Sébastien Pédron cc0458a139
Merge pull request #13346 from rabbitmq/fix-recursion-error-in-rabbit_stream_queue_SUITE
Small programming error fixes in testsuites
2025-02-20 11:23:18 +01:00
Jean-Sébastien Pédron a5f30ea02e
GitHub workflows: List open TCP ports
This may help debug nodes that try to open busy ports.
2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron 64b68e5d9c
unit_credit_flow_SUITE: Greatly reduce time trap 2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron b7c9e648ea
amqp_auth_SUITE: Handle error in init_per_group/2 2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron ee0b5b5f32
rabbit_stream_queue_SUITE: Fix recursion issue
... in retry_if_coordinator_unavailable().
2025-02-20 09:47:33 +01:00
Michael Klishin 789fc64d8f
Merge pull request #13374 from rabbitmq/rabbitmq-server-12743
By @noxdafox: Revival of #9620 Pass the message to rabbit_backing_queue:discard callback
2025-02-19 21:12:52 -05:00
Matteo Cafasso 4dfa447541
Adopt new rabbit_backing_queue:discard implementation
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
(cherry picked from commit facddb363f)
2025-02-19 18:20:01 -05:00
Matteo Cafasso d6a19bbde0
rabbit_backing_queue: pass the whole message to discard callback
The previous behaviour was passing solely the message ID making
queue implementations such as, for example, the priority one hard
to fulfil.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
(cherry picked from commit 1f7a27c51d)
2025-02-19 18:19:54 -05:00
Michael Klishin 0eb65c2f86
Merge pull request #13250 from cloudamqp/large_message_rdq_scan
4.x: Optimise msg_store recovery in case of large message file
2025-02-19 15:49:29 -05:00
Michael Klishin e936638569
Merge pull request #13370 from rabbitmq/gazelle-main
bazel run gazelle
2025-02-19 15:41:01 -05:00
Arnaud Cogoluègnes e818136b09
Merge pull request #13360 from rabbitmq/remove-set-stream-retention-policy-command
Remove set_stream_retention_policy command
2025-02-19 09:38:14 +00:00
GitHub 9a9c543a85 bazel run gazelle 2025-02-19 04:02:33 +00:00
Michael Klishin 819b80bfc9
Merge pull request #13365 from rabbitmq/cow-uri
Delete rabbit_uri
2025-02-18 11:36:06 -05:00
Michael Klishin 9a5a321f0d
Merge pull request #13364 from rabbitmq/recover-ts
Recover "received timestamp" when reading from stream
2025-02-18 11:31:27 -05:00
David Ansari 2350299fde Delete rabbit_uri
Since https://github.com/rabbitmq/rabbitmq-server/pull/13242 updated
Cowlib to v2.14.0, this commit deletes rabbit_uri as written in the
comments of rabbit_uri.erl:
```
This file is a partial copy of
https://github.com/ninenines/cowlib/blob/optimise-urldecode/src/cow_uri.erl
We use this copy because:
1. uri_string:unquote/1 is lax: It doesn't validate that characters that are
   required to be percent encoded are indeed percent encoded. In RabbitMQ,
   we want to enforce that proper percent encoding is done by AMQP clients.
2. uri_string:unquote/1 and cow_uri:urldecode/1 in cowlib v2.13.0 are both
   slow because they allocate a new binary for the common case where no
   character was percent encoded.
When a new cowlib version is released, we should make app rabbit depend on
app cowlib calling cow_uri:urldecode/1 and delete this file (rabbit_uri.erl).
```
2025-02-18 15:46:16 +01:00
David Ansari 7e7173000f Recover "received timestamp" when reading from stream
When reading from a stream recover the message container annotation `rts` (received timestamp).
2025-02-18 15:11:15 +01:00
Loïc Hoguin 99a09dfa0e
Merge pull request #13242 from rabbitmq/loic-update-cowboy-2025
Update Cowboy
2025-02-18 12:17:16 +01:00
Loïc Hoguin 3e00c84e9f
Update Cowboy, Cowlib and Ranch
Cowboy 2.13 contains the Websocket optimisations as well
as the ability to set the Websocket max_frame_size option
dynamically, plus plenty of other improvements.

Cowlib was added as a test dep to rabbitmq_mqtt to make
sure emqtt doesn't pull the wrong Cowlib version for Cowboy.
2025-02-18 11:15:08 +01:00
Arnaud Cogoluègnes 7ea2ff2651
Remove set_stream_retention_policy command
It is not working as expected. Policies are the way to change data retention for stream.
2025-02-18 11:06:04 +01:00
Michael Klishin fa44b764b7
RPM packaging: drop old targets 2025-02-17 16:08:00 -05:00
Michael Klishin 9222e3b1c1
Merge pull request #13351 from rabbitmq/cli-module-attribute-otp28
CLI: Don't use regex as module attributes
2025-02-17 11:49:33 -05:00
Michael Klishin 0773b56139
Merge pull request #13353 from rabbitmq/mgmt-ui-update-tooltips
Update queue-messages and queue-message-body-bytes tooltips
2025-02-17 11:47:47 -05:00
Michal Kuratczyk 4b30935182
Update queue-messages and queue-message-body-bytes tooltips
Only large messages delivered to multiple CQs are stored once for
multiple queues.

Non-durable queues are deprecated and will be removed, so don't even
mention them.

We don't "page out" messages anymore.
2025-02-17 15:58:20 +01:00
Michal Kuratczyk 7e8ecc96db
CLI: Don't use regex as module attributes
When trying to use OTP28.0-rc1, Elixir fails to compile these modules
because a module attribute cannot be a regex. It is not yet clear
whether it's something to be fixed in Elixir for OTP28 compatibility
or something that accidentally worked in the past, but either way,
using a string as an attribute is equally good and works all OTP
versions, including OTP28.0-rc1.

```
== Compilation error in file lib/rabbitmq/cli/core/command_modules.ex ==
** (ArgumentError) cannot inject attribute @commands_ns into function/macro because cannot escape #Reference<0.2201422310.1333657602.13657>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity
    (elixir 1.18.2) lib/kernel.ex:3729: Kernel.do_at/5
    (elixir 1.18.2) expanding macro: Kernel.@/1
    lib/rabbitmq/cli/core/command_modules.ex:133: RabbitMQ.CLI.Core.CommandModules.make_module_map/2
```
2025-02-17 11:56:30 +01:00
Péter Gömöri fb21a19b72 Optimise msg_store recovery in case of large message file
Since 4.0.0 (commit d45fbc3d) the shared message store writes large
messages into their own rdq files. This information can be utilised
when scanning rdq files during recovery to avoid reading in the whole
message body into memory unnecessarily.

This commit addresses the same issue that was addressed in 3.13.x by
commit baeefbec (ie. appending a large binary together from 4MB chunks
leaves a lot of garbage and memory fragmentation behind) but even more
efficiently.

Large messages which were written before 4.0.0, which don't fully fill
the rdq file, are still handled as before.
2025-02-14 17:16:43 +01:00
Michael Klishin c4706616db
Merge pull request #13342 from rabbitmq/gazelle-main
bazel run gazelle
2025-02-14 10:39:03 -05:00
David Ansari 0ee5e74a73 Fix flake in test consume_from_replica
```
make -C deps/rabbit ct-rabbit_stream_queue t=cluster_size_3_parallel_1 RABBITMQ_METADATA_STORE=mnesia
```

flaked prior to this commit locally on Ubuntu with the following error after 11 runs:
```
rabbit_stream_queue_SUITE > cluster_size_3_parallel_1 > consume_from_replica
{error,
    {{shutdown,
         {server_initiated_close,406,
             <<"PRECONDITION_FAILED - stream queue 'consume_from_replica' in vhost '/' does not have a running replica on the local node">>}},
     {gen_server,call,
         [<0.8365.0>,
          {subscribe,
              {'basic.consume',0,<<"consume_from_replica">>,
                  <<"ctag">>,false,false,false,false,
                  [{<<"x-stream-offset">>,long,0}]},
              <0.8151.0>},
          infinity]}}}
```
2025-02-14 13:40:25 +01:00
GitHub ed8001ab07 bazel run gazelle 2025-02-14 04:02:28 +00:00
Michael Klishin 13e24d3172
Merge pull request #13328 from rabbitmq/ra-2.16.2
Ra v2.16.2
2025-02-13 13:14:55 -05:00
Michael Klishin a24aef632e
Merge pull request #13307 from rabbitmq/recover-exch-rk-from-amqp
Mc: introduce new function in mc_amqp to init mc from stream data
2025-02-13 13:14:29 -05:00
Michael Klishin 82eb311331
Merge pull request #13325 from rabbitmq/add-cache-cli-to-auth-cache
Follow-up: finish 'rabbitmqctl clear_auth_backend_cache' plus add tests
2025-02-13 12:54:57 -05:00
Jean-Sébastien Pédron d14aa07475
Merge pull request #13329 from rabbitmq/increase-parallel-ct-sets-dedicated-tcp-range
Increase the TCP ports range used by `parallel-ct-set-*`
2025-02-13 17:49:38 +01:00
David Ansari 3daef04566 Trap exit in AMQP 1.0 client proc
Trap exit signal such that terminate/3 gets executed so that
the socket is closed cleanly.
2025-02-13 17:02:51 +01:00
Arnaud Cogoluègnes ee710ca3f9
Group Maven dependencies in dev/prod in dependabot
Not sure what it means for Maven, but it should group dependency
upgrades in few PRs.
2025-02-13 16:35:49 +01:00
Karl Nilsson 42db0c659c Ra v2.16.2
This is a bugfix release of Ra:

* Fix last_index counter lag
* Fix off by one in follower assertion
* Fix log divergence bug
2025-02-13 15:27:45 +00:00
Arnaud Cogoluègnes b0d0d630ba
Group Java dependency upgrades
Run every Saturday and group the upgrades in one PR by branch.
2025-02-13 15:50:57 +01:00
Jean-Sébastien Pédron e76c227131
Increase the TCP ports range used by parallel-ct-set-*
[Why]
We see nodes trying to use busy ports in CI from time to time.
2025-02-13 15:37:39 +01:00
Arnaud Cogoluègnes f3d8eaadb0
Merge pull request #13324 from rabbitmq/jms-tests-infra
Use JUnit extension to configure JMS tests
2025-02-13 13:52:58 +00:00
Marcial Rosales dd1665ec85 Add clear cache function impl 2025-02-13 13:46:41 +01:00
Jean-Sébastien Pédron 3887256142
Merge pull request #13323 from rabbitmq/adapt-clustering_management_SUITE-to-khepri-0.17.0
clustering_management_SUITE: Use old node as seed node
2025-02-13 13:05:01 +01:00
David Ansari 6366eafa3b Simplify 2025-02-13 12:46:09 +01:00
Karl Nilsson 32615bf5f0 Mc: introduce new function in mc_amqp to init mc from stream.
Initialising a message container from data stored in a
stream is a special case where we need to recover exchange
and routing key information from the following message annatations:

* x-exchange
* x-routing-keys
* x-cc

We do not want to do this when initialising a message container
from AMQP data just received from a publisher.

This commit introduces a new function `mc_amqp:init_from_stream/2`
that is to be used when needing a message container from a stream
message.
2025-02-13 10:52:12 +00:00
Jean-Sébastien Pédron d2576dd909
Merge pull request #13248 from rabbitmq/adapt-peer-discovery-testsuites-to-khepri-0.17.0
Skip peer discovery clustering tests if multiple Khepri machine versions
2025-02-13 11:11:00 +01:00
Arnaud Cogoluègnes 7d8f83c919
Control queue type with annotation in JMS tests 2025-02-13 10:44:09 +01:00
Jean-Sébastien Pédron f088c4f544
clustering_management_SUITE: Skip `start_with_invalid_schema_in_path` with Khepri
[Why]
This test plays with the Mnesia database explicitly.
2025-02-13 10:39:54 +01:00
Arnaud Cogoluègnes d574e66dcc
Use AssertJ instead of JUnit assertions in JMS tests 2025-02-13 10:32:38 +01:00
Jean-Sébastien Pédron e76233a222
clustering_management_SUITE: Use old node as seed node
[Why]
During mixed-version testing, the old node might not be able to join or
rejoin a cluster if the other nodes run a newer Khepri machine version.

[How]
The old node is used as the cluster seed node and is never touched
otherwise. Other nodes are restarted or join the cluster later.
2025-02-13 10:25:07 +01:00
Arnaud Cogoluègnes cb59ad877c
Set up JMS destination in JUnit extension 2025-02-13 09:56:20 +01:00
Arnaud Cogoluègnes 5bcdc805d1
Merge pull request #13283 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.13.0
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to 3.13.0 in /deps/rabbit/test/amqp_jms_SUITE_data
2025-02-13 08:45:07 +00:00
Arnaud Cogoluègnes 9592c2cbec
Merge branch 'main' into dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.13.0 2025-02-13 08:44:49 +00:00
Arnaud Cogoluègnes fed87604c8
Merge pull request #13296 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.13.0
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to 3.13.0 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2025-02-13 08:41:10 +00:00
Arnaud Cogoluègnes a0aa613292
Merge pull request #13295 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.13.0
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to 3.13.0 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2025-02-13 08:40:53 +00:00
Arnaud Cogoluègnes 7f981bba8e
Merge pull request #13294 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.apache.maven.plugins-maven-compiler-plugin-3.13.0
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to 3.13.0 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2025-02-13 08:38:26 +00:00
Arnaud Cogoluègnes 5fe2693d4a
Merge pull request #13290 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/com.diffplug.spotless-spotless-maven-plugin-2.44.2
build(deps): bump com.diffplug.spotless:spotless-maven-plugin from 2.43.0 to 2.44.2 in /deps/rabbit/test/amqp_jms_SUITE_data
2025-02-13 08:37:43 +00:00
Arnaud Cogoluègnes d372c03771
Merge pull request #13286 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/org.junit.jupiter-junit-jupiter-engine-5.11.4
build(deps-dev): bump org.junit.jupiter:junit-jupiter-engine from 5.10.2 to 5.11.4 in /deps/rabbit/test/amqp_jms_SUITE_data
2025-02-13 08:37:13 +00:00
Arnaud Cogoluègnes 541c97daa2
Merge pull request #13279 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.5.2
build(deps): bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.5.2 in /deps/rabbit/test/amqp_jms_SUITE_data
2025-02-13 08:35:49 +00:00
dependabot[bot] 06f8d1d055
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:56 +00:00
dependabot[bot] cbf2a7e2db
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:54 +00:00
dependabot[bot] 3c7dacb27e
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:50 +00:00
dependabot[bot] e20fd4ab16
build(deps): bump com.diffplug.spotless:spotless-maven-plugin
Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.43.0 to 2.44.2.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.43.0...maven/2.44.2)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:30 +00:00
dependabot[bot] 35712d0afc
build(deps-dev): bump org.junit.jupiter:junit-jupiter-engine
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.10.2 to 5.11.4.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.11.4)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:27 +00:00
dependabot[bot] 9f74ecefae
build(deps): bump org.apache.maven.plugins:maven-compiler-plugin
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:24 +00:00
dependabot[bot] 0b480399a5
build(deps): bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.5.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.5...surefire-3.5.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 08:34:22 +00:00
Arnaud Cogoluègnes 432807294e
Remove deleted Maven project directory in dependabot 2025-02-13 09:33:10 +01:00
Arnaud Cogoluègnes 95b6df775a
Add v4.1.x to dependabot 2025-02-13 08:53:18 +01:00
Michael Klishin ec3b1a308d
Merge pull request #13260 from rabbitmq/gazelle-main
bazel run gazelle
2025-02-12 23:38:11 -05:00
GitHub 0da1ac071e bazel run gazelle 2025-02-13 04:02:32 +00:00
Michael Klishin fdaf16bedf
Merge pull request #13216 from rabbitmq/issue-12324
Support keycloak custom format via configuration
2025-02-12 20:26:33 -05:00
Michael Klishin 8d0609eca0
Merge branch 'main' into issue-12324 2025-02-12 18:41:47 -05:00
Michael Klishin 82c81c8eea
Merge pull request #13198 from cloudamqp/mgmt_ui_consumer_count
Show consumer count column on Mgmt UI Channels page
2025-02-12 17:51:06 -05:00
Michael Klishin 6dd9f821b9
Merge pull request #13245 from rabbitmq/add-cache-cli-to-auth-cache
Add clear cache rabbitmqctl
2025-02-12 14:27:11 -05:00
Michael Klishin dae4967bf1
'ctl auth_clear_cache' => 'ctl clear_auth_backend_cache' 2025-02-12 14:26:30 -05:00
Michael Klishin 1f9b1ee3d6
Merge pull request #13244 from rabbitmq/ik-shovel_delete_fix
'ctl delete_shovel':  adapt to rabbit_shovel_dyn_worker_sup_sup public API changes
2025-02-12 14:04:16 -05:00
Michael Klishin 7117817076
A minor 4.0.1 release notes update 2025-02-12 12:47:55 -05:00
Michael Klishin c4debab355
Update 4.0.1 release notes to mention one more major pain point that Khepri addresses 2025-02-12 12:35:40 -05:00
David Ansari c5867a7bd3 Add 4.1.0 release notes 2025-02-12 17:17:28 +01:00
Arnaud Cogoluègnes 4ec2b755ee Use ProtonJ2 in JMS-to-AMQP interop test 2025-02-12 17:17:28 +01:00
Arnaud Cogoluègnes fd350386a9 Add helpers for JMS tests 2025-02-12 17:17:28 +01:00
David Ansari 9062476a18 Support dynamic creation of queues
## What?
Support the `dynamic` field of sources and targets.

 ## Why?
1. This allows AMQP clients to dynamically create exclusive queues, which
   can be useful for RPC workloads.
2. Support creation of JMS temporary queues over AMQP using the Qpid JMS
   client. Exclusive queues map very nicely to JMS temporary queues
   because:

> Although sessions are used to create temporary destinations, this is only
for convenience. Their scope is actually the entire connection. Their
lifetime is that of their connection and any of the connection’s sessions
are allowed to create a consumer for them.

https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#creating-temporary-destinations

 ## How?
If the terminus contains the capability `temporary-queue` as defined in
[amqp-bindmap-jms-v1.0-wd10](https://groups.oasis-open.org/higherlogic/ws/public/document?document_id=67638)
[5.2] and as sent by Qpid JMS client,
RabbitMQ will create an exclusive queue.
(This allows a future commit to take other actions if capability
`temporary-topic` will be used, such as the additional creation of bindings.)

No matter what the desired node properties are, RabbitMQ will set the
lifetime policy delete-on-close deleting the exclusive queue when the
link which caused its creation ceases to exist. This means the exclusive
queue will be deleted if either:
* the link gets detached, or
* the session ends, or
* the connection closes

Although the AMQP JMS Mapping and Qpid JMS create only a **sending** link
with `dynamic=true`, this commit also supports **receiving** links with
`dynamic=true` for non-JMS AMQP clients.

RabbitMQ is free to choose the generated queue name. As suggested by the
AMQP spec, the generated queue name will contain the container-id and link
name unless they are very long.

Co-authored-by: Arnaud Cogoluègnes <acogoluegnes@gmail.com>
2025-02-12 17:17:28 +01:00
David Ansari 06ec8f0342 Orderly shutdown of sessions
Make AMQP 1.0 connection shut down its sessions before sending the
close frame to the client similar to how the AMQP 0.9.1 connection
shuts down its channels before closing the connection.

This commit avoids concurrent deletion of exclusive queues by the session process
and the classic queue process.
This commit should also fix https://github.com/rabbitmq/rabbitmq-server/issues/2596
2025-02-12 17:17:28 +01:00
Marcial Rosales 2ab890f344
Fix flake on rabbitmq_mqtt auth_SUITE (#13180)
* Separate invalid client test from the valid one

* Apply same changes from pr #13197

* Deal with stalereferences caused by timing issues

looking up objects in the DOM

* Unlink before assertion
2025-02-12 17:15:51 +01:00
Jean-Sébastien Pédron 1f1a13521b
Skip peer discovery clustering tests if multiple Khepri machine versions
... are being used at the same time.

[Why]
Depending on which node clusters with which, a node running an older
version of the Khepri Ra machine may not be able to apply Ra commands
and could be stuck.

There is no real solution and this clearly an unsupported scenario. An
old node won't always be able to join a newer cluster.

[How]
In the testsuites, we skip clustering tests if we detect that multiple
Khepri Ra machine versions are being used.
2025-02-12 17:13:24 +01:00
Marcial Rosales b0a9f145e1 Add clear cache command 2025-02-12 16:55:31 +01:00
Iliia Khaprov - VMware by Broadcom a92a04cfb1
Fix Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand
rabbit_shovel_dyn_worker_sup_sup doesn't export stop_and_delete_child

It exports stop_child which in turn calls stop_and_delete_child.
2025-02-12 14:39:16 +01:00
Jean-Sébastien Pédron e8a302a249
Merge pull request #13234 from rabbitmq/adapt-rabbit_stream_queue_SUITE-to-khepri-0.17.0
rabbit_stream_queue_SUITE: Swap uses of node 2 and 3 in `format` test
2025-02-12 11:39:24 +01:00
Marcial Rosales aeda3cada2 Fix test case name
Fix test case nam# Por favor ingresa el mensaje del commit para tus cambios. Las
2025-02-12 10:11:04 +01:00
Marcial Rosales bf7de92aa4 Apply fix from PR #13180 2025-02-12 09:52:34 +01:00
Michael Klishin 9f4853c112
Merge pull request #13218 from rabbitmq/identity-metric-endpoint-label
Add rabbitmq_endpoint label to rabbitmq_identity_info
2025-02-11 16:13:22 -05:00
Michael Klishin 3e64d46c2b
Merge pull request #13235 from rabbitmq/mqtt-khepri-flake
Fix MQTT test flake in Khepri mixed version mode
2025-02-11 13:22:12 -05:00
David Ansari 38cba9d63d Fix MQTT test flake in Khepri mixed version mode
The following test flaked in CI under Khepri in mixed version mode:
```
make -C deps/rabbitmq_mqtt ct-v5 t=cluster_size_3:will_delay_node_restart RABBITMQ_METADATA_STORE=khepri SECONDARY_DIST=rabbitmq_server-4.0.5 FULL=1
```

The first node took exactly 30 seconds for draining:
```
2025-02-10 15:00:09.550824+00:00 [debug] <0.1449.0> MQTT accepting TCP connection <0.1449.0> (127.0.0.1:33376 -> 127.0.0.1:27005)
2025-02-10 15:00:09.550992+00:00 [debug] <0.1449.0> Received a CONNECT, client ID: sub0, username: undefined, clean start: true, protocol version: 5, keepalive: 60, property names: ['Session-Expiry-Interval']
2025-02-10 15:00:09.551134+00:00 [debug] <0.1449.0> MQTT connection 127.0.0.1:33376 -> 127.0.0.1:27005 picked vhost using plugin_configuration_or_default_vhost
2025-02-10 15:00:09.551219+00:00 [debug] <0.1449.0> User 'guest' authenticated successfully by backend rabbit_auth_backend_internal
2025-02-10 15:00:09.551530+00:00 [info] <0.1449.0> Accepted MQTT connection 127.0.0.1:33376 -> 127.0.0.1:27005 for client ID sub0
2025-02-10 15:00:09.551651+00:00 [debug] <0.1449.0> Received a SUBSCRIBE with subscription(s) [{mqtt_subscription,<<"my/topic">>,
2025-02-10 15:00:09.551651+00:00 [debug] <0.1449.0>                                             {mqtt_subscription_opts,0,false,
2025-02-10 15:00:09.551651+00:00 [debug] <0.1449.0>                                              false,0,undefined}}]
2025-02-10 15:00:09.556233+00:00 [debug] <0.896.0> RabbitMQ metadata store: follower leader cast - redirecting to {rabbitmq_metadata,'rmq-ct-mqtt-cluster_size_3-2-27054@localhost'}
2025-02-10 15:00:09.561518+00:00 [debug] <0.1456.0> MQTT accepting TCP connection <0.1456.0> (127.0.0.1:33390 -> 127.0.0.1:27005)
2025-02-10 15:00:09.561634+00:00 [debug] <0.1456.0> Received a CONNECT, client ID: will, username: undefined, clean start: true, protocol version: 5, keepalive: 60, property names: ['Session-Expiry-Interval']
2025-02-10 15:00:09.561715+00:00 [debug] <0.1456.0> MQTT connection 127.0.0.1:33390 -> 127.0.0.1:27005 picked vhost using plugin_configuration_or_default_vhost
2025-02-10 15:00:09.561828+00:00 [debug] <0.1456.0> User 'guest' authenticated successfully by backend rabbit_auth_backend_internal
2025-02-10 15:00:09.562596+00:00 [info] <0.1456.0> Accepted MQTT connection 127.0.0.1:33390 -> 127.0.0.1:27005 for client ID will
2025-02-10 15:00:09.565743+00:00 [warning] <0.1460.0> This node is being put into maintenance (drain) mode
2025-02-10 15:00:09.565833+00:00 [debug] <0.1460.0> Marking the node as undergoing maintenance
2025-02-10 15:00:09.570772+00:00 [info] <0.1460.0> Marked this node as undergoing maintenance
2025-02-10 15:00:09.570904+00:00 [info] <0.1460.0> Asked to suspend 9 client connection listeners. No new client connections will be accepted until these listeners are resumed!
2025-02-10 15:00:09.572268+00:00 [warning] <0.1460.0> Suspended all listeners and will no longer accept client connections
2025-02-10 15:00:09.572317+00:00 [warning] <0.1460.0> Closed 0 local client connections
2025-02-10 15:00:09.572418+00:00 [warning] <0.1449.0> MQTT disconnecting client <<"127.0.0.1:33376 -> 127.0.0.1:27005">> with client ID 'sub0', reason: maintenance
2025-02-10 15:00:09.572414+00:00 [warning] <0.1000.0> Closed 2 local (Web) MQTT client connections
2025-02-10 15:00:09.572499+00:00 [warning] <0.1456.0> MQTT disconnecting client <<"127.0.0.1:33390 -> 127.0.0.1:27005">> with client ID 'will', reason: maintenance
2025-02-10 15:00:09.572866+00:00 [alert] <0.1000.0> Closed 0 local STOMP client connections
2025-02-10 15:00:09.577432+00:00 [debug] <0.1456.0> scheduled delayed Will Message to topic my/topic for MQTT client ID will to be sent in 10000 ms
2025-02-10 15:00:12.991328+00:00 [debug] <0.1469.0> Will reconcile virtual host processes on all cluster members...
2025-02-10 15:00:12.991443+00:00 [debug] <0.1469.0> Will make sure that processes of 1 virtual hosts are running on all reachable cluster nodes
2025-02-10 15:00:12.992497+00:00 [debug] <0.1469.0> Done with virtual host processes reconciliation (run 3)
2025-02-10 15:00:16.511733+00:00 [debug] <0.1476.0> Will reconcile virtual host processes on all cluster members...
2025-02-10 15:00:16.511864+00:00 [debug] <0.1476.0> Will make sure that processes of 1 virtual hosts are running on all reachable cluster nodes
2025-02-10 15:00:16.514293+00:00 [debug] <0.1476.0> Done with virtual host processes reconciliation (run 4)
2025-02-10 15:00:24.897477+00:00 [debug] <0.1479.0> Will reconcile virtual host processes on all cluster members...
2025-02-10 15:00:24.897607+00:00 [debug] <0.1479.0> Will make sure that processes of 1 virtual hosts are running on all reachable cluster nodes
2025-02-10 15:00:24.898483+00:00 [debug] <0.1479.0> Done with virtual host processes reconciliation (run 5)
2025-02-10 15:00:24.898527+00:00 [debug] <0.1479.0> Will reschedule virtual host process reconciliation after 30 seconds
2025-02-10 15:00:32.994347+00:00 [debug] <0.1484.0> Will reconcile virtual host processes on all cluster members...
2025-02-10 15:00:32.994474+00:00 [debug] <0.1484.0> Will make sure that processes of 1 virtual hosts are running on all reachable cluster nodes
2025-02-10 15:00:32.996539+00:00 [debug] <0.1484.0> Done with virtual host processes reconciliation (run 6)
2025-02-10 15:00:32.996585+00:00 [debug] <0.1484.0> Will reschedule virtual host process reconciliation after 30 seconds
2025-02-10 15:00:39.576325+00:00 [info] <0.1460.0> Will transfer leadership of 0 quorum queues with current leader on this node
2025-02-10 15:00:39.576456+00:00 [info] <0.1460.0> Leadership transfer for quorum queues hosted on this node has been initiated
2025-02-10 15:00:39.576948+00:00 [info] <0.1460.0> Will stop local follower replicas of 0 quorum queues on this node
2025-02-10 15:00:39.576990+00:00 [info] <0.1460.0> Stopped all local replicas of quorum queues hosted on this node
2025-02-10 15:00:39.577120+00:00 [info] <0.1460.0> Will transfer leadership of metadata store with current leader on this node
2025-02-10 15:00:39.577282+00:00 [info] <0.1460.0> Khepri clustering: transferring leadership to node 'rmq-ct-mqtt-cluster_size_3-2-27054@localhost'
2025-02-10 15:00:39.577424+00:00 [info] <0.1460.0> Khepri clustering: skipping leadership transfer, leader is already in node 'rmq-ct-mqtt-cluster_size_3-2-27054@localhost'
2025-02-10 15:00:39.577547+00:00 [info] <0.1460.0> Leadership transfer for metadata store on this node has been done. The new leader is 'rmq-ct-mqtt-cluster_size_3-2-27054@localhost'
2025-02-10 15:00:39.577674+00:00 [info] <0.1460.0> Node is ready to be shut down for maintenance or upgrade
2025-02-10 15:00:39.595638+00:00 [notice] <0.64.0> SIGTERM received - shutting down
2025-02-10 15:00:39.595638+00:00 [notice] <0.64.0>
2025-02-10 15:00:39.595758+00:00 [debug] <0.44.0> Running rabbit_prelaunch:shutdown_func() as part of `kernel` shutdown
```

Running the same test locally revealed that [rabbit_maintenance:status_consistent_read/1](55ae918094/deps/rabbit/src/rabbit_maintenance.erl (L131))
takes exactly 30 seconds to complete.

The test case assumes a Will Delay higher than the time it takes to
drain and shut down the node. Hence, this commit increases the Will
Delay time from 10 seconds to 40 seconds.
2025-02-11 18:34:36 +01:00
Marcial Rosales ecacf0f19c Clean up 2025-02-11 16:12:15 +01:00
Marcial Rosales 3041d6c253 Support in code the old keycloak format
That was not keycloak format it was an
extension to the oauth spec introuduced
a few years ago. To get a token from
keycloak using this format, a.k.a.
requesting party token, one has to specify
a different claim type called
urn:ietf:params:oauth:grant-type:uma-ticket
2025-02-11 16:12:15 +01:00
Marcial Rosales 1179d3a3ec Support keycloak custom format via configuration 2025-02-11 16:12:15 +01:00
Jean-Sébastien Pédron 5cbda4c838
rabbit_stream_queue_SUITE: Swap uses of node 2 and 3 in `format`
[Why]
We hit some transient errors with the previous order when doing
mixed-version testing. Swapping the nodes seems to fix the problem.
2025-02-11 15:50:07 +01:00
Jean-Sébastien Pédron 55ae918094
Merge pull request #13232 from rabbitmq/adapt-feature_flags_SUITE-to-khepri-0.17.0
feature_flags_SUITE: Change clustering seed node in few tests
2025-02-11 15:48:59 +01:00
Jean-Sébastien Pédron 30fb8a719f
feature_flags_SUITE: Change clustering seed node in few tests
[Why]
Some testcases used to use node 1 as the clustering seed node. With
mixed-version testing, it could cause issues because node 1 would start
with a new version of Ra compared to node 2 and node 2 could fail to
join.

[How]
By using node 2 as the seed node, node 1 running a newer version of Ra
should be able to join because it supports talking to an older version.
2025-02-11 12:10:33 +01:00
Michal Kuratczyk 703ee8529e
Add rabbitmq_endpoint label to rabbitmq_identity_info 2025-02-07 15:51:40 +01:00
Péter Gömöri b62e09806b Show consumer count column on Mgmt UI Channels page
Consumer count is already returned by the /channels API endpoint. Now
the consumer count column can be shown in the channels table but it is
hidden by default.
2025-02-03 18:31:55 +01:00
1149 changed files with 53364 additions and 53660 deletions

View File

@ -1,6 +0,0 @@
# .bazelignore behaves differently than .gitignore
# https://github.com/bazelbuild/bazel/issues/7093
.erlang.mk
deps/osiris
deps/ra
extra_deps

View File

@ -1,21 +0,0 @@
build --enable_bzlmod
build --registry=https://bcr.bazel.build/
build --registry=https://raw.githubusercontent.com/rabbitmq/bazel-central-registry/erlang-packages/
build --incompatible_strict_action_env
build --local_test_jobs=1
build --flag_alias=erlang_home=@rules_erlang//:erlang_home
build --flag_alias=erlang_version=@rules_erlang//:erlang_version
build --flag_alias=elixir_home=@rules_elixir//:elixir_home
build --flag_alias=test_build=//:enable_test_build
build --test_timeout=7200
build --combined_report=lcov
# Try importing a user specific .bazelrc
# You can create your own by copying and editing the template-user.bazelrc template:
# cp template-user.bazelrc user.bazelrc
try-import %workspace%/user.bazelrc

View File

@ -1 +0,0 @@
7.4.1

View File

@ -1,3 +1,6 @@
[build_info]
apps = "deps/*"
deps = ""
deps = ""
[eqwalizer]
enable_all = false

View File

@ -1,3 +1,5 @@
# Format rabbitmq_aws with erlfmt
a4fffbd7e0a312fef2e514ade54fc4310a681542
# Revert "Format MQTT code with erlfmt"
209f23fa2f58e0240116b3e8e5be9cd54d34b569
# Format MQTT code with erlfmt

View File

@ -23,8 +23,9 @@ body:
attributes:
label: RabbitMQ version used
options:
- 4.0.3
- 3.13.7 or older
- 4.1.x
- 4.0.x
- 3.13.x or older
validations:
required: true
- type: dropdown

View File

@ -29,6 +29,13 @@ body:
attributes:
label: RabbitMQ version used
options:
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
@ -40,6 +47,7 @@ body:
attributes:
label: Erlang version used
options:
- 27.3.x
- 27.2.x
- 27.1.x
- 27.0.x

View File

@ -21,12 +21,10 @@ _Put an `x` in the boxes that apply_
_Put an `x` in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code._
- [ ] **Mandatory**: I (or my employer/client) have have signed the CA (see https://github.com/rabbitmq/cla)
- [ ] I have read the `CONTRIBUTING.md` document
- [ ] I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All tests pass locally with my changes
- [ ] If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website

View File

@ -10,52 +10,119 @@ updates:
directory: "/"
schedule:
interval: "daily"
target-branch: "v4.0.x"
target-branch: "v4.2.x"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "v3.13.x"
target-branch: "v4.1.x"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: "v4.0.x"
# Maintain dependencies for Java test projects
- package-ecosystem: "maven"
directory: "/deps/rabbitmq_mqtt/test/java_SUITE_data"
directories:
- "/deps/rabbit/test/amqp_jms_SUITE_data"
- "/deps/rabbitmq_mqtt/test/java_SUITE_data"
- "/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data"
- "/deps/rabbitmq_stream_management/test/http_SUITE_data"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin"
schedule:
interval: "daily"
interval: "weekly"
day: "saturday"
groups:
dev-deps:
dependency-type: "development"
prod-deps:
dependency-type: "production"
commit-message:
prefix: "[skip ci] "
target-branch: "main"
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
versions: [ "[1.3,)" ]
- dependency-name: "org.junit:*"
versions: [ "[6.0,)" ]
- dependency-name: "org.junit.jupiter:*"
versions: [ "[6.0,)" ]
- package-ecosystem: "maven"
directory: "deps/rabbitmq_stream/test/rabbit_stream_SUITE_data"
directories:
- "/deps/rabbit/test/amqp_jms_SUITE_data"
- "/deps/rabbitmq_mqtt/test/java_SUITE_data"
- "/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data"
- "/deps/rabbitmq_stream_management/test/http_SUITE_data"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin"
schedule:
interval: "daily"
target-branch: "main"
interval: "weekly"
day: "saturday"
groups:
dev-deps:
dependency-type: "development"
prod-deps:
dependency-type: "production"
commit-message:
prefix: "[skip ci] "
target-branch: "v4.2.x"
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
versions: [ "[1.3,)" ]
- dependency-name: "org.junit:*"
versions: [ "[6.0,)" ]
- dependency-name: "org.junit.jupiter:*"
versions: [ "[6.0,)" ]
- package-ecosystem: "maven"
directory: "deps/rabbitmq_stream_management/test/http_SUITE_data"
directories:
- "/deps/rabbit/test/amqp_jms_SUITE_data"
- "/deps/rabbitmq_mqtt/test/java_SUITE_data"
- "/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data"
- "/deps/rabbitmq_stream_management/test/http_SUITE_data"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin"
schedule:
interval: "daily"
target-branch: "main"
interval: "weekly"
day: "saturday"
groups:
dev-deps:
dependency-type: "development"
prod-deps:
dependency-type: "production"
commit-message:
prefix: "[skip ci] "
target-branch: "v4.1.x"
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
versions: [ "[1.3,)" ]
- dependency-name: "org.junit:*"
versions: [ "[6.0,)" ]
- dependency-name: "org.junit.jupiter:*"
versions: [ "[6.0,)" ]
- package-ecosystem: "maven"
directory: "deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests"
directories:
- "/deps/rabbit/test/amqp_system_SUITE_data/java-tests"
- "/deps/rabbitmq_mqtt/test/java_SUITE_data"
- "/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data"
- "/deps/rabbitmq_stream_management/test/http_SUITE_data"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot"
- "/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin"
schedule:
interval: "daily"
target-branch: "main"
interval: "weekly"
day: "saturday"
groups:
dev-deps:
dependency-type: "development"
prod-deps:
dependency-type: "production"
commit-message:
prefix: "[skip ci] "
target-branch: "v4.0.x"
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
versions: [ "[1.3,)" ]
- package-ecosystem: "maven"
directory: "deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot"
schedule:
interval: "daily"
target-branch: "main"
- package-ecosystem: "maven"
directory: "deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin"
schedule:
interval: "daily"
target-branch: "main"
- dependency-name: "org.junit:*"
versions: [ "[6.0,)" ]
- dependency-name: "org.junit.jupiter:*"
versions: [ "[6.0,)" ]

49
.github/mergify.yml vendored
View File

@ -1,11 +1,4 @@
pull_request_rules:
- name: Add bazel label if a Bazel file is modified
conditions:
- files~=\.(bazel|bzl)$
actions:
label:
add:
- bazel
- name: Add make label if a Make file is modified
conditions:
- files~=(Makefile|\.mk)$
@ -13,13 +6,20 @@ pull_request_rules:
label:
add:
- make
- name: Automatically backport to v4.1.x based on label
- name: Automatically backport to v4.2.x based on label
conditions:
- base=main
- label=backport-v4.2.x
actions:
backport:
branches:
- v4.2.x
assignees:
- "{{ author }}"
- name: Automatically backport to v4.1.x based on label
conditions:
- base=v4.2.x
- label=backport-v4.1.x
- label!=backport-v4.0.x
- label!=backport-v3.13.x
- label!=backport-v3.12.x
actions:
backport:
branches:
@ -30,36 +30,9 @@ pull_request_rules:
conditions:
- base=v4.1.x
- label=backport-v4.0.x
- label!=backport-v3.13.x
- label!=backport-v3.12.x
actions:
backport:
branches:
- v4.0.x
assignees:
- "{{ author }}"
- name: Automatically backport to v4.1.x & v4.0.x based on label
conditions:
- base=main
- label=backport-v4.1.x
- label=backport-v4.0.x
actions:
backport:
branches:
- v4.1.x
labels:
- backport-v4.0.x
assignees:
- "{{ author }}"
- name: Automatically backport to v3.13.x based on label
conditions:
- base=v4.0.x
- label!=backport-v4.1.x
- label=backport-v3.13.x
- label!=backport-v3.12.x
actions:
backport:
branches:
- v3.13.x
assignees:
- "{{ author }}"

View File

@ -0,0 +1,37 @@
name: Spring Authorization Server docker image (make)
on:
push:
branches:
- main
paths:
- .github/workflows/authorization-server-make.yaml
- selenium/authorization-server
pull_request:
paths:
- .github/workflows/authorization-server-make.yaml
- selenium/authorization-server
env:
REGISTRY_IMAGE: pivotalrabbitmq/spring-authorization-server
IMAGE_TAG: 0.0.11
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v5
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: selenium/authorization-server
push: true
tags: ${{ env.REGISTRY_IMAGE }}:${{ env.IMAGE_TAG }}

View File

@ -1,37 +0,0 @@
name: Check Bazel/Erlang.mk Equivalence on Release Branches
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
check-main:
uses: ./.github/workflows/check-build-system-equivalence.yaml
with:
ref: refs/heads/main
erlang_version: 26.2
elixir_version: 1.17
project_version: 4.0.0
check-v4_0_x:
uses: ./.github/workflows/check-build-system-equivalence.yaml
with:
ref: refs/heads/main
erlang_version: 26.2
elixir_version: 1.17
project_version: 4.0.0
check-v3_13_x:
uses: ./.github/workflows/check-build-system-equivalence.yaml
with:
ref: refs/heads/v3.13.x
erlang_version: 26.2
elixir_version: 1.17
project_version: 3.13.0
check-v3_12_x:
uses: ./.github/workflows/check-build-system-equivalence.yaml
with:
ref: refs/heads/v3.12.x
erlang_version: 26.1
elixir_version: 1.17
project_version: 3.12.0

View File

@ -1,155 +0,0 @@
name: Check Bazel/Erlang.mk Equivalence
on:
workflow_call:
inputs:
ref:
required: true
type: string
erlang_version:
required: true
type: string
elixir_version:
required: true
type: string
project_version:
required: true
type: string
workflow_dispatch:
inputs:
erlang_version:
description: 'OTP version to build with'
required: true
default: "26.2"
elixir_version:
description: 'Elixir version to build with'
required: true
default: "1.15"
project_version:
description: 'PROJECT_VERSION used for make'
required: true
default: "4.0.0"
env:
erlang_version: ${{ inputs.erlang_version || github.event.inputs.erlang_version }}
elixir_version: ${{ inputs.elixir_version || github.event.inputs.elixir_version }}
VERSION: ${{ inputs.project_version || github.event.inputs.project_version }}
PLUGINS: amqp10_common amqp10_client rabbitmq_amqp1_0 rabbitmq_auth_backend_cache rabbitmq_auth_backend_http rabbitmq_auth_backend_ldap rabbitmq_auth_backend_oauth2 rabbitmq_auth_mechanism_ssl rabbitmq_consistent_hash_exchange rabbitmq_event_exchange rabbitmq_federation rabbitmq_jms_topic_exchange rabbitmq_mqtt rabbitmq_random_exchange rabbitmq_recent_history_exchange rabbitmq_sharding rabbitmq_shovel rabbitmq_stomp rabbitmq_stream rabbitmq_trust_store rabbitmq_web_dispatch rabbitmq_management_agent rabbitmq_management rabbitmq_prometheus rabbitmq_federation_management rabbitmq_shovel_management rabbitmq_stream_management rabbitmq_top rabbitmq_tracing rabbitmq_web_mqtt rabbitmq_web_mqtt_examples rabbitmq_web_stomp rabbitmq_web_stomp_examples rabbitmq_aws rabbitmq_peer_discovery_common rabbitmq_peer_discovery_aws rabbitmq_peer_discovery_k8s rabbitmq_peer_discovery_consul rabbitmq_peer_discovery_etcd
EXTRA_PLUGINS: accept amqp_client aten base64url cowboy cowlib credentials_obfuscation cuttlefish eetcd enough gen_batch_server getopt gun jose observer_cli osiris prometheus quantile_estimator ra ranch recon redbug seshat stdout_formatter syslog sysmon_handler systemd thoas
jobs:
build-with-bazel:
name: bazel build package-generic-unix.tar.xz
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- name: CONFIGURE ERLANG
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ env.erlang_version }}
elixir-version: ${{ env.elixir_version }}
- name: CONFIGURE BAZEL
run: |
cat << EOF >> user.bazelrc
build --disk_cache=
build --color=yes
EOF
- name: BUILD package-generic-unix.tar.xz
run: |
bazelisk build //:package-generic-unix
- name: RESOLVE ARCHIVES_DIR
run: |
echo "archives_dir=$(readlink -f bazel-bin)" >> $GITHUB_ENV
- name: UPLOAD package-generic-unix.tar.xz
uses: actions/upload-artifact@v4.3.2
with:
name: bazel-package-generic-unix-${{ env.VERSION }}.tar.xz
path: ${{ env.archives_dir }}/package-generic-unix.tar.xz
if-no-files-found: error
build-with-make:
name: make package-generic-unix.tar.xz
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
path: rabbitmq
ref: ${{ inputs.ref || github.ref }}
- name: CONFIGURE ERLANG
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ env.erlang_version }}
elixir-version: ${{ env.elixir_version }}
- name: BUILD package-generic-unix.tar.xz
env:
MAKE: make
run: |
$MAKE -C rabbitmq \
source-dist \
PACKAGES_DIR="$PWD/PACKAGES" \
PLUGINS="$PLUGINS" \
PROJECT_VERSION="$VERSION"
$MAKE -C rabbitmq/packaging \
package-generic-unix \
PACKAGES_DIR="$PWD/PACKAGES" \
VERSION="$VERSION"
- name: UPLOAD package-generic-unix.tar.xz
uses: actions/upload-artifact@v4.3.2
with:
name: make-package-generic-unix-${{ env.VERSION }}.tar.xz
path: PACKAGES/rabbitmq-server-generic-unix-*.tar.xz
if-no-files-found: error
compare:
needs:
- build-with-bazel
- build-with-make
name: Compare package-generic-unix.tar.xz
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
path: rabbitmq-server
ref: ${{ inputs.ref || github.ref }}
- name: CONFIGURE ERLANG
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ env.erlang_version }}
elixir-version: ${{ env.elixir_version }}
- name: DOWNLOAD bazel-package-generic-unix.tar.xz
uses: actions/download-artifact@v4
with:
name: bazel-package-generic-unix-${{ env.VERSION }}.tar.xz
- name: DOWNLOAD make-package-generic-unix.tar.xz
uses: actions/download-artifact@v4
with:
name: make-package-generic-unix-${{ env.VERSION }}.tar.xz
- name: EXPAND & COMPARE
run: |
mkdir bazel
pushd bazel
tar -xf ${{ github.workspace }}/package-generic-unix.tar.xz
find . | sort > ${{ github.workspace }}/bazel.manifest
popd
mkdir make
pushd make
tar -xf ${{ github.workspace }}/rabbitmq-server-generic-unix-*.tar.xz
# delete an empty directory
rm -d rabbitmq_server-*/plugins/rabbitmq_random_exchange-*/include
find . | sort > ${{ github.workspace }}/make.manifest
popd
tree -L 3 bazel
tree -L 3 make
sleep 1
set -x
./rabbitmq-server/tools/compare_dist.sh make bazel

View File

@ -1,47 +0,0 @@
name: Run gazelle (Scheduled)
on:
schedule:
- cron: '0 4 * * *'
jobs:
bazel-run-gazelle:
name: bazel run gazelle
runs-on: ubuntu-latest
strategy:
max-parallel: 1
fail-fast: false
matrix:
target_branch:
- main
- v4.0.x
- v3.13.x
- v3.12.x
timeout-minutes: 10
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
ref: ${{ matrix.target_branch }}
- name: Configure Erlang
uses: erlef/setup-beam@v1
with:
otp-version: 26.2
elixir-version: 1.15
- name: BAZEL RUN GAZELLE
run: |
bazel run gazelle
- name: CREATE PULL REQUEST
uses: peter-evans/create-pull-request@v7.0.6
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>
title: bazel run gazelle
body: >
Automated changes created by
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
using the [create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action in the ${{ github.workflow }} workflow.
commit-message: |
bazel run gazelle
branch: gazelle-${{ matrix.target_branch }}
delete-branch: true

View File

@ -1,42 +0,0 @@
name: Run gazelle
on:
workflow_dispatch:
inputs:
target_branch:
description: Branch on which to run
required: true
default: main
jobs:
bazel-run-gazelle:
name: bazel run gazelle
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.target_branch }}
- name: Configure Erlang
uses: erlef/setup-beam@v1
with:
otp-version: 26.2
elixir-version: 1.15
- name: BAZEL RUN GAZELLE
run: |
bazel run gazelle
- name: CREATE PULL REQUEST
uses: peter-evans/create-pull-request@v7.0.6
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>
title: bazel run gazelle
body: >
Automated changes created by
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
using the [create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action in the ${{ github.workflow }} workflow.
commit-message: |
bazel run gazelle
branch: gazelle-${{ github.event.inputs.target_branch }}
delete-branch: true

View File

@ -14,7 +14,7 @@ env:
REGISTRY_IMAGE: pivotalrabbitmq/ibm-mqadvanced-server-dev
IBM_MQ_REPOSITORY: ibm-messaging/mq-container
IBM_MQ_BRANCH_NAME: 9.4.0
IMAGE_TAG: 9.4.0.5-amd64
IMAGE_TAG: 9.4.0.12-amd64
jobs:
docker:
runs-on: ubuntu-latest
@ -34,7 +34,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Checkout ibm-mqadvanced-server-dev
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: ${{ env.IBM_MQ_REPOSITORY }}
ref: ${{ env.IBM_MQ_BRANCH_NAME }}

136
.github/workflows/oci-make-nightly.yaml vendored Normal file
View File

@ -0,0 +1,136 @@
name: Nightly OCI (make)
on:
schedule:
# at 2:20am Mon-Fri
# GitHub advises to schedule jobs NOT at the start of the hour
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
- cron: 20 2 * * 1-5
workflow_dispatch:
env:
REGISTRY_IMAGE: pivotalrabbitmq/rabbitmq
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-package-generic-unix:
strategy:
matrix:
otp_version:
- '27'
branch:
- main
- v4.2.x
- v4.1.x
- v4.0.x
include:
- branch: main
project_version: 4.3.0
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ matrix.branch }}
fetch-tags: true
fetch-depth: 0
filter: blob:none
- name: Determine closes tag
id: tag
if: matrix.branch != 'main'
shell: bash
run: |
t=$(git describe --tags --abbrev=0 ${{ matrix.branch }})
printf "project_version=%s\n" "${t:1}" | tee -a "$GITHUB_OUTPUT"
- name: Configure Erlang
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
elixir-version: latest
- name: make package-generic-unix
id: make
run: |
make package-generic-unix PROJECT_VERSION=${{ matrix.project_version || steps.tag.outputs.project_version }}+${{ github.sha }}
- name: Upload package-generic-unix
uses: actions/upload-artifact@v4
with:
name: package-generic-unix-otp${{ matrix.otp_version }}-${{ matrix.branch }}
path: PACKAGES/rabbitmq-server-*.tar.xz
build-and-push:
strategy:
fail-fast: false
matrix:
otp_version:
- '27'
branch:
- main
- v4.2.x
- v4.1.x
- v4.0.x
needs: build-package-generic-unix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ matrix.branch }}
- name: Download package-generic-unix
uses: actions/download-artifact@v5
with:
name: package-generic-unix-otp${{ matrix.otp_version }}-${{ matrix.branch }}
path: PACKAGES
- name: Rename package-generic-unix
run: |
cp \
PACKAGES/rabbitmq-server-generic-unix-*.tar.xz \
packaging/docker-image/package-generic-unix.tar.xz
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
flavor: |
suffix=-otp${{ matrix.otp_version }}
tags: |
type=sha,format=long
type=schedule,pattern=nightly.{{date 'YYYYMMDD'}},prefix=${{ matrix.branch }}-
type=raw,value=${{ matrix.branch }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
push: true
context: packaging/docker-image
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
cache-to: type=gha,mode=max,scope=${{ matrix.otp_version }}
cache-from: type=gha,scope=${{ matrix.otp_version }}
build-args: |
OTP_VERSION=${{ matrix.otp_version }}
RABBITMQ_VERSION=${{ matrix.branch }}+${{ github.sha }}

View File

@ -5,27 +5,29 @@
#
name: OCI (make)
on:
push:
paths-ignore:
- '.github/workflows/secondary-umbrella.yaml'
- '.github/workflows/update-elixir-patches.yaml'
- '.github/workflows/update-otp-patches.yaml'
- '.github/workflows/release-alphas.yaml'
- '*.md'
pull_request:
paths:
- deps/**
- scripts/**
- Makefile
- plugins.mk
- rabbitmq-components.mk
- packaging/**
- .github/workflows/oci-make.yaml
workflow_dispatch:
inputs:
otp_version:
# a tag of the erlang image, see https://hub.docker.com/_/erlang for available tags
# also used in the setup-beam step (same tag should work for both)
description: OTP version (eg. `26`, `26.2.5.6`)
default: 27
default: 28
build_arm:
description: Build for ARM64 as well?
type: boolean
default: false
env:
REGISTRY_IMAGE: pivotalrabbitmq/rabbitmq
VERSION: 4.1.0+${{ github.sha }}
VERSION: 4.3.0+${{ github.sha }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@ -34,9 +36,11 @@ jobs:
strategy:
matrix:
otp_version:
- ${{ github.event.inputs.otp_version || '27' }}
- ${{ github.event.inputs.otp_version || '28' }}
runs-on: ubuntu-latest
outputs:
# When dependabot, or a user from a fork, creates PRs, secrets are not injected, and the OCI workflow can't push the image
# This check acts as a gate keeper
authorized: ${{ steps.authorized.outputs.authorized }}
steps:
- name: CHECK IF IMAGE WILL PUSH
@ -49,7 +53,7 @@ jobs:
fi
- name: Checkout
if: steps.authorized.outputs.authorized == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Configure Erlang
if: steps.authorized.outputs.authorized == 'true'
uses: erlef/setup-beam@v1
@ -72,15 +76,15 @@ jobs:
fail-fast: false
matrix:
otp_version:
- ${{ github.event.inputs.otp_version || '27' }}
- ${{ github.event.inputs.otp_version || '28' }}
needs: build-package-generic-unix
runs-on: ubuntu-latest
if: ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true'
if: ${{ needs.build-package-generic-unix.outputs.authorized == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Download package-generic-unix
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: package-generic-unix-otp${{ matrix.otp_version }}
path: PACKAGES

View File

@ -13,7 +13,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
OTP_VERSION: "27"
OTP_VERSION: "28"
jobs:
peer-discovery-aws-integration-test:
name: Integration Test
@ -30,7 +30,7 @@ jobs:
fi
- name: CHECKOUT REPOSITORY
if: steps.authorized.outputs.authorized == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v5
- uses: docker/metadata-action@v5
if: steps.authorized.outputs.authorized == 'true'
id: metadata
@ -48,10 +48,10 @@ jobs:
polling-seconds: 60
- name: CONFIGURE OTP & ELIXIR
if: steps.authorized.outputs.authorized == 'true'
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: "1.17"
elixir-version: "1.18"
- name: SETUP ecs-cli
if: steps.authorized.outputs.authorized == 'true'
env:

View File

@ -3,8 +3,7 @@ on:
workflow_dispatch:
push:
branches:
# 4.1.x
- "main"
- "v4.1.x"
paths:
- "deps/*/src/**"
- 'deps/rabbitmq_management/priv/**'
@ -18,10 +17,10 @@ jobs:
steps:
- name: Compute prerelease identifier from commit SHA
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Trigger a 4.0.x alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
uses: peter-evans/repository-dispatch@v3
- name: Trigger a 4.1.x alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.RABBITMQCI_BOT_TOKEN }}
token: ${{ secrets.MK_RELEASE_AUTOMATION_TOKEN }}
repository: ${{ env.DEV_WORKFLOW_REPOSITORY }}
event-type: "new_4.1.x_alpha"
client-payload: |-

View File

@ -0,0 +1,35 @@
name: "Trigger a 4.2.x alpha release build"
on:
workflow_dispatch:
push:
branches:
- "v4.2.x"
paths:
- "deps/*/src/**"
- 'deps/rabbitmq_management/priv/**'
- ".github/workflows/**"
- "rabbitmq-components.mk"
env:
DEV_WORKFLOW_REPOSITORY: "rabbitmq/server-packages"
jobs:
trigger_alpha_build:
runs-on: ubuntu-latest
steps:
- name: Compute prerelease identifier from commit SHA
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Trigger a 4.2.x alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.MK_RELEASE_AUTOMATION_TOKEN }}
repository: ${{ env.DEV_WORKFLOW_REPOSITORY }}
event-type: "new_4.2.x_alpha"
client-payload: |-
{
"release_repository": "${{ env.DEV_WORKFLOW_REPOSITORY }}",
"release_description": "Commit: https://github.com/rabbitmq/rabbitmq-server/commit/${{ github.sha }}, pushed at: ${{ github.event.repository.pushed_at }}",
"prerelease": true,
"prerelease_kind": "alpha",
"prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}",
"release_title": "RabbitMQ ${{ vars.SERVER_42_NEXT_PATCH_VERSION }}-alpha.${{ env.PRERELEASE_IDENTIFIER }} (from ${{ github.event.repository.pushed_at }})",
"base_version": "${{ vars.SERVER_42_NEXT_PATCH_VERSION }}"
}

View File

@ -1,9 +1,9 @@
name: "Trigger a 4.0.x alpha release build"
name: "Trigger a 4.3.x alpha release build"
on:
workflow_dispatch:
push:
branches:
- "v4.0.x"
- "main"
paths:
- "deps/*/src/**"
- 'deps/rabbitmq_management/priv/**'
@ -17,12 +17,12 @@ jobs:
steps:
- name: Compute prerelease identifier from commit SHA
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Trigger a 4.0.x alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
uses: peter-evans/repository-dispatch@v3
- name: Trigger a 4.3.x alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.RABBITMQCI_BOT_TOKEN }}
token: ${{ secrets.MK_RELEASE_AUTOMATION_TOKEN }}
repository: ${{ env.DEV_WORKFLOW_REPOSITORY }}
event-type: "new_4.0.x_alpha"
event-type: "new_4.3.x_alpha"
client-payload: |-
{
"release_repository": "${{ env.DEV_WORKFLOW_REPOSITORY }}",
@ -30,6 +30,6 @@ jobs:
"prerelease": true,
"prerelease_kind": "alpha",
"prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}",
"release_title": "RabbitMQ ${{ vars.SERVER_40_NEXT_PATCH_VERSION }}-alpha.${{ env.PRERELEASE_IDENTIFIER }} (from ${{ github.event.repository.pushed_at }})",
"base_version": "${{ vars.SERVER_40_NEXT_PATCH_VERSION }}"
"release_title": "RabbitMQ ${{ vars.SERVER_43_NEXT_PATCH_VERSION }}-alpha.${{ env.PRERELEASE_IDENTIFIER }} (from ${{ github.event.repository.pushed_at }})",
"base_version": "${{ vars.SERVER_43_NEXT_PATCH_VERSION }}"
}

View File

@ -1,214 +0,0 @@
#@ load("@ytt:data", "data")
#@yaml/text-templated-strings
#@ def job_names(plugins):
#@ names = []
#@ for p in plugins:
#@ names.append("test-"+p+"-mixed")
#@ end
#@ return names
#@ end
#@ def sharded_job_names(plugin, shard_count):
#@ names = []
#@ for shard_index in range(0, shard_count):
#@ names.append("test-"+plugin+"-"+str(shard_index)+"-mixed")
#@ end
#@ return names
#@ end
---
name: Test Mixed Version Clusters
on:
push:
branches:
- main
- v4.0.x
- v3.13.x
- bump-otp-*
- bump-elixir-*
- bump-rbe-*
- bump-rules_erlang
paths:
- 'deps/**'
- 'scripts/**'
- Makefile
- plugins.mk
- rabbitmq-components.mk
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- .github/workflows/test-mixed-versions.yaml
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ensure-mixed-version-archive:
runs-on: ubuntu-22.04
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
with:
path: primary-umbrella
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: CHECK FOR ARCHIVE ON S3
id: check
working-directory: primary-umbrella
run: |
set -u
ARCHIVE_URL="$(grep -Eo 'https://rabbitmq-github-actions.s3.eu-west-1.amazonaws.com.*.tar.xz' bazel/bzlmod/secondary_umbrella.bzl)"
echo "ARCHIVE_URL: ${ARCHIVE_URL}"
curl -LO "${ARCHIVE_URL}"
if xzcat --test package-generic-unix-for-mixed-version-testing-v*.tar.xz; then
exists=true
else
exists=false
fi
echo "exists=${exists}" | tee $GITHUB_ENV
OTP_VERSION=${ARCHIVE_URL#*secondary-umbrellas/}
OTP_VERSION=${OTP_VERSION%*/package-generic-unix-for-mixed-version-testing-v*.tar.xz}
echo "otp_version=${OTP_VERSION}" | tee -a $GITHUB_OUTPUT
VERSION=${ARCHIVE_URL#*package-generic-unix-for-mixed-version-testing-v}
VERSION=${VERSION%*.tar.xz}
echo "version=${VERSION}" | tee -a $GITHUB_OUTPUT
- name: CHECKOUT REPOSITORY (MIXED VERSION)
if: env.exists != 'true'
uses: actions/checkout@v4
with:
ref: v${{ steps.check.outputs.version }}
path: secondary-umbrella
- name: CONFIGURE OTP & ELIXIR
if: env.exists != 'true'
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ steps.check.outputs.otp_version }}
elixir-version: 1.15
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: AUTHENTICATE TO GOOGLE CLOUD
uses: google-github-actions/auth@v2.1.7
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: BUILD SECONDARY UMBRELLA ARCHIVE
if: env.exists != 'true'
working-directory: secondary-umbrella
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}
build --google_default_credentials
build --remote_download_toplevel
EOF
fi
sed -i"_orig" -E "/APP_VERSION/ s/3\.[0-9]+\.[0-9]+/${{ steps.check.outputs.version }}/" rabbitmq.bzl
bazelisk build :package-generic-unix \
--test_build \
--verbose_failures
OUTPUT_DIR=${{ github.workspace }}/output
mkdir -p ${OUTPUT_DIR}/${{ steps.check.outputs.otp_version }}
cp \
bazel-bin/package-generic-unix.tar.xz \
${OUTPUT_DIR}/${{ steps.check.outputs.otp_version }}/package-generic-unix-for-mixed-version-testing-v${{ steps.check.outputs.version }}.tar.xz
- name: UPLOAD THE ARCHIVE TO S3
if: env.exists != 'true'
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: output
DEST_DIR: secondary-umbrellas
check-workflow:
needs: ensure-mixed-version-archive
runs-on: ubuntu-latest
outputs:
repo_cache_key: ${{ steps.repo-cache-key.outputs.value }}
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: ENSURE WORKFLOWS ARE UP TO DATE
run: |
mkdir local-bin/
curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash
make actions-workflows YTT=$PWD/local-bin/ytt
git diff --exit-code
- name: COMPUTE REPO CACHE KEY
id: repo-cache-key
run: |
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
#@ for plugin in data.values.internal_deps:
test-(@= plugin @)-mixed:
needs: check-workflow
uses: ./.github/workflows/test-plugin-mixed.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: #@ plugin
secrets: inherit
#@ end
#@ rabbit_shard_count = 10
#@ for shard_index in range(0, rabbit_shard_count):
test-rabbit-(@= str(shard_index) @)-mixed:
needs: #@ ["check-workflow"] + job_names(data.values.internal_deps)
uses: ./.github/workflows/test-plugin-mixed.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: rabbit
shard_index: #@ shard_index
shard_count: #@ rabbit_shard_count
secrets: inherit
#@ end
test-rabbitmq_cli-mixed:
needs: check-workflow
uses: ./.github/workflows/test-plugin-mixed.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: rabbitmq_cli
secrets: inherit
#@ for plugin in data.values.tier1_plugins:
test-(@= plugin @)-mixed:
needs: #@ ["check-workflow"] + sharded_job_names("rabbit", rabbit_shard_count)
uses: ./.github/workflows/test-plugin-mixed.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: #@ plugin
secrets: inherit
#@ end
summary-test:
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count) + ["test-rabbitmq_cli-mixed"]
runs-on: ubuntu-latest
steps:
- name: SUMMARY
run: |
cat << 'EOF' | jq -e 'map(.result == "success") | all(.)'
${{ toJson(needs) }}
EOF

View File

@ -1,152 +0,0 @@
#@ load("@ytt:data", "data")
#@yaml/text-templated-strings
#@ def job_names(plugins):
#@ names = []
#@ for p in plugins:
#@ names.append("test-"+p)
#@ end
#@ return names
#@ end
#@ def sharded_job_names(plugin, shard_count):
#@ names = []
#@ for shard_index in range(0, shard_count):
#@ names.append("test-"+plugin+"-"+str(shard_index))
#@ end
#@ return names
#@ end
---
name: Test
on:
push:
branches:
#! - main
- v4.0.x
- v3.13.x
- v3.12.x
- v3.11.x
- bump-otp-for-oci
- bump-rbe-*
- bump-rules_erlang
paths:
- 'deps/**'
- 'scripts/**'
- Makefile
- plugins.mk
- rabbitmq-components.mk
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- .github/workflows/test.yaml
#! pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-workflow:
runs-on: ubuntu-latest
outputs:
repo_cache_key: ${{ steps.repo-cache-key.outputs.value }}
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: ENSURE WORKFLOWS ARE UP TO DATE
run: |
mkdir local-bin/
curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash
make actions-workflows YTT=$PWD/local-bin/ytt
git diff --exit-code
- name: COMPUTE REPO CACHE KEY
id: repo-cache-key
run: |
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
- name: AUTHENTICATE TO GOOGLE CLOUD
uses: google-github-actions/auth@v2.1.7
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: REPO CACHE
id: cache
uses: actions/cache@v4
with:
key: ${{ steps.repo-cache-key.outputs.value }}
path: /home/runner/repo-cache/
- name: PRIME CACHE
if: steps.cache.outputs.cache-hit != 'true'
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
build --google_default_credentials
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
EOF
bazelisk cquery \
'tests(//...) except attr("tags", "manual|mixed-version-cluster", //deps/...)' \
--output=label
#@ for plugin in data.values.internal_deps:
test-(@= plugin @):
needs: check-workflow
uses: ./.github/workflows/test-plugin.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: #@ plugin
secrets: inherit
#@ end
#@ rabbit_shard_count = 10
#@ for shard_index in range(0, rabbit_shard_count):
test-rabbit-(@= str(shard_index) @):
needs: #@ ["check-workflow"] + job_names(data.values.internal_deps)
uses: ./.github/workflows/test-plugin.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: rabbit
shard_index: #@ shard_index
shard_count: #@ rabbit_shard_count
secrets: inherit
#@ end
test-rabbitmq_cli:
needs: check-workflow
uses: ./.github/workflows/test-plugin.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: rabbitmq_cli
secrets: inherit
#@ for plugin in data.values.tier1_plugins:
test-(@= plugin @):
needs: #@ ["check-workflow"] + sharded_job_names("rabbit", rabbit_shard_count)
uses: ./.github/workflows/test-plugin.yaml
with:
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
plugin: #@ plugin
secrets: inherit
#@ end
summary-test:
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count) + ["test-rabbitmq_cli"]
runs-on: ubuntu-latest
steps:
- name: SUMMARY
run: |
cat << 'EOF' | jq -e 'map(.result == "success") | all(.)'
${{ toJson(needs) }}
EOF

View File

@ -12,11 +12,6 @@ on:
- 'deps/rabbitmq_management/priv/**'
- 'deps/rabbitmq_management/selenium/**'
- 'scripts/**'
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- .github/workflows/test-authnz.yaml
pull_request:
paths:
@ -35,21 +30,21 @@ jobs:
fail-fast: false
matrix:
erlang_version:
- "26.2"
- "27.3"
browser:
- chrome
include:
- erlang_version: "26.2"
- erlang_version: "27.3"
elixir_version: 1.17.3
env:
SELENIUM_DIR: selenium
DOCKER_NETWORK: rabbitmq_net
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Configure OTP & Elixir
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
@ -58,7 +53,7 @@ jobs:
https://cdn.jsdelivr.net/hex
- name: Authenticate To Google Cloud
uses: google-github-actions/auth@v2.1.8
uses: google-github-actions/auth@v3.0.0
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
@ -77,22 +72,24 @@ jobs:
docker build -t mocha-test --target test .
- name: Run Suites
run: |
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
mkdir -p /tmp/full-suite-authnz-messaging
mv /tmp/selenium/* /tmp/full-suite-authnz-messaging
id: tests
run: |
export IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
export CONF_DIR_PREFIX="$(mktemp -d)"
export RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG
echo "Running selenium tests with "
echo " - CONF_DIR_PREFIX: ${CONF_DIR_PREFIX}"
echo " - IMAGE_TAG: ${IMAGE_TAG}"
echo " - RABBITMQ_DOCKER_IMAGE: ${RABBITMQ_DOCKER_IMAGE}"
echo "SELENIUM_ARTIFACTS=${CONF_DIR_PREFIX}" >> $GITHUB_ENV
${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
- name: Upload Test Artifacts
if: always()
if: ${{ failure() && steps.tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4.3.2
with:
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
path: |
logs/*
screens/*
/tmp/selenium/*
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
path: ${{ env.SELENIUM_ARTIFACTS }}/*
summary-selenium:
needs:

View File

@ -15,6 +15,10 @@ on:
required: false
default: false
type: boolean
previous_version:
required: false
default: 'tags/v4.0.9'
type: string
make_target:
required: true
type: string
@ -28,13 +32,18 @@ jobs:
timeout-minutes: 60
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: FETCH TAGS
run: git fetch --tags
- name: EXTRACT ACTIVEMQ VERSION
if: inputs.plugin == 'amqp10_client'
run: |
awk '/^ACTIVEMQ_VERSION/ {print $1 "=" $3}' deps/amqp10_client/Makefile >> $GITHUB_ENV
- name: SETUP OTP & ELIXIR
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1
with:
otp-version: ${{ inputs.erlang_version }}
elixir-version: ${{ inputs.elixir_version }}
@ -57,7 +66,7 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@master
if: inputs.mixed_clusters
with:
version: 'tags/v4.0.5'
version: ${{ inputs.previous_version }}
regex: true
file: "rabbitmq-server-generic-unix-\\d.+\\.tar\\.xz"
target: ./
@ -87,11 +96,39 @@ jobs:
sudo systemctl is-active --quiet apparmor.service && sudo systemctl stop apparmor.service
sudo systemctl disable apparmor.service
- name: RUN LOW VERSION ERLANG NODE IN DOCKER
if: inputs.make_target == 'ct-rabbit_fifo_prop'
run: |
# This version must be at least 1 major version lower than inputs.erlang_version
LOW_ERLANG_VERSION="26.2"
# Create ~/.erlang.cookie by starting a distributed node
erl -sname temp_node -eval 'halt().' -noshell
docker run -d --network host --name erlang_low_version erlang:${LOW_ERLANG_VERSION} \
erl -sname rabbit_fifo_prop@localhost -setcookie $(cat ~/.erlang.cookie) -noinput
- name: RESTORE ACTIVEMQ FROM CACHE
if: inputs.plugin == 'amqp10_client'
uses: actions/cache/restore@v4
id: cache-activemq-restore
with:
path: deps/amqp10_client/test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
key: activemq-${{ env.ACTIVEMQ_VERSION }}
- name: RUN TESTS
if: inputs.plugin != 'rabbitmq_cli'
run: |
sudo netstat -ntp
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
- name: CACHE ACTIVEMQ
uses: actions/cache/save@v4
if: inputs.plugin == 'amqp10_client' && steps.cache-activemq-restore.outputs.cache-hit != 'true'
with:
path: deps/amqp10_client/test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
key: activemq-${{ env.ACTIVEMQ_VERSION }}
# rabbitmq_cli needs a correct broker version for two of its tests.
# But setting PROJECT_VERSION makes other plugins fail.
- name: RUN TESTS (rabbitmq_cli)
@ -106,5 +143,6 @@ jobs:
name: CT logs (${{ inputs.plugin }} ${{ inputs.make_target }} OTP-${{ inputs.erlang_version }} ${{ inputs.metadata_store }}${{ inputs.mixed_clusters && ' mixed' || '' }})
path: |
logs/
deps/rabbitmq_cli/logs/
# !logs/**/log_private
if-no-files-found: ignore

View File

@ -14,6 +14,9 @@ on:
mixed_clusters:
required: true
type: boolean
previous_version:
required: false
type: string
jobs:
test-rabbit:
name: Test rabbit
@ -25,18 +28,23 @@ jobs:
- parallel-ct-set-2
- parallel-ct-set-3
- parallel-ct-set-4
- parallel-ct-set-5
- ct-amqp_client
- ct-clustering_management
- ct-clustering_recovery
- eunit ct-dead_lettering
- ct-feature_flags
- ct-metadata_store_clustering
- ct-quorum_queue
- ct-rabbit_stream_queue
- ct-rabbit_fifo_prop
uses: ./.github/workflows/test-make-target.yaml
with:
erlang_version: ${{ inputs.erlang_version }}
elixir_version: ${{ inputs.elixir_version }}
metadata_store: ${{ inputs.metadata_store }}
mixed_clusters: ${{ inputs.mixed_clusters }}
previous_version: ${{ inputs.previous_version }}
make_target: ${{ matrix.make_target }}
plugin: rabbit
@ -48,6 +56,7 @@ jobs:
elixir_version: ${{ inputs.elixir_version }}
metadata_store: ${{ inputs.metadata_store }}
mixed_clusters: ${{ inputs.mixed_clusters }}
previous_version: ${{ inputs.previous_version }}
make_target: parallel-ct-set-1
plugin: rabbitmq_mqtt
@ -61,6 +70,7 @@ jobs:
elixir_version: ${{ inputs.elixir_version }}
metadata_store: ${{ inputs.metadata_store }}
mixed_clusters: ${{ inputs.mixed_clusters }}
previous_version: ${{ inputs.previous_version }}
make_target: ct-config_schema ct-unit
plugin: rabbitmq_peer_discovery_aws
@ -85,7 +95,8 @@ jobs:
- rabbitmq_cli
- rabbitmq_consistent_hash_exchange
- rabbitmq_event_exchange
- rabbitmq_federation
- rabbitmq_exchange_federation
- rabbitmq_federation_common
- rabbitmq_federation_management
- rabbitmq_federation_prometheus
- rabbitmq_jms_topic_exchange
@ -97,6 +108,7 @@ jobs:
- rabbitmq_peer_discovery_k8s
- rabbitmq_prelaunch
- rabbitmq_prometheus
- rabbitmq_queue_federation
- rabbitmq_recent_history_exchange
- rabbitmq_sharding
- rabbitmq_shovel
@ -117,5 +129,6 @@ jobs:
elixir_version: ${{ inputs.elixir_version }}
metadata_store: ${{ inputs.metadata_store }}
mixed_clusters: ${{ inputs.mixed_clusters }}
previous_version: ${{ inputs.previous_version }}
make_target: tests
plugin: ${{ matrix.plugin }}

View File

@ -17,7 +17,7 @@ jobs:
plugin:
# These are using plugin-specific test jobs.
- rabbit
- rabbitmq_mqtt
# - rabbitmq_mqtt # disabled due to Elixir 1.18 JSON conficts
- rabbitmq_peer_discovery_aws
# These are from the test-plugin test job.
- amqp10_client
@ -34,7 +34,8 @@ jobs:
- rabbitmq_aws
- rabbitmq_consistent_hash_exchange
- rabbitmq_event_exchange
- rabbitmq_federation
- rabbitmq_exchange_federation
- rabbitmq_federation_common
- rabbitmq_federation_management
- rabbitmq_federation_prometheus
- rabbitmq_jms_topic_exchange
@ -50,19 +51,20 @@ jobs:
- rabbitmq_peer_discovery_k8s
- rabbitmq_prelaunch
- rabbitmq_prometheus
- rabbitmq_queue_federation
- rabbitmq_recent_history_exchange
- rabbitmq_sharding
- rabbitmq_shovel
- rabbitmq_shovel_management
- rabbitmq_shovel_prometheus
- rabbitmq_stomp
- rabbitmq_stream
# - rabbitmq_stomp # disabled due to Elixir 1.18 JSON conficts
# - rabbitmq_stream # disabled due to Elixir 1.18 JSON conficts
- rabbitmq_stream_common
- rabbitmq_stream_management
- rabbitmq_tracing
- rabbitmq_trust_store
- rabbitmq_web_dispatch
- rabbitmq_web_mqtt
# - rabbitmq_web_mqtt # disabled due to Elixir 1.18 JSON conficts
- rabbitmq_web_stomp
# This one we do not want to run tests so no corresponding test job.
- rabbitmq_ct_helpers

View File

@ -23,20 +23,21 @@ jobs:
erlang_version:
- '26'
- '27'
- '28'
elixir_version:
- '1.17'
- '1.18'
# @todo Add macOS and Windows.
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: FETCH TAGS
run: git fetch --tags
- name: SETUP OTP & ELIXIR
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1.19
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
@ -62,10 +63,9 @@ jobs:
fail-fast: false
matrix:
erlang_version:
- '26'
## - '27'
- '28'
elixir_version:
- '1.17'
- '1.18'
metadata_store:
- mnesia
- khepri
@ -82,10 +82,9 @@ jobs:
fail-fast: false
matrix:
erlang_version:
- '26'
## - '27'
- '28'
elixir_version:
- '1.17'
- '1.18'
metadata_store:
- mnesia
- khepri
@ -102,9 +101,9 @@ jobs:
fail-fast: false
matrix:
erlang_version: # Latest OTP
- '27'
- '28'
elixir_version: # Latest Elixir
- '1.17'
- '1.18'
uses: ./.github/workflows/test-make-type-check.yaml
with:
erlang_version: ${{ matrix.erlang_version }}

View File

@ -1,10 +1,13 @@
name: Test Management UI with Selenium for PRs
on:
pull_request:
paths:
- 'deps/**'
- 'selenium/**'
- .github/workflows/test-management-ui-for-pr.yaml
pull_request:
paths:
- deps/rabbitmq_management/src/**
- deps/rabbitmq_management/priv/**
- deps/rabbitmq_web_dispatch/src/**
- selenium/**
- scripts/**
- .github/workflows/test-management-ui-for-pr.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@ -15,21 +18,21 @@ jobs:
fail-fast: false
matrix:
erlang_version:
- "26.2"
- "27.3"
browser:
- chrome
include:
- erlang_version: "26.2"
- erlang_version: "27.3"
elixir_version: 1.17
env:
SELENIUM_DIR: selenium
DOCKER_NETWORK: rabbitmq_net
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Configure OTP & Elixir
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
@ -38,7 +41,7 @@ jobs:
https://cdn.jsdelivr.net/hex
- name: Authenticate To Google Cloud
uses: google-github-actions/auth@v2.1.8
uses: google-github-actions/auth@v3.0.0
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
@ -56,27 +59,22 @@ jobs:
cd ${SELENIUM_DIR}
docker build -t mocha-test --target test .
- name: Run short ui suites on a standalone rabbitmq server
- name: Run short UI suites on a standalone rabbitmq server
id: tests
run: |
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
${SELENIUM_DIR}/run-suites.sh short-suite-management-ui
mkdir -p /tmp/short-suite
mv /tmp/selenium/* /tmp/short-suite
export IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
export CONF_DIR_PREFIX="$(mktemp -d)"
export RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG
echo "Running selenium tests with "
echo " - CONF_DIR_PREFIX: ${CONF_DIR_PREFIX}"
echo " - IMAGE_TAG: ${IMAGE_TAG}"
echo " - RABBITMQ_DOCKER_IMAGE: ${RABBITMQ_DOCKER_IMAGE}"
echo "SELENIUM_ARTIFACTS=${CONF_DIR_PREFIX}" >> $GITHUB_ENV
${SELENIUM_DIR}/run-suites.sh short-suite-management-ui
- name: Upload Test Artifacts
if: always()
uses: actions/upload-artifact@v4.3.2
if: ${{ failure() && steps.tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
path: |
/tmp/short-suite
summary-selenium:
needs:
- selenium
runs-on: ubuntu-latest
steps:
- name: SUMMARY
run: |
echo "SUCCESS"
path: ${{ env.SELENIUM_ARTIFACTS }}/*

View File

@ -3,20 +3,12 @@ on:
push:
branches:
- main
- v4.0.x
- bump-otp-for-oci
- bump-rbe-*
- bump-rules_erlang
- 'v4.*.x'
paths:
- 'deps/rabbitmq_management/src/**'
- 'deps/rabbitmq_management/priv/**'
- 'deps/rabbitmq_web_dispatch/src/**'
- 'scripts/**'
- .bazelrc
- .bazelversion
- BUILD.*
- '*.bzl'
- '*.bazel'
- 'selenium/**'
- .github/workflows/test-management-ui.yaml
@ -30,21 +22,21 @@ jobs:
fail-fast: false
matrix:
erlang_version:
- "26.2"
- "27.3"
browser:
- chrome
include:
- erlang_version: "26.2"
- erlang_version: "27.3"
elixir_version: 1.17.3
env:
SELENIUM_DIR: selenium
DOCKER_NETWORK: rabbitmq_net
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Configure OTP & Elixir
uses: erlef/setup-beam@v1.17
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
@ -53,7 +45,7 @@ jobs:
https://cdn.jsdelivr.net/hex
- name: Authenticate To Google Cloud
uses: google-github-actions/auth@v2.1.8
uses: google-github-actions/auth@v3.0.0
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
@ -71,28 +63,22 @@ jobs:
cd ${SELENIUM_DIR}
docker build -t mocha-test --target test .
- name: Run short ui suite on a 3-node rabbitmq cluster
- name: Run full UI suite on a 3-node rabbitmq cluster
id: tests
run: |
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
${SELENIUM_DIR}/run-suites.sh short-suite-management-ui
mkdir -p /tmp/short-suite
mv /tmp/selenium/* /tmp/short-suite
export IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
export CONF_DIR_PREFIX="$(mktemp -d)"
export RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG
echo "Running selenium tests with "
echo " - CONF_DIR_PREFIX: ${CONF_DIR_PREFIX}"
echo " - IMAGE_TAG: ${IMAGE_TAG}"
echo " - RABBITMQ_DOCKER_IMAGE: ${RABBITMQ_DOCKER_IMAGE}"
echo "SELENIUM_ARTIFACTS=${CONF_DIR_PREFIX}" >> $GITHUB_ENV
${SELENIUM_DIR}/run-suites.sh full-suite-management-ui
- name: Upload Test Artifacts
if: always()
if: ${{ failure() && steps.tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4.3.2
with:
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
path: |
/tmp/full-suite
/tmp/short-suite
summary-selenium:
needs:
- selenium
runs-on: ubuntu-latest
steps:
- name: SUMMARY
run: |
echo "SUCCESS"
path: ${{ env.SELENIUM_ARTIFACTS }}/*

File diff suppressed because it is too large Load Diff

30
.github/workflows/test-mixed.yaml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Test Mixed with 3.13
on:
schedule:
# at 2:20am on Sundays
- cron: 20 2 * * 0
workflow_dispatch:
inputs:
previous_version:
description: 'Previous version to test against'
required: true
default: 'tags/v3.13.7'
jobs:
test-mixed-clusters:
name: Test mixed clusters
strategy:
fail-fast: false
matrix:
erlang_version:
- '26'
elixir_version:
- '1.18'
metadata_store:
- mnesia
uses: ./.github/workflows/test-make-tests.yaml
with:
erlang_version: ${{ matrix.erlang_version }}
elixir_version: ${{ matrix.elixir_version }}
previous_version: 'tags/v3.13.7'
metadata_store: ${{ matrix.metadata_store }}
mixed_clusters: true

View File

@ -1,171 +0,0 @@
name: Test Plugin Mixed Version Clusters
on:
workflow_call:
inputs:
repo_cache_key:
required: true
type: string
plugin:
required: true
type: string
shard_index:
default: 0
type: number
shard_count:
default: 1
type: number
secrets:
REMOTE_CACHE_BUCKET_NAME_MIXED:
required: true
REMOTE_CACHE_CREDENTIALS_JSON:
required: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
erlang_version:
- 26
metadata_store:
- mnesia
- khepri
include:
- erlang_version: 26
elixir_version: 1.17
timeout-minutes: 120
steps:
- name: LOAD REPO CACHE
uses: actions/cache/restore@v4
with:
key: ${{ inputs.repo_cache_key }}
path: /home/runner/repo-cache/
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: CONFIGURE OTP & ELIXIR
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: AUTHENTICATE TO GOOGLE CLOUD
uses: google-github-actions/auth@v2.1.8
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: CONFIGURE BAZEL
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}
build --google_default_credentials
build --experimental_guard_against_concurrent_changes
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
EOF
bazelisk info release
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: deps/amqp10_client SETUP
if: inputs.plugin == 'amqp10_client'
run: |
# reduce sandboxing so that activemq works
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbit SETUP
if: inputs.plugin == 'rabbit'
run: |
# reduce sandboxing so that maven works
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_auth_backend_ldap SETUP
if: inputs.plugin == 'rabbitmq_auth_backend_ldap'
run: |
sudo apt-get update && \
sudo apt-get install -y \
ldap-utils \
slapd
sudo systemctl is-active --quiet apparmor.service && sudo systemctl stop apparmor.service
sudo systemctl disable apparmor.service
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_mqtt SETUP
if: inputs.plugin == 'rabbitmq_mqtt'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_peer_discovery_consul SETUP
if: inputs.plugin == 'rabbitmq_peer_discovery_consul'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_stream SETUP
if: inputs.plugin == 'rabbitmq_stream'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_stream_management SETUP
if: inputs.plugin == 'rabbitmq_stream_management'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_tracing SETUP
if: inputs.plugin == 'rabbitmq_tracing'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: COMPUTE TESTS IN SHARD
id: shard
run: |
bazelisk cquery \
'attr("tags", "mixed-version-cluster", tests(//deps/${{ inputs.plugin }}/...)) except attr("tags", "manual", //deps/${{ inputs.plugin }}/...)' \
--output=label \
| awk '{print $1;}' > tests.log
if [[ $(wc -l < tests.log) != "0" ]]; then
split -da 3 -l $((`wc -l < tests.log`/${{ inputs.shard_count }})) tests.log shard
printf -v padded_index "%03d" ${{ inputs.shard_index }}
echo "file=shard$padded_index" | tee -a $GITHUB_OUTPUT
else
echo "No tests in this shard"
echo "file=" | tee -a $GITHUB_OUTPUT
fi
- name: RUN TESTS
if: steps.shard.outputs.file != '' && inputs.plugin != 'rabbitmq_peer_discovery_aws'
run: |
echo "Tests in shard:"
cat ${{ steps.shard.outputs.file }}
echo ""
## WARNING:
## secrets must not be set in --test_env or --action_env,
## or otherwise logs must not be saved as artifacts.
## rabbit_ct_helpers or other code may log portions of the
## env vars and leak them
bazelisk test $(< ${{ steps.shard.outputs.file }}) \
--test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \
--build_tests_only \
--verbose_failures
- name: UPLOAD TEST LOGS
if: always()
uses: actions/upload-artifact@v4
with:
name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }}-mixed
path: |
bazel-testlogs/deps/${{ inputs.plugin }}/*

View File

@ -1,172 +0,0 @@
name: Test Plugin
on:
workflow_call:
inputs:
repo_cache_key:
required: true
type: string
plugin:
required: true
type: string
shard_index:
default: 0
type: number
shard_count:
default: 1
type: number
secrets:
REMOTE_CACHE_BUCKET_NAME:
required: true
REMOTE_CACHE_CREDENTIALS_JSON:
required: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
erlang_version:
- 26
metadata_store:
- mnesia
- khepri
include:
- erlang_version: 26
elixir_version: 1.17
timeout-minutes: 120
steps:
- name: LOAD REPO CACHE
uses: actions/cache/restore@v4
with:
key: ${{ inputs.repo_cache_key }}
path: /home/runner/repo-cache/
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: CONFIGURE OTP & ELIXIR
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: AUTHENTICATE TO GOOGLE CLOUD
uses: google-github-actions/auth@v2.1.8
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: CONFIGURE BAZEL
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
build --google_default_credentials
build --experimental_guard_against_concurrent_changes
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
EOF
bazelisk info release
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: deps/amqp10_client SETUP
if: inputs.plugin == 'amqp10_client'
run: |
# reduce sandboxing so that activemq works
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbit SETUP
if: inputs.plugin == 'rabbit'
run: |
# reduce sandboxing so that maven works
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_auth_backend_ldap SETUP
if: inputs.plugin == 'rabbitmq_auth_backend_ldap'
run: |
sudo apt-get update && \
sudo apt-get install -y \
ldap-utils \
slapd
sudo systemctl is-active --quiet apparmor.service && sudo systemctl stop apparmor.service
sudo systemctl disable apparmor.service
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_mqtt SETUP
if: inputs.plugin == 'rabbitmq_mqtt'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_peer_discovery_consul SETUP
if: inputs.plugin == 'rabbitmq_peer_discovery_consul'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_stream SETUP
if: inputs.plugin == 'rabbitmq_stream'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_stream_management SETUP
if: inputs.plugin == 'rabbitmq_stream_management'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: deps/rabbitmq_tracing SETUP
if: inputs.plugin == 'rabbitmq_tracing'
run: |
cat << EOF >> user.bazelrc
build --strategy=TestRunner=local
EOF
- name: CLI COMPILE WARNINGS AS ERRORS
if: inputs.plugin == 'rabbitmq_cli'
run: |
bazel build //deps/rabbitmq_cli:compile_warnings_as_errors \
--verbose_failures
- name: COMPUTE TESTS IN SHARD
id: shard
run: |
bazelisk cquery \
'tests(//deps/${{ inputs.plugin }}/...) except attr("tags", "manual|mixed-version-cluster", //deps/...)' \
--output=label \
| awk '{print $1;}' > tests.log
split -da 3 -l $((`wc -l < tests.log`/${{ inputs.shard_count }})) tests.log shard
printf -v padded_index "%03d" ${{ inputs.shard_index }}
echo "file=shard$padded_index" | tee -a $GITHUB_OUTPUT
- name: RUN TESTS
if: inputs.plugin != 'rabbitmq_peer_discovery_aws'
run: |
echo "Tests in shard:"
cat ${{ steps.shard.outputs.file }}
echo ""
## WARNING:
## secrets must not be set in --test_env or --action_env,
## or otherwise logs must not be saved as artifacts.
## rabbit_ct_helpers or other code may log portions of the
## env vars and leak them
bazelisk test $(< ${{ steps.shard.outputs.file }}) \
--test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \
--build_tests_only \
--verbose_failures
- name: UPLOAD TEST LOGS
if: always()
uses: actions/upload-artifact@v4
with:
name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }}
path: |
bazel-testlogs/deps/${{ inputs.plugin }}/*

View File

@ -1,67 +0,0 @@
name: Test Windows
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
test:
name: Test Windows OTP26
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- erlang_version: "26.1"
elixir_version: "1.15.2"
metadata_store:
- mnesia
- khepri
timeout-minutes: 120
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: CONFIGURE ERLANG
uses: erlef/setup-beam@v1.17
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
#! - name: MOUNT BAZEL CACHE
#! uses: actions/cache@v1
#! with:
#! path: "/home/runner/repo-cache/"
#! key: repo-cache
- name: CONFIGURE BAZEL
id: configure
shell: bash
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
build --google_default_credentials
EOF
fi
cat << EOF >> user.bazelrc
startup --output_user_root=C:/tmp
startup --windows_enable_symlinks
build --enable_runfiles
build --color=yes
EOF
bazelisk info release
- name: RUN TESTS
shell: cmd
run: |
bazelisk test //... ^
--config=buildbuddy ^
--test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} ^
--test_tag_filters=-aws,-docker,-bats,-starts-background-broker,-dialyze ^
--build_tests_only ^
--verbose_failures
summary-windows:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: SUMMARY
run: |
echo "SUCCESS"

File diff suppressed because it is too large Load Diff

10
.gitignore vendored
View File

@ -37,6 +37,7 @@ elvis
!/deps/rabbitmq_amqp_client/
!/deps/rabbitmq_auth_backend_cache/
!/deps/rabbitmq_auth_backend_http/
!/deps/rabbitmq_auth_backend_internal_loopback/
!/deps/rabbitmq_auth_backend_ldap/
!/deps/rabbitmq_auth_backend_oauth2/
!/deps/rabbitmq_auth_mechanism_ssl/
@ -47,7 +48,9 @@ elvis
!/deps/rabbitmq_ct_helpers/
!/deps/rabbitmq_ct_client_helpers/
!/deps/rabbitmq_event_exchange/
!/deps/rabbitmq_exchange_federation/
!/deps/rabbitmq_federation/
!/deps/rabbitmq_federation_common/
!/deps/rabbitmq_federation_management/
!/deps/rabbitmq_federation_prometheus/
!/deps/rabbitmq_jms_topic_exchange/
@ -61,6 +64,7 @@ elvis
!/deps/rabbitmq_peer_discovery_k8s/
!/deps/rabbitmq_prelaunch/
!/deps/rabbitmq_prometheus/
!/deps/rabbitmq_queue_federation/
!/deps/rabbitmq_random_exchange/
!/deps/rabbitmq_recent_history_exchange/
!/deps/rabbitmq_sharding/
@ -93,12 +97,6 @@ rebar.config
!/deps/amqp10_common/rebar.config
!/rebar.config
# Bazel.
.bazelrc
user.bazelrc
bazel-*
extra_deps/
# Erlang/OTP unwanted files.
.erlang.cookie
erl_crash.dump

102
BAZEL.md
View File

@ -1,102 +0,0 @@
# [Bazel](https://www.bazel.build/) build
From https://docs.bazel.build/versions/master/bazel-overview.html
> Bazel is an open-source build and test tool similar to Make, Maven, and Gradle. It uses a human-readable, high-level build language. Bazel supports projects in multiple languages and builds outputs for multiple platforms. Bazel supports large codebases across multiple repositories, and large numbers of users.
## Why RabbitMQ + Bazel?
RabbitMQ, Tier1 plugins included, is a large codebase. The developer experience benefits from fast incremental compilation.
More importantly, RabbitMQ's test suite is large and takes hours if run on a single machine. Bazel allows tests to be run in parallel on a large number of remote workers if needed, and furthermore uses cached test results when branches of the codebase remain unchanged.
Bazel does not provide built in Erlang or Elixir support, nor is there an available library of bazel rules. Therefore, we have defined our own rules in https://github.com/rabbitmq/bazel-erlang. Elixir compilation is handled as a special case within this repository. To use these rules, the location of your Erlang and Elixir installations must be indicated to the build (see below).
While most of work for running tests happens in Bazel, the suite still makes use of some external tools for commands, notably gnu `make` and `openssl`. Ideally we could bring all of these tools under bazel, so that the only tool needed would be `bazel` or `bazelisk`, but that will take some time.
## Running Tests
### Install Bazelisk
On **macOS**:
`brew install bazelisk`
Otherwise:
https://docs.bazel.build/versions/master/install-bazelisk.html
### Create `user.bazelrc`
Create a `user.bazelrc` by making a copy of `user-template.bazelrc` and updating the paths in the first few lines.
### Run the broker
`bazel run broker`
You can set different environment variables to control some configuration aspects, like this:
```
RABBITMQ_CONFIG_FILES=/path/to/conf.d \
RABBITMQ_NODENAME=<node>@localhost \
RABBITMQ_NODE_PORT=7000 \
bazel run broker
```
This will start RabbitMQ with configs being read from the provided directory. It also will start a node with a given node name, and with all listening ports calculated from the given one - this way you can start non-conflicting rabbits even from different checkouts on a single machine.
### Running tests
Many rabbit tests spawn single or clustered rabbit nodes, and therefore it's best to run test suites sequentially on a single machine. Hence the `build --local_test_jobs=1` flag used in `.bazelrc`. Additionally, it may be reasonable to disable test sharding and stream test output when running tests locally with `--test_output=streamed` as an additional argument (to just disable sharding, but not stream output, use `--test_sharding_strategy=disabled`). Naturally that restriction does not hold if utilizing remote execution (as is the case for RabbitMQ's CI pipelines).
Erlang Common Test logs will not be placed in the logs directory when run with bazel. They can be found under `bazel-testlogs`. For instance, those of the rabbit application's backing_queue suite will be under `bazel-testlogs/deps/rabbit/backing_queue_SUITE/test.outputs/`.
### Run all tests
Note: This takes quite some time on a single machine.
`bazel test //...`
### Run tests in a 'package' and its 'subpackages'
**rabbit** is an appropriate example because it encloses the **rabbitmq_prelaunch** application.
`bazel test deps/rabbit/...`
### Run tests for a specific 'package'
`bazel test deps/rabbit_common:all`
### Run an individual common test suite
`bazel test //deps/rabbit:lazy_queue_SUITE`
## Add/update an external dependency
### from hex.pm
1. `bazel run gazelle-update-repos -- hex.pm/accept@0.3.5` to generate/update `bazel/BUILD.accept`
1. Add/update the entry in MODULE.bazel
### from github
1. `bazel run gazelle-update-repos -- --testonly github.com/extend/ct_helper@master`
1. Add/update the entry in MODULE.bazel
## Update BUILD files
`bazel run gazelle`
## Regenerate moduleindex.yaml
`bazel run :moduleindex > moduleindex.yaml`
## Additional Useful Commands
- Format all bazel files consistently (requires [buildifier](https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md)):
`buildifier -r .`
- Remove unused load statements from BUILD.bazel files (requires [buildozer](https://github.com/bazelbuild/buildtools/blob/master/buildozer/README.md)):
`buildozer 'fix unusedLoads' //...:__pkg__`

View File

@ -1,8 +0,0 @@
filegroup(
name = "bin_dir",
srcs = glob([
"bin/**/*",
"libexec/**/*",
]),
visibility = ["//visibility:public"],
)

View File

@ -1,337 +0,0 @@
load(
"@bazel_skylib//rules:common_settings.bzl",
"bool_flag",
)
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@rules_erlang//gazelle:def.bzl", "GAZELLE_ERLANG_RUNTIME_DEPS")
load("@rules_erlang//:erlang_bytecode2.bzl", "erlc_opts")
load("@rules_erlang//:dialyze.bzl", "DEFAULT_PLT_APPS", "plt")
load("@rules_erlang//:shell.bzl", "shell")
load("@rules_erlang//:erl_eval.bzl", "erl_eval")
load("@rules_erlang//gazelle:moduleindex.bzl", "moduleindex")
load("@rules_elixir//:iex_eval.bzl", "iex_eval")
load(":rabbitmq_home.bzl", "rabbitmq_home")
load(":rabbitmq_run.bzl", "rabbitmq_run", "rabbitmq_run_command")
load(":rabbitmqctl.bzl", "rabbitmqctl")
load(":dist.bzl", "package_generic_unix", "source_archive")
load(
":rabbitmq.bzl",
"RABBITMQ_ERLC_OPTS",
"RABBITMQ_TEST_ERLC_OPTS",
"all_plugins",
"without",
)
exports_files([
"scripts/bazel/rabbitmq-run.sh",
"scripts/bazel/rabbitmq-run.bat",
"release-notes",
])
# gazelle:exclude .github
# gazelle:exclude .elixir_ls
# gazelle:exclude .erlang.mk
# gazelle:exclude bazel
# gazelle:exclude bazel-out
# gazelle:exclude deps/*/priv
# gazelle:exclude deps/accept
# gazelle:exclude deps/aten
# gazelle:exclude deps/base64url
# gazelle:exclude deps/cowboy
# gazelle:exclude deps/cowlib
# gazelle:exclude deps/credentials_obfuscation
# gazelle:exclude deps/csv
# gazelle:exclude deps/cth_styledout
# gazelle:exclude deps/cuttlefish
# gazelle:exclude deps/eetcd
# gazelle:exclude deps/elvis_mk
# gazelle:exclude deps/enough
# gazelle:exclude deps/gen_batch_server
# gazelle:exclude deps/getopt
# gazelle:exclude deps/gun
# gazelle:exclude deps/inet_tcp_proxy
# gazelle:exclude deps/jose
# gazelle:exclude deps/json
# gazelle:exclude deps/meck
# gazelle:exclude deps/observer_cli
# gazelle:exclude deps/osiris
# gazelle:exclude deps/prometheus
# gazelle:exclude deps/proper
# gazelle:exclude deps/quantile_estimator
# gazelle:exclude deps/ra
# gazelle:exclude deps/ranch
# gazelle:exclude deps/recon
# gazelle:exclude deps/redbug
# gazelle:exclude deps/seshat
# gazelle:exclude deps/stdout_formatter
# gazelle:exclude deps/syslog
# gazelle:exclude deps/sysmon_handler
# gazelle:exclude deps/systemd
# gazelle:exclude deps/thoas
# gazelle:exclude deps/*/deps
# gazelle:exclude deps/*/.erlang.mk
# gazelle:exclude deps/rabbitmq_cli/_build
# gazelle:exclude extra_deps
# gazelle:exclude packaging
# gazelle:exclude PACKAGES
# gazelle:exclude plugins
# gazelle:exclude release-notes
# gazelle:exclude logs
# gazelle:erlang_apps_dirs deps
# gazelle:erlang_skip_rules test_erlang_app
# gazelle:erlang_skip_rules ct_test
# gazelle:erlang_generate_beam_files_macro
# gazelle:erlang_generate_fewer_bytecode_rules
# gazelle:erlang_app_dep_exclude rabbitmq_cli
# gazelle:map_kind erlang_app rabbitmq_app //:rabbitmq.bzl
# gazelle:map_kind assert_suites2 assert_suites //:rabbitmq.bzl
# gazelle:erlang_module_source_lib Elixir.RabbitMQ.CLI.CommandBehaviour:rabbitmq_cli
gazelle(
name = "gazelle",
data = GAZELLE_ERLANG_RUNTIME_DEPS,
extra_args = [
"--verbose",
],
gazelle = "@rules_erlang//gazelle:gazelle_erlang_binary",
)
gazelle(
name = "gazelle-update-repos",
command = "update-repos",
data = GAZELLE_ERLANG_RUNTIME_DEPS,
extra_args = [
"--verbose",
"--build_files_dir=bazel",
"--recurse_with=gazelle-update-repos",
],
gazelle = "@rules_erlang//gazelle:gazelle_erlang_binary",
)
bool_flag(
name = "enable_test_build",
build_setting_default = False,
visibility = ["//visibility:public"],
)
config_setting(
name = "test_build",
flag_values = {
"//:enable_test_build": "true",
},
)
plt(
name = "base_plt",
apps = DEFAULT_PLT_APPS + [
"compiler",
"crypto",
], # keep
visibility = ["//visibility:public"],
)
PLUGINS = all_plugins(
rabbitmq_workspace = "",
)
rabbitmq_home(
name = "broker-home",
plugins = PLUGINS,
)
rabbitmq_run(
name = "rabbitmq-run",
home = ":broker-home",
visibility = ["//visibility:public"],
)
# Allows us to `bazel run broker`
# for the equivalent of `make run-broker`
rabbitmq_run_command(
name = "broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "run-broker",
)
# Allows us to `bazel run background-broker`
# to start a broker in the background
rabbitmq_run_command(
name = "background-broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "start-background-broker",
)
# Allows us to `bazel run stop-broker`
# Useful is broker started in the background
rabbitmq_run_command(
name = "stop-broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "stop-node",
)
# Allows us to `bazel run start-cluster`
# for the equivalent of `make start-cluster`
rabbitmq_run_command(
name = "start-cluster",
rabbitmq_run = ":rabbitmq-run",
subcommand = "start-cluster",
)
# Allows us to `bazel run stop-cluster`
# for the equivalent of `make stop-cluster`
rabbitmq_run_command(
name = "stop-cluster",
rabbitmq_run = ":rabbitmq-run",
subcommand = "stop-cluster",
)
# `bazel run rabbitmqctl`
rabbitmqctl(
name = "rabbitmqctl",
home = ":broker-home",
visibility = ["//visibility:public"],
)
rabbitmqctl(
name = "rabbitmq-diagnostics",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-plugins",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-streams",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-queues",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-upgrade",
home = ":broker-home",
)
shell(
name = "repl",
deps = PLUGINS,
)
erl_eval(
name = "otp_version",
outs = ["otp_version.txt"],
expression = """{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), file:write_file(os:getenv("OUTS"), Version), halt().""",
visibility = ["//visibility:public"],
)
iex_eval(
name = "elixir_version",
outs = ["elixir_version.txt"],
expression = """File.write!(System.get_env("OUTS"), System.version()); System.halt()""",
visibility = ["//visibility:public"],
)
filegroup(
name = "root-licenses",
srcs = glob(["LICENSE*"]),
visibility = ["//visibility:public"],
)
pkg_files(
name = "scripts-files",
srcs = [
"scripts/bash_autocomplete.sh",
"scripts/rabbitmq-script-wrapper",
"scripts/rabbitmqctl-autocomplete.sh",
"scripts/zsh_autocomplete.sh",
],
prefix = "scripts",
visibility = ["//visibility:public"],
)
pkg_files(
name = "release-notes-files",
srcs = glob([
"release-notes/*.md",
"release-notes/*.txt",
]),
prefix = "release-notes",
visibility = ["//visibility:public"],
)
package_generic_unix(
name = "package-generic-unix",
plugins = PLUGINS,
)
source_archive(
name = "source_archive",
plugins = PLUGINS,
)
moduleindex(
name = "moduleindex",
testonly = True,
apps = PLUGINS + [
"@ct_helper//:erlang_app",
"@emqtt//:erlang_app",
"@inet_tcp_proxy_dist//:erlang_app",
"@meck//:erlang_app",
"@proper//:erlang_app",
"//deps/rabbitmq_ct_client_helpers:erlang_app",
"//deps/rabbitmq_ct_helpers:erlang_app",
"//deps/trust_store_http:erlang_app",
],
tags = ["manual"],
)
alias(
name = "test-logs",
actual = "//bazel/util:test-logs",
)
alias(
name = "remote-test-logs",
actual = "//bazel/util:remote-test-logs",
)
alias(
name = "test-node-data",
actual = "//bazel/util:test-node-data",
)
alias(
name = "remote-test-node-data",
actual = "//bazel/util:remote-test-node-data",
)
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": without("+deterministic", RABBITMQ_ERLC_OPTS),
"//conditions:default": RABBITMQ_ERLC_OPTS,
}) + select({
":test_build": [
"-DTEST=1",
"+nowarn_export_all",
],
"//conditions:default": [],
}), # keep
visibility = [":__subpackages__"],
)
erlc_opts(
name = "test_erlc_opts",
values = select({
"@rules_erlang//:debug_build": without("+deterministic", RABBITMQ_TEST_ERLC_OPTS),
"//conditions:default": RABBITMQ_TEST_ERLC_OPTS,
}), # keep
visibility = [":__subpackages__"],
)

View File

@ -1,46 +0,0 @@
load("@//:rabbitmq_package_generic_unix.bzl", "rabbitmq_package_generic_unix")
load("@//:rabbitmq_run.bzl", "rabbitmq_run", "rabbitmq_run_command")
load("@//:rabbitmqctl.bzl", "rabbitmqctl")
rabbitmq_package_generic_unix(
name = "broker-home",
additional_files =
glob(
[
"sbin/*",
"escript/*",
],
exclude = ["sbin/rabbitmqctl"],
) + [
"//plugins:standard_plugins",
"//plugins:inet_tcp_proxy_ez",
],
rabbitmqctl = "sbin/rabbitmqctl",
)
rabbitmq_run(
name = "rabbitmq-run",
home = ":broker-home",
visibility = ["//visibility:public"],
)
rabbitmq_run_command(
name = "broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "run-broker",
)
rabbitmqctl(
name = "rabbitmqctl",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-diagnostics",
home = ":broker-home",
)
rabbitmqctl(
name = "rabbitmq-plugins",
home = ":broker-home",
)

View File

@ -7,13 +7,13 @@ Pull requests is the primary place of discussing code changes.
The process is fairly standard:
* Make sure you (or your employer/client) [signs the Contributor License Agreement](https://github.com/rabbitmq/cla) if needed (see below)
* Present your idea to the RabbitMQ core team using [GitHub Discussions](https://github.com/rabbitmq/rabbitmq-server/discussions) or [RabbitMQ community Discord server](https://rabbitmq.com/discord)
* Fork the repository or repositories you plan on contributing to
* Run `git clean -xfffd && gmake clean && gmake distclean && gmake` to build all subprojects from scratch
* Create a branch with a descriptive name
* Make your changes, run tests, ensure correct code formatting, commit with a [descriptive message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), push to your fork
* Submit pull requests with an explanation what has been changed and **why**
* Submit a filled out and signed [Contributor Agreement](https://cla.pivotal.io/) if needed (see below)
* Be patient. We will get to your pull request eventually
@ -35,8 +35,8 @@ killall -9 beam.smp; killall -9 erl; killall -9 make; killall -9 epmd; killall -
cd deps/rabbit
# cleans build artifacts
git clean -xfffd
gmake clean; gmake distclean
git clean -xfffd
# builds the broker and all of its dependencies
gmake
@ -79,6 +79,27 @@ Or, with Nu shell:
with-env {'RABBITMQ_METADATA_STORE': 'khepri'} { gmake ct-quorum_queue }
```
### Running Mixed Version Tests
For some components, it's important to run tests in a mixed-version cluster, to make sure the upgrades
are handled correctly. For example, you may want to make sure that the quorum_queue suite passes, when
there's a mix of RabbitMQ 4.1 and 4.2 nodes in the cluster.
Here's how you can do that:
```shell
# download the older version, eg:
https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.1.1/rabbitmq-server-generic-unix-4.1.1.tar.xz
# unpack it
tar xf rabbitmq-server-generic-unix-4.1.1.tar.xz
# run the test with SECONDARY_DIST pointing at the extracted folder
SECONDARY_DIST=rabbitmq_server-4.1.1 make -C deps/rabbit ct-quorum_queue
```
Odd-numbered nodes (eg. 1 and 3) will be started using the main repository, while even-numbered nodes (eg. node 2)
will run the older version.
## Running Single Nodes from Source
@ -192,10 +213,11 @@ See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
## Contributor Agreement
If you want to contribute a non-trivial change, please submit a signed copy of our
[Contributor Agreement](https://cla.pivotal.io/) around the time
you submit your pull request. This will make it much easier (in some cases, possible)
for the RabbitMQ team at Pivotal to merge your contribution.
Before submitting your first pull request, please submit a signed copy of our
[Contributor Agreement](https://github.com/rabbitmq/cla) over email to `teamrabbitmq </> gmail dot c0m` with the subject of "RabbitMQ CLA".
Team RabbitMQ will not be able to accept contributions from individuals and legal entities (companies, non-profits)
that haven't signed the CLA.
## Where to Ask Questions

View File

@ -1,442 +0,0 @@
module(
name = "rabbitmq-server",
version = "4.0.0",
)
bazel_dep(
name = "rules_pkg",
version = "0.10.1",
)
bazel_dep(
name = "bazel_skylib",
version = "1.7.1",
)
bazel_dep(
name = "aspect_bazel_lib",
version = "2.5.3",
)
bazel_dep(
name = "platforms",
version = "0.0.8",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_oci",
version = "1.7.4",
)
bazel_dep(
name = "container_structure_test",
version = "1.16.0",
)
bazel_dep(
name = "gazelle",
version = "0.33.0",
repo_name = "bazel_gazelle",
)
bazel_dep(
name = "rules_erlang",
version = "3.16.0",
)
bazel_dep(
name = "rules_elixir",
version = "1.1.0",
)
bazel_dep(
name = "rabbitmq_osiris",
version = "1.8.5",
repo_name = "osiris",
)
erlang_config = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_config",
)
use_repo(
erlang_config,
"erlang_config",
)
elixir_config = use_extension(
"@rules_elixir//bzlmod:extensions.bzl",
"elixir_config",
)
use_repo(
elixir_config,
"elixir_config",
)
register_toolchains(
"@elixir_config//external:toolchain",
)
erlang_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
)
erlang_package.hex_package(
name = "accept",
build_file = "@rabbitmq-server//bazel:BUILD.accept",
sha256 = "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8",
version = "0.3.5",
)
erlang_package.hex_package(
name = "aten",
build_file = "@rabbitmq-server//bazel:BUILD.aten",
sha256 = "5f39a164206ae3f211ef5880b1f7819415686436e3229d30b6a058564fbaa168",
version = "0.6.0",
)
erlang_package.hex_package(
name = "base64url",
build_file = "@rabbitmq-server//bazel:BUILD.base64url",
sha256 = "f9b3add4731a02a9b0410398b475b33e7566a695365237a6bdee1bb447719f5c",
version = "1.0.1",
)
erlang_package.hex_package(
name = "cowboy",
build_file = "@rabbitmq-server//bazel:BUILD.cowboy",
patch_cmds = [
"rm ebin/cowboy.app",
],
sha256 = "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e",
version = "2.12.0",
)
erlang_package.hex_package(
name = "cowlib",
build_file = "@rabbitmq-server//bazel:BUILD.cowlib",
patch_cmds = [
"rm ebin/cowlib.app",
],
sha256 = "e1e1284dc3fc030a64b1ad0d8382ae7e99da46c3246b815318a4b848873800a4",
version = "2.13.0",
)
erlang_package.hex_package(
name = "credentials_obfuscation",
build_file = "@rabbitmq-server//bazel:BUILD.credentials_obfuscation",
sha256 = "738ace0ed5545d2710d3f7383906fc6f6b582d019036e5269c4dbd85dbced566",
version = "3.4.0",
)
erlang_package.hex_package(
name = "csv",
build_file = "@rabbitmq-server//bazel:BUILD.csv",
sha256 = "8f55a0524923ae49e97ff2642122a2ce7c61e159e7fe1184670b2ce847aee6c8",
version = "3.2.1",
)
erlang_package.hex_package(
name = "cuttlefish",
build_file = "@rabbitmq-server//bazel:BUILD.cuttlefish",
sha256 = "43cadd7f34b3dbbab52a7f4110d1df276a13cff5e11afe0f5a774f69f012b76b",
version = "3.4.0",
)
erlang_package.hex_package(
name = "eetcd",
build_file = "@rabbitmq-server//bazel:BUILD.eetcd",
sha256 = "66493bfd6698c1b6baa49679034c3def071ff329961ca1aa7b1dee061c2809af",
version = "0.3.6",
)
erlang_package.hex_package(
name = "enough",
build_file = "@rabbitmq-server//bazel:BUILD.enough",
sha256 = "0460c7abda5f5e0ea592b12bc6976b8a5c4b96e42f332059cd396525374bf9a1",
version = "0.1.0",
)
erlang_package.hex_package(
name = "gen_batch_server",
build_file = "@rabbitmq-server//bazel:BUILD.gen_batch_server",
sha256 = "c3e6a1a2a0fb62aee631a98cfa0fd8903e9562422cbf72043953e2fb1d203017",
version = "0.8.8",
)
erlang_package.hex_package(
name = "getopt",
build_file = "@rabbitmq-server//bazel:BUILD.getopt",
sha256 = "a0029aea4322fb82a61f6876a6d9c66dc9878b6cb61faa13df3187384fd4ea26",
version = "1.0.2",
)
erlang_package.hex_package(
name = "gun",
build_file = "@rabbitmq-server//bazel:BUILD.gun",
sha256 = "3106ce167f9c9723f849e4fb54ea4a4d814e3996ae243a1c828b256e749041e0",
version = "1.3.3",
)
erlang_package.hex_package(
name = "horus",
build_file = "@rabbitmq-server//bazel:BUILD.horus",
sha256 = "d564d30ebc274f0d92c3d44a336d0b892f000be159912ae4e6838701e85495ec",
version = "0.3.1",
)
erlang_package.hex_package(
name = "jose",
build_file = "@rabbitmq-server//bazel:BUILD.jose",
sha256 = "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614",
version = "1.11.10",
)
erlang_package.hex_package(
name = "json",
build_file = "@rabbitmq-server//bazel:BUILD.json",
sha256 = "9abf218dbe4ea4fcb875e087d5f904ef263d012ee5ed21d46e9dbca63f053d16",
version = "1.4.1",
)
erlang_package.hex_package(
name = "khepri",
build_file = "@rabbitmq-server//bazel:BUILD.khepri",
sha256 = "feee8a0a1f3f78dd9f8860feacba63cc165c81af1b351600903e34a20676d5f6",
version = "0.16.0",
)
erlang_package.hex_package(
name = "khepri_mnesia_migration",
build_file = "@rabbitmq-server//bazel:BUILD.khepri_mnesia_migration",
sha256 = "24b87e51b9e46eaeeadb898720e12a58d501cbb05c16e28ca27063e66d60e85c",
version = "0.7.1",
)
erlang_package.hex_package(
name = "thoas",
build_file = "@rabbitmq-server//bazel:BUILD.thoas",
sha256 = "e38697edffd6e91bd12cea41b155115282630075c2a727e7a6b2947f5408b86a",
version = "1.2.1",
)
erlang_package.hex_package(
name = "observer_cli",
build_file = "@rabbitmq-server//bazel:BUILD.observer_cli",
sha256 = "93ae523d42d566b176f7ae77a0bf36802dab8bb51a6086316cce66a7cfb5d81f",
version = "1.8.2",
)
erlang_package.hex_package(
name = "prometheus",
build_file = "@rabbitmq-server//bazel:BUILD.prometheus",
sha256 = "719862351aabf4df7079b05dc085d2bbcbe3ac0ac3009e956671b1d5ab88247d",
version = "4.11.0",
)
erlang_package.hex_package(
name = "quantile_estimator",
build_file = "@rabbitmq-server//bazel:BUILD.quantile_estimator",
sha256 = "282a8a323ca2a845c9e6f787d166348f776c1d4a41ede63046d72d422e3da946",
version = "0.2.1",
)
erlang_package.hex_package(
name = "ra",
build_file = "@rabbitmq-server//bazel:BUILD.ra",
pkg = "ra",
sha256 = "fd32a9b0a4b253b073b90dd996456e524347951d39f0b572d78178188491e6d4",
version = "2.16.1",
)
erlang_package.git_package(
name = "seshat",
build_file = "@rabbitmq-server//bazel:BUILD.seshat",
repository = "rabbitmq/seshat",
tag = "v0.6.1",
)
erlang_package.hex_package(
name = "ranch",
build_file = "@rabbitmq-server//bazel:BUILD.ranch",
patch_cmds = [
"rm ebin/ranch.app",
],
sha256 = "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916",
version = "2.1.0",
)
erlang_package.hex_package(
name = "recon",
build_file = "@rabbitmq-server//bazel:BUILD.recon",
sha256 = "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0",
version = "2.5.6",
)
erlang_package.hex_package(
name = "redbug",
build_file = "@rabbitmq-server//bazel:BUILD.redbug",
sha256 = "3624feb7a4b78fd9ae0e66cc3158fe7422770ad6987a1ebf8df4d3303b1c4b0c",
version = "2.0.7",
)
erlang_package.hex_package(
name = "stdout_formatter",
build_file = "@rabbitmq-server//bazel:BUILD.stdout_formatter",
sha256 = "51f1df921b0477275ea712763042155dbc74acc75d9648dbd54985c45c913b29",
version = "0.2.4",
)
erlang_package.git_package(
build_file = "@rabbitmq-server//bazel:BUILD.syslog",
repository = "schlagert/syslog",
tag = "4.0.0",
)
erlang_package.hex_package(
name = "sysmon_handler",
build_file = "@rabbitmq-server//bazel:BUILD.sysmon_handler",
sha256 = "922cf0dd558b9fdb1326168373315b52ed6a790ba943f6dcbd9ee22a74cebdef",
version = "1.3.0",
)
erlang_package.hex_package(
name = "systemd",
build_file = "@rabbitmq-server//bazel:BUILD.systemd",
sha256 = "8ec5ed610a5507071cdb7423e663e2452a747a624bb8a58582acd9491ccad233",
version = "0.6.1",
)
use_repo(
erlang_package,
"accept",
"aten",
"base64url",
"cowboy",
"cowlib",
"credentials_obfuscation",
"csv",
"cuttlefish",
"eetcd",
"gen_batch_server",
"getopt",
"gun",
"horus",
"jose",
"json",
"khepri",
"khepri_mnesia_migration",
"observer_cli",
"prometheus",
"ra",
"ranch",
"recon",
"redbug",
"seshat",
"stdout_formatter",
"syslog",
"sysmon_handler",
"systemd",
"thoas",
)
erlang_dev_package = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_package",
)
erlang_dev_package.hex_package(
name = "amqp",
build_file = "@rabbitmq-server//bazel:BUILD.amqp",
patch_args = ["-p1"],
patches = ["@rabbitmq-server//bazel:amqp.patch"],
sha256 = "8d3ae139d2646c630d674a1b8d68c7f85134f9e8b2a1c3dd5621616994b10a8b",
version = "3.3.0",
)
erlang_dev_package.git_package(
branch = "master",
build_file = "@//:bazel/BUILD.ct_helper",
repository = "ninenines/ct_helper",
)
erlang_dev_package.git_package(
name = "emqtt",
tag = "1.11.0",
build_file = "@rabbitmq-server//bazel:BUILD.emqtt",
repository = "emqx/emqtt",
)
erlang_dev_package.git_package(
name = "inet_tcp_proxy_dist",
testonly = True,
branch = "master",
repository = "rabbitmq/inet_tcp_proxy",
)
erlang_dev_package.git_package(
branch = "master",
build_file = "@rabbitmq-server//bazel:BUILD.meck",
repository = "eproxus/meck",
)
erlang_dev_package.git_package(
branch = "master",
build_file = "@rabbitmq-server//bazel:BUILD.proper",
repository = "manopapad/proper",
)
erlang_dev_package.hex_package(
name = "temp",
build_file = "@rabbitmq-server//bazel:BUILD.temp",
sha256 = "6af19e7d6a85a427478be1021574d1ae2a1e1b90882586f06bde76c63cd03e0d",
version = "0.4.7",
)
erlang_dev_package.hex_package(
name = "x509",
build_file = "@rabbitmq-server//bazel:BUILD.x509",
sha256 = "ccc3bff61406e5bb6a63f06d549f3dba3a1bbb456d84517efaaa210d8a33750f",
version = "0.8.8",
)
use_repo(
erlang_dev_package,
"amqp",
"ct_helper",
"emqtt",
"inet_tcp_proxy_dist",
"meck",
"proper",
"temp",
"x509",
)
secondary_umbrella = use_extension(
"//bazel/bzlmod:extensions.bzl",
"secondary_umbrella",
dev_dependency = True,
)
use_repo(
secondary_umbrella,
"rabbitmq-server-generic-unix-4.0",
)
hex = use_extension(
"//bazel/bzlmod:extensions.bzl",
"hex",
)
use_repo(
hex,
"hex",
)

354
Makefile
View File

@ -31,10 +31,6 @@ DISABLE_DISTCLEAN = 1
ifeq ($(filter-out xref,$(MAKECMDGOALS)),)
XREF_SCOPE = app deps
# We add all the applications that are in non-standard paths
# so they are included in the analyses as well.
XREF_EXTRA_APP_DIRS = $(filter-out deps/rabbitmq_cli/_build/dev/lib/rabbit_common/,$(wildcard deps/rabbitmq_cli/_build/dev/lib/*/)) deps/rabbitmq_prelaunch/
# For Elixir protocols the right fix is to include the consolidated/
# folders in addition to ebin/. However this creates conflicts because
# some modules are duplicated. So instead we ignore warnings from
@ -49,10 +45,6 @@ XREF_IGNORE = [ \
xref: ERL_LIBS := $(ERL_LIBS):$(CURDIR)/apps:$(CURDIR)/deps:$(dir $(shell elixir --eval ':io.format "~s~n", [:code.lib_dir :elixir ]'))
endif
ifneq ($(wildcard deps/.hex/cache.erl),)
deps:: restore-hex-cache-ets-file
endif
include rabbitmq-components.mk
# Set PROJECT_VERSION, calculated in rabbitmq-components.mk,
@ -76,7 +68,6 @@ endif
include erlang.mk
include mk/github-actions.mk
include mk/bazel.mk
# If PLUGINS was set when we use run-broker we want to
# fill in the enabled plugins list. PLUGINS is a more
@ -86,78 +77,17 @@ RABBITMQ_ENABLED_PLUGINS ?= $(call comma_list,$(PLUGINS))
endif
# --------------------------------------------------------------------
# Mix Hex cache management.
# Distribution - common variables and generic functions.
# --------------------------------------------------------------------
# We restore the initial Hex cache.ets file from an Erlang term created
# at the time the source archive was prepared.
#
# See the `$(SOURCE_DIST)` recipe for the reason behind this step.
restore-hex-cache-ets-file: deps/.hex/cache.ets
deps/.hex/cache.ets: deps/.hex/cache.erl
$(gen_verbose) $(call erlang,$(call restore_hex_cache_from_erl_term,$<,$@))
define restore_hex_cache_from_erl_term
In = "$(1)",
Out = "$(2)",
{ok, [Props, Entries]} = file:consult(In),
Name = proplists:get_value(name, Props),
Type = proplists:get_value(type, Props),
Access = proplists:get_value(protection, Props),
NamedTable = proplists:get_bool(named_table, Props),
Keypos = proplists:get_value(keypos, Props),
Heir = proplists:get_value(heir, Props),
ReadConc = proplists:get_bool(read_concurrency, Props),
WriteConc = proplists:get_bool(write_concurrency, Props),
Compressed = proplists:get_bool(compressed, Props),
Options0 = [
Type,
Access,
{keypos, Keypos},
{heir, Heir},
{read_concurrency, ReadConc},
{write_concurrency, WriteConc}],
Options1 = case NamedTable of
true -> [named_table | Options0];
false -> Options0
end,
Options2 = case Compressed of
true -> [compressed | Options0];
false -> Options0
end,
Tab = ets:new(Name, Options2),
[true = ets:insert(Tab, Entry) || Entry <- Entries],
ok = ets:tab2file(Tab, Out),
init:stop().
endef
# --------------------------------------------------------------------
# Distribution.
# --------------------------------------------------------------------
.PHONY: source-dist clean-source-dist
SOURCE_DIST_BASE ?= rabbitmq-server
SOURCE_DIST_SUFFIXES ?= tar.xz
SOURCE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_DIST_BASE)-$(PROJECT_VERSION)
# The first source distribution file is used by packages: if the archive
# type changes, you must update all packages' Makefile.
SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES))
.PHONY: $(SOURCE_DIST_FILES)
source-dist: $(SOURCE_DIST_FILES)
@:
RSYNC ?= rsync
RSYNC_V_0 =
RSYNC_V_1 = -v
RSYNC_V_2 = -v
RSYNC_V = $(RSYNC_V_$(V))
RSYNC_FLAGS += -a $(RSYNC_V) \
BASE_RSYNC_FLAGS += -a $(RSYNC_V) \
--delete \
--delete-excluded \
--exclude '.sw?' --exclude '.*.sw?' \
--exclude '*.beam' \
--exclude '*.d' \
@ -165,16 +95,10 @@ RSYNC_FLAGS += -a $(RSYNC_V) \
--exclude '.git*' \
--exclude '.hg*' \
--exclude '.*.plt' \
--exclude '*.bzl' \
--exclude '*.bazel' \
--exclude '*.bazelrc' \
--exclude 'moduleindex.yaml' \
--exclude 'BUILD.*' \
--exclude 'erlang_ls.config' \
--exclude '$(notdir $(ERLANG_MK_TMP))' \
--exclude '_build/' \
--exclude '__pycache__/' \
--exclude 'bazel*/' \
--exclude 'tools/' \
--exclude 'ci/' \
--exclude 'cover/' \
@ -188,12 +112,10 @@ RSYNC_FLAGS += -a $(RSYNC_V) \
--exclude '$(notdir $(DEPS_DIR))/' \
--exclude 'hexer*' \
--exclude 'logs/' \
--exclude 'packaging' \
--exclude 'PKG_*.md' \
--exclude '/plugins/' \
--include 'cli/plugins' \
--exclude '$(notdir $(DIST_DIR))/' \
--exclude 'test' \
--exclude '/$(notdir $(PACKAGES_DIR))/' \
--exclude '/PACKAGES/' \
--exclude '/amqp_client/doc/' \
@ -208,9 +130,21 @@ RSYNC_FLAGS += -a $(RSYNC_V) \
--exclude '/ranch/doc/' \
--exclude '/ranch/examples/' \
--exclude '/sockjs/examples/' \
--exclude '/workflow_sources/' \
--delete \
--delete-excluded
--exclude '/workflow_sources/'
SOURCE_DIST_RSYNC_FLAGS += $(BASE_RSYNC_FLAGS) \
--exclude 'packaging' \
--exclude 'test'
# For source-bundle, explicitly include folders that are needed
# for tests to execute. These are added before excludes from
# the base flags so rsync honors the first match.
SOURCE_BUNDLE_RSYNC_FLAGS += \
--include 'rabbit_shovel_test/ebin' \
--include 'rabbit_shovel_test/ebin/*' \
--include 'rabbitmq_ct_helpers/tools' \
--include 'rabbitmq_ct_helpers/tools/*' \
$(BASE_RSYNC_FLAGS)
TAR ?= tar
TAR_V_0 =
@ -228,115 +162,6 @@ ZIP_V_1 =
ZIP_V_2 =
ZIP_V = $(ZIP_V_$(V))
.PHONY: $(SOURCE_DIST)
.PHONY: clean-source-dist distclean-packages clean-unpacked-source-dist
$(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
$(verbose) mkdir -p $(dir $@)
$(gen_verbose) $(RSYNC) $(RSYNC_FLAGS) ./ $@/
$(verbose) echo "$(PROJECT_DESCRIPTION) $(PROJECT_VERSION)" > "$@/git-revisions.txt"
$(verbose) echo "$(PROJECT) $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)" >> "$@/git-revisions.txt"
$(verbose) echo "$$(TZ= git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')" > "$@.git-times.txt"
$(verbose) cat packaging/common/LICENSE.head > $@/LICENSE
$(verbose) mkdir -p $@/deps/licensing
$(verbose) set -e; for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | LC_COLLATE=C sort); do \
$(RSYNC) $(RSYNC_FLAGS) \
$$dep \
$@/deps; \
rm -f \
$@/deps/rabbit_common/rebar.config \
$@/deps/rabbit_common/rebar.lock; \
if test -f $@/deps/$$(basename $$dep)/erlang.mk && \
test "$$(wc -l $@/deps/$$(basename $$dep)/erlang.mk | awk '{print $$1;}')" = "1" && \
grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk)$$" $@/deps/$$(basename $$dep)/erlang.mk; then \
echo "include ../../erlang.mk" > $@/deps/$$(basename $$dep)/erlang.mk; \
fi; \
sed -E -i.bak "s|^[[:blank:]]*include[[:blank:]]+\.\./.*erlang.mk$$|include ../../erlang.mk|" \
$@/deps/$$(basename $$dep)/Makefile && \
rm $@/deps/$$(basename $$dep)/Makefile.bak; \
mix_exs=$@/deps/$$(basename $$dep)/mix.exs; \
if test -f $$mix_exs; then \
(cd $$(dirname "$$mix_exs") && \
(test -d $@/deps/.hex || env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix local.hex --force) && \
env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix deps.get --only prod && \
cp $(CURDIR)/mk/rabbitmq-mix.mk . && \
rm -rf _build deps); \
fi; \
if test -f "$$dep/license_info"; then \
cp "$$dep/license_info" "$@/deps/licensing/license_info_$$(basename "$$dep")"; \
cat "$$dep/license_info" >> $@/LICENSE; \
fi; \
find "$$dep" -maxdepth 1 -name 'LICENSE-*' -exec cp '{}' $@/deps/licensing \; ; \
(cd $$dep; \
echo "$$(basename "$$dep") $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)") \
>> "$@/git-revisions.txt"; \
! test -d $$dep/.git || (cd $$dep; \
echo "$$(env TZ= git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')") \
>> "$@.git-times.txt"; \
done
$(verbose) cat packaging/common/LICENSE.tail >> $@/LICENSE
$(verbose) find $@/deps/licensing -name 'LICENSE-*' -exec cp '{}' $@ \;
$(verbose) rm -rf $@/deps/licensing
$(verbose) for file in $$(find $@ -name '*.app.src'); do \
sed -E -i.bak \
-e 's/[{]vsn[[:blank:]]*,[[:blank:]]*(""|"0.0.0")[[:blank:]]*}/{vsn, "$(PROJECT_VERSION)"}/' \
-e 's/[{]broker_version_requirements[[:blank:]]*,[[:blank:]]*\[\][[:blank:]]*}/{broker_version_requirements, ["$(PROJECT_VERSION)"]}/' \
$$file; \
rm $$file.bak; \
done
$(verbose) echo "PLUGINS := $(PLUGINS)" > $@/plugins.mk
# Remember the latest Git timestamp.
$(verbose) sort -r < "$@.git-times.txt" | head -n 1 > "$@.git-time.txt"
# Mix Hex component requires a cache file, otherwise it refuses to build
# offline... That cache is an ETS table with all the applications we
# depend on, plus some versioning informations and checksums. There
# are two problems with that: the table contains a date (`last_update`
# field) and `ets:tab2file()` produces a different file each time it's
# called.
#
# To make our source archive reproducible, we fix the time of the
# `last_update` field to the last Git commit and dump the content of the
# table as an Erlang term to a text file.
#
# The ETS file must be recreated before compiling RabbitMQ. See the
# `restore-hex-cache-ets-file` Make target.
$(verbose) $(call erlang,$(call dump_hex_cache_to_erl_term,$(call core_native_path,$@),$(call core_native_path,$@.git-time.txt)))
# Fix file timestamps to have reproducible source archives.
$(verbose) find $@ -print0 | xargs -0 touch -t "$$(cat "$@.git-time.txt")"
$(verbose) rm "$@.git-times.txt" "$@.git-time.txt"
define dump_hex_cache_to_erl_term
In = "$(1)/deps/.hex/cache.ets",
Out = "$(1)/deps/.hex/cache.erl",
{ok, DateStr} = file:read_file("$(2)"),
{match, Date} = re:run(DateStr,
"^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})\.([0-9]{2})",
[{capture, all_but_first, list}]),
[Year, Month, Day, Hour, Min, Sec] = [erlang:list_to_integer(V) || V <- Date],
{ok, Tab} = ets:file2tab(In),
true = ets:insert(Tab, {last_update, {{Year, Month, Day}, {Hour, Min, Sec}}}),
Props = [
Prop
|| {Key, _} = Prop <- ets:info(Tab),
Key =:= name orelse
Key =:= type orelse
Key =:= protection orelse
Key =:= named_table orelse
Key =:= keypos orelse
Key =:= heir orelse
Key =:= read_concurrency orelse
Key =:= write_concurrency orelse
Key =:= compressed],
Entries = ets:tab2list(Tab),
ok = file:write_file(Out, io_lib:format("~w.~n~w.~n", [Props, Entries])),
ok = file:delete(In),
init:stop().
endef
$(SOURCE_DIST).manifest: $(SOURCE_DIST)
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
find $(notdir $(SOURCE_DIST)) | LC_COLLATE=C sort > $@
ifeq ($(shell tar --version | grep -c "GNU tar"),0)
# Skip all flags if this is Darwin (a.k.a. macOS, a.k.a. OS X)
ifeq ($(shell uname | grep -c "Darwin"),0)
@ -353,30 +178,128 @@ TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS = --owner 0 \
--numeric-owner
endif
$(SOURCE_DIST).tar.gz: $(SOURCE_DIST).manifest
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
$(TAR) $(TAR_V) $(TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS) --no-recursion -T $(SOURCE_DIST).manifest -cf - | \
$(GZIP) --best > $@
DIST_SUFFIXES ?= tar.xz
$(SOURCE_DIST).tar.bz2: $(SOURCE_DIST).manifest
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
$(TAR) $(TAR_V) $(TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS) --no-recursion -T $(SOURCE_DIST).manifest -cf - | \
$(BZIP2) > $@
# Function to create distribution targets
# Args: $(1) - Full distribution path
# $(2) - RSYNC flags to use
define create_dist_target
$(1): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
$${verbose} mkdir -p $$(dir $$@)
$${gen_verbose} $${RSYNC} $(2) ./ $$@/
$${verbose} echo "$(PROJECT_DESCRIPTION) $(PROJECT_VERSION)" > $$@/git-revisions.txt
$${verbose} echo "$(PROJECT) $$$$(git rev-parse HEAD) $$$$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)" >> $$@/git-revisions.txt
$${verbose} echo "$$$$(TZ=UTC git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')" > $$@.git-times.txt
$${verbose} cat packaging/common/LICENSE.head > $$@/LICENSE
$${verbose} mkdir -p $$@/deps/licensing
$${verbose} set -e; for dep in $$$$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | LC_COLLATE=C sort); do \
$${RSYNC} $(2) \
$$$$dep \
$$@/deps; \
rm -f \
$$@/deps/rabbit_common/rebar.config \
$$@/deps/rabbit_common/rebar.lock; \
if test -f $$@/deps/$$$$(basename $$$$dep)/erlang.mk && \
test "$$$$(wc -l $$@/deps/$$$$(basename $$$$dep)/erlang.mk | awk '{print $$$$1;}')" = "1" && \
grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk)$$$$" $$@/deps/$$$$(basename $$$$dep)/erlang.mk; then \
echo "include ../../erlang.mk" > $$@/deps/$$$$(basename $$$$dep)/erlang.mk; \
fi; \
sed -E -i.bak "s|^[[:blank:]]*include[[:blank:]]+\.\./.*erlang.mk$$$$|include ../../erlang.mk|" \
$$@/deps/$$$$(basename $$$$dep)/Makefile && \
rm $$@/deps/$$$$(basename $$$$dep)/Makefile.bak; \
if test -f "$$$$dep/license_info"; then \
cp "$$$$dep/license_info" "$$@/deps/licensing/license_info_$$$$(basename $$$$dep)"; \
cat "$$$$dep/license_info" >> $$@/LICENSE; \
fi; \
find "$$$$dep" -maxdepth 1 -name 'LICENSE-*' -exec cp '{}' $$@/deps/licensing \; ; \
(cd $$$$dep; \
echo "$$$$(basename "$$$$dep") $$$$(git rev-parse HEAD) $$$$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)") \
>> "$$@/git-revisions.txt"; \
! test -d $$$$dep/.git || (cd $$$$dep; \
echo "$$$$(TZ=UTC git --no-pager log -n 1 --format='%cd' --date='format-local:%Y%m%d%H%M.%S')") >> "$$@.git-times.txt"; \
done
$${verbose} cat packaging/common/LICENSE.tail >> $$@/LICENSE
$${verbose} find $$@/deps/licensing -name 'LICENSE-*' -exec cp '{}' $$@ \;
$${verbose} rm -rf $$@/deps/licensing
$${verbose} for file in $$$$(find $$@ -name '*.app.src'); do \
sed -E -i.bak \
-e 's/[{]vsn[[:blank:]]*,[[:blank:]]*(""|"0.0.0")[[:blank:]]*}/{vsn, "$(PROJECT_VERSION)"}/' \
-e 's/[{]broker_version_requirements[[:blank:]]*,[[:blank:]]*\[\][[:blank:]]*}/{broker_version_requirements, ["$(PROJECT_VERSION)"]}/' \
$$$$file; \
rm $$$$file.bak; \
done
$${verbose} echo "PLUGINS := $(PLUGINS)" > $$@/plugins.mk
$${verbose} sort -r < "$$@.git-times.txt" | head -n 1 > "$$@.git-time.txt"
$${verbose} find $$@ -print0 | (TZ=UTC xargs -0 touch -t "$$$$(cat $$@.git-time.txt)")
$${verbose} rm "$$@.git-times.txt" "$$@.git-time.txt"
$(SOURCE_DIST).tar.xz: $(SOURCE_DIST).manifest
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
$(TAR) $(TAR_V) $(TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS) --no-recursion -T $(SOURCE_DIST).manifest -cf - | \
$(XZ) > $@
$(1).manifest: $(1)
$${gen_verbose} cd $$(dir $$@) && \
find $$(notdir $$<) | LC_COLLATE=C sort > $$@
$(SOURCE_DIST).zip: $(SOURCE_DIST).manifest
$(verbose) rm -f $@
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
$(ZIP) $(ZIP_V) --names-stdin $@ < $(SOURCE_DIST).manifest
$(1).tar.xz: $(1).manifest
$${gen_verbose} cd $$(dir $$@) && \
$${TAR} $${TAR_V} $${TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS} --no-recursion -T $$(notdir $$<) -cf - | \
$${XZ} > $$@
clean:: clean-source-dist
$(1).tar.gz: $(1).manifest
$${gen_verbose} cd $$(dir $$@) && \
$${TAR} $${TAR_V} $${TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS} --no-recursion -T $$(notdir $$<) -cf - | \
$${GZIP} --best > $$@
clean-source-dist:
$(gen_verbose) rm -rf -- $(SOURCE_DIST_BASE)-*
$(1).tar.bz2: $(1).manifest
$${gen_verbose} cd $$(dir $$@) && \
$${TAR} $${TAR_V} $${TAR_FLAGS_FOR_REPRODUCIBLE_BUILDS} --no-recursion -T $$(notdir $$<) -cf - | \
$${BZIP2} > $$@
$(1).zip: $(1).manifest
$${verbose} rm -f $$@
$${gen_verbose} cd $$(dir $$@) && \
$${ZIP} $${ZIP_V} --names-stdin $$@ < $$(notdir $$<)
endef
# Function to create clean targets
# Args: $(1) - Base name (e.g. SOURCE_DIST_BASE or BUNDLE_DIST_BASE)
define create_clean_targets
.PHONY: clean-$(1)
clean-$(1):
$${gen_verbose} rm -rf -- $(1)-*
# Add each clean target to the clean:: rule
clean:: clean-$(1)
endef
# --------------------------------------------------------------------
# Distribution - public targets
# --------------------------------------------------------------------
SOURCE_DIST_BASE ?= rabbitmq-server
SOURCE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_DIST_BASE)-$(PROJECT_VERSION)
SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(DIST_SUFFIXES))
.PHONY: source-dist
source-dist: $(SOURCE_DIST_FILES)
@:
$(eval $(call create_dist_target,$(SOURCE_DIST),$(SOURCE_DIST_RSYNC_FLAGS)))
SOURCE_BUNDLE_BASE ?= rabbitmq-server-bundle
SOURCE_BUNDLE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_BUNDLE_BASE)-$(PROJECT_VERSION)
SOURCE_BUNDLE_FILES = $(addprefix $(SOURCE_BUNDLE_DIST).,$(DIST_SUFFIXES))
.PHONY: source-bundle
source-bundle: $(SOURCE_BUNDLE_FILES)
@:
$(eval $(call create_dist_target,$(SOURCE_BUNDLE_DIST),$(SOURCE_BUNDLE_RSYNC_FLAGS)))
# Create the clean targets for both distributions
$(eval $(call create_clean_targets,$(SOURCE_DIST_BASE)))
$(eval $(call create_clean_targets,$(SOURCE_BUNDLE_BASE)))
.PHONY: distclean-packages clean-unpacked-source-dist
distclean:: distclean-packages
@ -409,8 +332,8 @@ clean-deps:
PACKAGES_SOURCE_DIST_FILE ?= $(firstword $(SOURCE_DIST_FILES))
RABBITMQ_PACKAGING_TARGETS = package-deb package-rpm \
package-rpm-redhat package-rpm-fedora package-rpm-rhel6 package-rpm-rhel7 \
package-rpm-rhel8 package-rpm-suse package-rpm-opensuse package-rpm-sles11 \
package-rpm-redhat package-rpm-fedora package-rpm-rhel8 \
package-rpm-suse package-rpm-opensuse \
package-windows
ifneq ($(filter $(RABBITMQ_PACKAGING_TARGETS),$(MAKECMDGOALS)),)
@ -599,6 +522,7 @@ TIER1_PLUGINS := \
rabbitmq_amqp1_0 \
rabbitmq_auth_backend_cache \
rabbitmq_auth_backend_http \
rabbitmq_auth_backend_internal_loopback \
rabbitmq_auth_backend_ldap \
rabbitmq_auth_backend_oauth2 \
rabbitmq_auth_mechanism_ssl \

View File

@ -1,60 +1,3 @@
# Build RabbitMQ Packages using Linux
## Environment
Debian Jesse using this `Vagrantfile`:
```
$script = <<SCRIPT
export LANG='C.UTF-8'
export DEBIAN_FRONTEND=noninteractive
echo 'deb http://cdn-fastly.deb.debian.org/debian jessie-backports main' >> /etc/apt/sources.list.d/backports.list
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
dpkg -i erlang-solutions_1.0_all.deb
apt-get clean
apt-get update
apt-get install -y --fix-missing --no-install-recommends \
build-essential \
ca-certificates \
debhelper \
dh-systemd \
elinks \
esl-erlang \
elixir \
fakeroot \
git \
libfile-fcntllock-perl \
mandoc \
nsis \
python-lxml \
python-markdown \
python-simplejson \
rpm \
rsync \
tofrodos \
unzip \
xmlto \
xsltproc \
zip \
curl
date > /etc/vagrant_provisioned_at
SCRIPT
Vagrant.configure('2') do |config|
config.vm.box = "debian/jessie64"
config.vm.hostname = 'DEBIAN-JESSIE64'
config.vm.provision 'shell', inline: $script
end
```
## Instructions
Bring up a Debian Jesse instance using Vagrant, or, use the provisioning script
on a Debian Jesse server of your own. When it is done running, all necessary
package build requirements for either `apt`-based or `rpm`-based distros will
be present. See the [`README.md`](README.md#tldr) document for instructions on
building packages.
See [`rabbitmq/build-env-images`](https://github.com/rabbitmq/build-env-images) and [`rabbitmq/server-packages`](https://github.com/rabbitmq/server-packages?tab=readme-ov-file).

View File

@ -1,121 +1,6 @@
# Build RabbitMQ Windows Package using Windows
# Build RabbitMQ Windows Package
## Environment
The RabbitMQ Windows installer is produced on Linux, together
with the rest of the packages.
Windows 8.1 using this `Vagrantfile`:
```
Vagrant.configure("2") do |config|
config.vm.box = "inclusivedesign/windows81-eval-x64"
config.vm.provider "virtualbox" do |v|
v.gui = true
end
end
```
Note that these steps should work on more recent versions of Windows as well.
If you have issues using a newer version of Windows, please provide full
details in a message to the
[`rabbitmq-users`](https://groups.google.com/forum/#!forum/rabbitmq-users)
mailing list.
## Initial Steps
Bring up the VM and go through the process of updating Windows and (optionall)
VirtualBox tools. You'll notice that the evaluation license is expired. Re-arm
it by running this command via an administrative prompt:
```
slmgr -rearm
```
This part of the process will take a while as Windows is updated. Go make some
coffee and check your email.
## Install Erlang and Elixir
Using Chocolatey is the easiest method to install the most recent version of
Erlang and Elixir. Install Chocolatey [using these
instructions](https://chocolatey.org/install#installing-chocolatey)
([link](https://chocolatey.org/install#installing-chocolatey)), then install
both Erlang and Elixir using this command from an *administrative* `cmd.exe` or
Powershell terminal:
```
choco install elixir which
```
To confirm installation, open a new command prompt and run the following:
```
erl -version
elixir -v
which erl
which elixir
```
## Install MSYS2 and NSIS
Chocolatey is also an easy way to install `msys2` and the NSIS install script
builder. Run the following from an *administrative* command prompt:
```
choco install msys2 nsis
```
As a bonus, it will update your `msys2` installation for you during the initial
install process.
## Install MSYS2 packages
Start up an `msys2` shell by running the following command (does not have to be
admin):
```
C:\tools\msys64\msys2_shell.cmd
```
In that shell, install all of these dependencies. If you are prompted for
input, just hit ENTER to choose the default:
```
pacman -S --needed git make tar rsync python zip unzip dos2unix man
```
## Build RabbitMQ
### Clone this repository
From within your MSYS2 shell:
```
git clone https://github.com/rabbitmq/rabbitmq-server-release.git
```
### Set `PATH`
```
export PATH="$PATH:/c/ProgramData/Chocolatey/bin:/c/ProgramData/Chocolatey/lib/Elixir/bin:/c/Program Files (x86)/NSIS/bin"
```
### Fetch and build deps
*Note:* as of this writing, RabbitMQ `3.7.8` is the latest version. Be sure to check out the tag appropriate for your use:
```
cd rabbitmq-server-release
# the following checks out the "next to be released" branch
# this branch and version 3.7.9 have a necessary fix for building
# on windows, see this: https://github.com/rabbitmq/rabbitmq-server-release/pull/89
git checkout v3.7.x
make deps
```
### Build Windows package
```
make UNIX_TO_DOS=unix2dos package-windows
```
See [`rabbitmq/build-env-images`](https://github.com/rabbitmq/build-env-images) and [`rabbitmq/server-packages`](https://github.com/rabbitmq/server-packages?tab=readme-ov-file).

View File

@ -1,3 +1,3 @@
# RabbitMQ Server Releases
See [`rabbitmq/server-packages`](https://github.com/rabbitmq/server-packages/).
See [`rabbitmq/build-env-images`](https://github.com/rabbitmq/build-env-images) and [`rabbitmq/server-packages`](https://github.com/rabbitmq/server-packages?tab=readme-ov-file).

View File

@ -1,50 +0,0 @@
workspace(name = "rabbitmq-server")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
http_archive(
name = "rules_pkg",
sha256 = "d250924a2ecc5176808fc4c25d5cf5e9e79e6346d79d5ab1c493e289e722d1d0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.10.1/rules_pkg-0.10.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.10.1/rules_pkg-0.10.1.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
git_repository(
name = "rules_erlang",
remote = "https://github.com/rabbitmq/rules_erlang.git",
tag = "3.15.1",
)
load("@rules_erlang//:internal_deps.bzl", "rules_erlang_internal_deps")
rules_erlang_internal_deps()
load("@rules_erlang//:internal_setup.bzl", "rules_erlang_internal_setup")
rules_erlang_internal_setup(go_repository_default_config = "//:WORKSPACE")
load("@rules_erlang//gazelle:deps.bzl", "gazelle_deps")
gazelle_deps()
new_git_repository(
name = "bats",
build_file = "@//:BUILD.bats",
remote = "https://github.com/sstephenson/bats",
tag = "v0.4.0",
)
load("//deps/amqp10_client:activemq.bzl", "activemq_archive")
activemq_archive()
load("//bazel/bzlmod:secondary_umbrella.bzl", "secondary_umbrella")
secondary_umbrella()

View File

@ -1,102 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/accept_encoding_header.erl",
"src/accept_header.erl",
"src/accept_neg.erl",
"src/accept_parser.erl",
],
outs = [
"ebin/accept_encoding_header.beam",
"ebin/accept_header.beam",
"ebin/accept_neg.beam",
"ebin/accept_parser.beam",
],
hdrs = ["include/accept.hrl"],
app_name = "accept",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/accept.app.src",
"src/accept_encoding_header.erl",
"src/accept_header.erl",
"src/accept_neg.erl",
"src/accept_parser.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = ["include/accept.hrl"],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "accept",
beam_files = [":beam_files"],
)
alias(
name = "accept",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,26 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlc_opts")
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)

View File

@ -1,118 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/aten.erl",
"src/aten_app.erl",
"src/aten_detect.erl",
"src/aten_detector.erl",
"src/aten_emitter.erl",
"src/aten_sink.erl",
"src/aten_sup.erl",
],
outs = [
"ebin/aten.beam",
"ebin/aten_app.beam",
"ebin/aten_detect.beam",
"ebin/aten_detector.beam",
"ebin/aten_emitter.beam",
"ebin/aten_sink.beam",
"ebin/aten_sup.beam",
],
hdrs = [],
app_name = "aten",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/aten.app.src",
"src/aten.erl",
"src/aten_app.erl",
"src/aten_detect.erl",
"src/aten_detector.erl",
"src/aten_emitter.erl",
"src/aten_sink.erl",
"src/aten_sup.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "aten",
beam_files = [":beam_files"],
extra_apps = [
"crypto",
"sasl",
],
)
alias(
name = "aten",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,96 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_bif_clash",
"+warn_export_vars",
"+warn_format",
"+warn_obsolete_guard",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_bif_clash",
"+warn_export_vars",
"+warn_format",
"+warn_obsolete_guard",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = ["src/base64url.erl"],
outs = ["ebin/base64url.beam"],
hdrs = [],
app_name = "base64url",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/base64url.app.src",
"src/base64url.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE.txt"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "base64url",
beam_files = [":beam_files"],
)
alias(
name = "base64url",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,175 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/cowboy_middleware.erl",
"src/cowboy_stream.erl",
"src/cowboy_sub_protocol.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "cowboy",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/cowboy.erl",
"src/cowboy_app.erl",
"src/cowboy_bstr.erl",
"src/cowboy_children.erl",
"src/cowboy_clear.erl",
"src/cowboy_clock.erl",
"src/cowboy_compress_h.erl",
"src/cowboy_constraints.erl",
"src/cowboy_decompress_h.erl",
"src/cowboy_handler.erl",
"src/cowboy_http.erl",
"src/cowboy_http2.erl",
"src/cowboy_loop.erl",
"src/cowboy_metrics_h.erl",
"src/cowboy_req.erl",
"src/cowboy_rest.erl",
"src/cowboy_router.erl",
"src/cowboy_static.erl",
"src/cowboy_stream_h.erl",
"src/cowboy_sup.erl",
"src/cowboy_tls.erl",
"src/cowboy_tracer_h.erl",
"src/cowboy_websocket.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "cowboy",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = [
"@cowlib//:erlang_app",
"@ranch//:erlang_app",
],
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/cowboy.erl",
"src/cowboy_app.erl",
"src/cowboy_bstr.erl",
"src/cowboy_children.erl",
"src/cowboy_clear.erl",
"src/cowboy_clock.erl",
"src/cowboy_compress_h.erl",
"src/cowboy_constraints.erl",
"src/cowboy_decompress_h.erl",
"src/cowboy_handler.erl",
"src/cowboy_http.erl",
"src/cowboy_http2.erl",
"src/cowboy_loop.erl",
"src/cowboy_metrics_h.erl",
"src/cowboy_middleware.erl",
"src/cowboy_req.erl",
"src/cowboy_rest.erl",
"src/cowboy_router.erl",
"src/cowboy_static.erl",
"src/cowboy_stream.erl",
"src/cowboy_stream_h.erl",
"src/cowboy_sub_protocol.erl",
"src/cowboy_sup.erl",
"src/cowboy_tls.erl",
"src/cowboy_tracer_h.erl",
"src/cowboy_websocket.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_description = "Small, fast, modern HTTP server.",
app_name = "cowboy",
app_registered = ["cowboy_clock"],
app_version = "2.12.0",
beam_files = [":beam_files"],
extra_apps = ["crypto"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
"@cowlib//:erlang_app",
"@ranch//:erlang_app",
],
)
alias(
name = "cowboy",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,144 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/cow_base64url.erl",
"src/cow_cookie.erl",
"src/cow_date.erl",
"src/cow_hpack.erl",
"src/cow_http.erl",
"src/cow_http2.erl",
"src/cow_http2_machine.erl",
"src/cow_http_hd.erl",
"src/cow_http_struct_hd.erl",
"src/cow_http_te.erl",
"src/cow_iolists.erl",
"src/cow_link.erl",
"src/cow_mimetypes.erl",
"src/cow_multipart.erl",
"src/cow_qs.erl",
"src/cow_spdy.erl",
"src/cow_sse.erl",
"src/cow_uri.erl",
"src/cow_uri_template.erl",
"src/cow_ws.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "cowlib",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/cow_base64url.erl",
"src/cow_cookie.erl",
"src/cow_date.erl",
"src/cow_hpack.erl",
"src/cow_http.erl",
"src/cow_http2.erl",
"src/cow_http2_machine.erl",
"src/cow_http_hd.erl",
"src/cow_http_struct_hd.erl",
"src/cow_http_te.erl",
"src/cow_iolists.erl",
"src/cow_link.erl",
"src/cow_mimetypes.erl",
"src/cow_multipart.erl",
"src/cow_qs.erl",
"src/cow_spdy.erl",
"src/cow_sse.erl",
"src/cow_uri.erl",
"src/cow_uri_template.erl",
"src/cow_ws.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [
"src/cow_hpack_dec_huffman_lookup.hrl",
"src/cow_spdy.hrl",
],
)
filegroup(
name = "public_hdrs",
srcs = [
"include/cow_inline.hrl",
"include/cow_parse.hrl",
],
)
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_description = "Support library for manipulating Web protocols.",
app_name = "cowlib",
app_version = "2.13.0",
beam_files = [":beam_files"],
extra_apps = ["crypto"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "cowlib",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,111 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/credentials_obfuscation.erl",
"src/credentials_obfuscation_app.erl",
"src/credentials_obfuscation_pbe.erl",
"src/credentials_obfuscation_sup.erl",
"src/credentials_obfuscation_svc.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "credentials_obfuscation",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/credentials_obfuscation.app.src",
"src/credentials_obfuscation.erl",
"src/credentials_obfuscation_app.erl",
"src/credentials_obfuscation_pbe.erl",
"src/credentials_obfuscation_sup.erl",
"src/credentials_obfuscation_svc.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(
name = "public_hdrs",
srcs = [
"include/credentials_obfuscation.hrl",
"include/otp_crypto.hrl",
],
)
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "credentials_obfuscation",
beam_files = [":beam_files"],
extra_apps = ["crypto"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "credentials_obfuscation",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)

View File

@ -1,26 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlc_opts")
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
Can't render this file because it contains an unexpected character in line 1 and column 6.

View File

@ -1,102 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
testonly = True,
srcs = [
"src/ct_helper.erl",
"src/ct_helper_error_h.erl"
],
outs = [
"ebin/ct_helper.beam",
"ebin/ct_helper_error_h.beam"
],
app_name = "ct_helper",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
testonly = True,
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
testonly = True,
srcs = [
"src/ct_helper.app.src",
"src/ct_helper.erl",
"src/ct_helper_error_h.erl"
],
)
filegroup(
name = "private_hdrs",
testonly = True,
)
filegroup(
name = "public_hdrs",
testonly = True,
)
filegroup(
name = "priv",
testonly = True,
)
filegroup(
name = "licenses",
testonly = True,
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
testonly = True,
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
testonly = True,
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
testonly = True,
srcs = [":all_srcs"],
app_name = "ct_helper",
beam_files = [":beam_files"],
)
alias(
name = "ct_helper",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,163 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_untyped_record",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_untyped_record",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/conf_parse.erl",
"src/cuttlefish.erl",
"src/cuttlefish_advanced.erl",
"src/cuttlefish_bytesize.erl",
"src/cuttlefish_conf.erl",
"src/cuttlefish_datatypes.erl",
"src/cuttlefish_duration.erl",
"src/cuttlefish_duration_parse.erl",
"src/cuttlefish_effective.erl",
"src/cuttlefish_enum.erl",
"src/cuttlefish_error.erl",
"src/cuttlefish_escript.erl",
"src/cuttlefish_flag.erl",
"src/cuttlefish_generator.erl",
"src/cuttlefish_mapping.erl",
"src/cuttlefish_rebar_plugin.erl",
"src/cuttlefish_schema.erl",
"src/cuttlefish_translation.erl",
"src/cuttlefish_unit.erl",
"src/cuttlefish_util.erl",
"src/cuttlefish_validator.erl",
"src/cuttlefish_variable.erl",
"src/cuttlefish_vmargs.erl",
],
outs = [
"ebin/conf_parse.beam",
"ebin/cuttlefish.beam",
"ebin/cuttlefish_advanced.beam",
"ebin/cuttlefish_bytesize.beam",
"ebin/cuttlefish_conf.beam",
"ebin/cuttlefish_datatypes.beam",
"ebin/cuttlefish_duration.beam",
"ebin/cuttlefish_duration_parse.beam",
"ebin/cuttlefish_effective.beam",
"ebin/cuttlefish_enum.beam",
"ebin/cuttlefish_error.beam",
"ebin/cuttlefish_escript.beam",
"ebin/cuttlefish_flag.beam",
"ebin/cuttlefish_generator.beam",
"ebin/cuttlefish_mapping.beam",
"ebin/cuttlefish_rebar_plugin.beam",
"ebin/cuttlefish_schema.beam",
"ebin/cuttlefish_translation.beam",
"ebin/cuttlefish_unit.beam",
"ebin/cuttlefish_util.beam",
"ebin/cuttlefish_validator.beam",
"ebin/cuttlefish_variable.beam",
"ebin/cuttlefish_vmargs.beam",
],
hdrs = ["src/cuttlefish_duration.hrl"],
app_name = "cuttlefish",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/conf_parse.erl",
"src/cuttlefish.app.src",
"src/cuttlefish.erl",
"src/cuttlefish_advanced.erl",
"src/cuttlefish_bytesize.erl",
"src/cuttlefish_conf.erl",
"src/cuttlefish_datatypes.erl",
"src/cuttlefish_duration.erl",
"src/cuttlefish_duration_parse.erl",
"src/cuttlefish_effective.erl",
"src/cuttlefish_enum.erl",
"src/cuttlefish_error.erl",
"src/cuttlefish_escript.erl",
"src/cuttlefish_flag.erl",
"src/cuttlefish_generator.erl",
"src/cuttlefish_mapping.erl",
"src/cuttlefish_rebar_plugin.erl",
"src/cuttlefish_schema.erl",
"src/cuttlefish_translation.erl",
"src/cuttlefish_unit.erl",
"src/cuttlefish_util.erl",
"src/cuttlefish_validator.erl",
"src/cuttlefish_variable.erl",
"src/cuttlefish_vmargs.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = ["src/cuttlefish_duration.hrl"],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = ["priv/erlang_vm.schema"],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "cuttlefish",
beam_files = [":beam_files"],
deps = ["@getopt//:erlang_app"],
)
alias(
name = "cuttlefish",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,198 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/clients/eetcd_auth_gen.erl",
"src/clients/eetcd_cluster_gen.erl",
"src/clients/eetcd_election_gen.erl",
"src/clients/eetcd_health_gen.erl",
"src/clients/eetcd_kv_gen.erl",
"src/clients/eetcd_lease_gen.erl",
"src/clients/eetcd_lock_gen.erl",
"src/clients/eetcd_maintenance_gen.erl",
"src/clients/eetcd_watch_gen.erl",
"src/eetcd.erl",
"src/eetcd_app.erl",
"src/eetcd_auth.erl",
"src/eetcd_cluster.erl",
"src/eetcd_compare.erl",
"src/eetcd_conn.erl",
"src/eetcd_conn_sup.erl",
"src/eetcd_data_coercion.erl",
"src/eetcd_election.erl",
"src/eetcd_grpc.erl",
"src/eetcd_kv.erl",
"src/eetcd_lease.erl",
"src/eetcd_lease_sup.erl",
"src/eetcd_lock.erl",
"src/eetcd_maintenance.erl",
"src/eetcd_op.erl",
"src/eetcd_stream.erl",
"src/eetcd_sup.erl",
"src/eetcd_watch.erl",
"src/protos/auth_pb.erl",
"src/protos/gogo_pb.erl",
"src/protos/health_pb.erl",
"src/protos/kv_pb.erl",
"src/protos/router_pb.erl",
],
outs = [
"ebin/auth_pb.beam",
"ebin/eetcd.beam",
"ebin/eetcd_app.beam",
"ebin/eetcd_auth.beam",
"ebin/eetcd_auth_gen.beam",
"ebin/eetcd_cluster.beam",
"ebin/eetcd_cluster_gen.beam",
"ebin/eetcd_compare.beam",
"ebin/eetcd_conn.beam",
"ebin/eetcd_conn_sup.beam",
"ebin/eetcd_data_coercion.beam",
"ebin/eetcd_election.beam",
"ebin/eetcd_election_gen.beam",
"ebin/eetcd_grpc.beam",
"ebin/eetcd_health_gen.beam",
"ebin/eetcd_kv.beam",
"ebin/eetcd_kv_gen.beam",
"ebin/eetcd_lease.beam",
"ebin/eetcd_lease_gen.beam",
"ebin/eetcd_lease_sup.beam",
"ebin/eetcd_lock.beam",
"ebin/eetcd_lock_gen.beam",
"ebin/eetcd_maintenance.beam",
"ebin/eetcd_maintenance_gen.beam",
"ebin/eetcd_op.beam",
"ebin/eetcd_stream.beam",
"ebin/eetcd_sup.beam",
"ebin/eetcd_watch.beam",
"ebin/eetcd_watch_gen.beam",
"ebin/gogo_pb.beam",
"ebin/health_pb.beam",
"ebin/kv_pb.beam",
"ebin/router_pb.beam",
],
hdrs = [
"include/eetcd.hrl",
],
app_name = "eetcd",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/clients/eetcd_auth_gen.erl",
"src/clients/eetcd_cluster_gen.erl",
"src/clients/eetcd_election_gen.erl",
"src/clients/eetcd_health_gen.erl",
"src/clients/eetcd_kv_gen.erl",
"src/clients/eetcd_lease_gen.erl",
"src/clients/eetcd_lock_gen.erl",
"src/clients/eetcd_maintenance_gen.erl",
"src/clients/eetcd_watch_gen.erl",
"src/eetcd.app.src",
"src/eetcd.erl",
"src/eetcd_app.erl",
"src/eetcd_auth.erl",
"src/eetcd_cluster.erl",
"src/eetcd_compare.erl",
"src/eetcd_conn.erl",
"src/eetcd_conn_sup.erl",
"src/eetcd_data_coercion.erl",
"src/eetcd_election.erl",
"src/eetcd_grpc.erl",
"src/eetcd_kv.erl",
"src/eetcd_lease.erl",
"src/eetcd_lease_sup.erl",
"src/eetcd_lock.erl",
"src/eetcd_maintenance.erl",
"src/eetcd_op.erl",
"src/eetcd_stream.erl",
"src/eetcd_sup.erl",
"src/eetcd_watch.erl",
"src/protos/auth_pb.erl",
"src/protos/gogo_pb.erl",
"src/protos/health_pb.erl",
"src/protos/kv_pb.erl",
"src/protos/router_pb.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(
name = "public_hdrs",
srcs = [
"include/eetcd.hrl",
],
)
filegroup(
name = "priv",
srcs = [
"priv/protos",
"priv/protos/auth.proto",
"priv/protos/gogo.proto",
"priv/protos/kv.proto",
"priv/protos/router.proto",
],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "eetcd",
beam_files = [":beam_files"],
deps = ["@gun//:erlang_app"],
)
alias(
name = "eetcd",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,152 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
# gazelle:erlang_erlc_opt -DBUILD_WITHOUT_QUIC
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_all",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_unused_import",
"+warn_unused_vars",
"-DBUILD_WITHOUT_QUIC",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_all",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_unused_import",
"+warn_unused_vars",
"-DBUILD_WITHOUT_QUIC",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
testonly = True,
srcs = [
"src/emqtt.erl",
"src/emqtt_cli.erl",
"src/emqtt_frame.erl",
"src/emqtt_inflight.erl",
"src/emqtt_props.erl",
"src/emqtt_quic.erl",
"src/emqtt_quic_connection.erl",
"src/emqtt_quic_stream.erl",
"src/emqtt_secret.erl",
"src/emqtt_sock.erl",
"src/emqtt_ws.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "emqtt",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
testonly = True,
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
testonly = True,
srcs = [
"src/emqtt.app.src",
"src/emqtt.erl",
"src/emqtt_cli.erl",
"src/emqtt_frame.erl",
"src/emqtt_inflight.erl",
"src/emqtt_props.erl",
"src/emqtt_quic.erl",
"src/emqtt_quic_connection.erl",
"src/emqtt_quic_stream.erl",
"src/emqtt_secret.erl",
"src/emqtt_sock.erl",
"src/emqtt_ws.erl",
],
)
filegroup(
name = "private_hdrs",
testonly = True,
srcs = glob(["src/**/*.hrl"]),
)
filegroup(
name = "public_hdrs",
testonly = True,
srcs = [
"include/emqtt.hrl",
"include/logger.hrl",
],
)
filegroup(
name = "priv",
testonly = True,
srcs = glob(["priv/**/*"]),
)
filegroup(
name = "licenses",
testonly = True,
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
testonly = True,
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
testonly = True,
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
testonly = True,
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "emqtt",
beam_files = [":beam_files"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
"@cowlib//:erlang_app",
"@getopt//:erlang_app",
"@gun//:erlang_app",
],
)
alias(
name = "emqtt",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
testonly = True,
srcs = glob(["LICENSE*"]),
)

View File

@ -1,88 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = ["src/enough.erl"],
outs = ["ebin/enough.beam"],
hdrs = ["src/enough.hrl"],
app_name = "enough",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/enough.app.src",
"src/enough.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = ["src/enough.hrl"],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "enough",
beam_files = [":beam_files"],
)
alias(
name = "enough",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,10 +0,0 @@
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)

View File

@ -1,100 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+recv_opt_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+recv_opt_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = ["src/gen_batch_server.erl"],
outs = ["ebin/gen_batch_server.beam"],
hdrs = [],
app_name = "gen_batch_server",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/gen_batch_server.app.src",
"src/gen_batch_server.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "gen_batch_server",
beam_files = [":beam_files"],
)
alias(
name = "gen_batch_server",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,116 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = ["src/getopt.erl"],
outs = ["ebin/getopt.beam"],
hdrs = [],
app_name = "getopt",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/getopt.app.src",
"src/getopt.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE.txt"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "getopt",
beam_files = [":beam_files"],
)
alias(
name = "getopt",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,143 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = ["src/gun_content_handler.erl"],
outs = ["ebin/gun_content_handler.beam"],
hdrs = [],
app_name = "gun",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/gun.erl",
"src/gun_app.erl",
"src/gun_data_h.erl",
"src/gun_http.erl",
"src/gun_http2.erl",
"src/gun_sse_h.erl",
"src/gun_sup.erl",
"src/gun_tcp.erl",
"src/gun_tls.erl",
"src/gun_ws.erl",
"src/gun_ws_h.erl",
],
outs = [
"ebin/gun.beam",
"ebin/gun_app.beam",
"ebin/gun_data_h.beam",
"ebin/gun_http.beam",
"ebin/gun_http2.beam",
"ebin/gun_sse_h.beam",
"ebin/gun_sup.beam",
"ebin/gun_tcp.beam",
"ebin/gun_tls.beam",
"ebin/gun_ws.beam",
"ebin/gun_ws_h.beam",
],
hdrs = [],
app_name = "gun",
beam = [":behaviours"],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/gun.app.src",
"src/gun.erl",
"src/gun_app.erl",
"src/gun_content_handler.erl",
"src/gun_data_h.erl",
"src/gun_http.erl",
"src/gun_http2.erl",
"src/gun_sse_h.erl",
"src/gun_sup.erl",
"src/gun_tcp.erl",
"src/gun_tls.erl",
"src/gun_ws.erl",
"src/gun_ws_h.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "gun",
beam_files = [":beam_files"],
extra_apps = ["ssl"],
deps = ["@cowlib//:erlang_app"],
)
alias(
name = "gun",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,115 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/horus.erl",
"src/horus_cover.erl",
"src/horus_utils.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "horus",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/horus.app.src",
"src/horus.erl",
"src/horus_cover.erl",
"src/horus_utils.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [
"src/horus_cover.hrl",
"src/horus_error.hrl",
"src/horus_fun.hrl",
],
)
filegroup(
name = "public_hdrs",
srcs = [
"include/horus.hrl",
],
)
filegroup(
name = "priv",
srcs = [
"priv/horus_cover_helper.erl",
],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE-Apache-2.0",
"LICENSE-MPL-2.0",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "horus",
beam_files = [":beam_files"],
extra_apps = [
"compiler",
"tools",
],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "horus",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,367 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "parse_transforms",
srcs = ["src/base/jose_base.erl"],
outs = ["ebin/jose_base.beam"],
hdrs = [
"include/jose.hrl",
"include/jose_base.hrl",
"include/jose_compat.hrl",
"include/jose_jwe.hrl",
"include/jose_jwk.hrl",
"include/jose_jws.hrl",
"include/jose_jwt.hrl",
"include/jose_public_key.hrl",
],
app_name = "jose",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/jose_block_encryptor.erl",
"src/json/jose_json.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305.erl",
"src/jwa/curve25519/jose_curve25519.erl",
"src/jwa/curve448/jose_curve448.erl",
"src/jwa/sha3/jose_sha3.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305.erl",
"src/jwe/jose_jwe.erl",
"src/jwe/jose_jwe_alg.erl",
"src/jwe/jose_jwe_enc.erl",
"src/jwk/jose_jwk.erl",
"src/jwk/jose_jwk_kty.erl",
"src/jwk/jose_jwk_oct.erl",
"src/jwk/jose_jwk_use_enc.erl",
"src/jwk/jose_jwk_use_sig.erl",
"src/jws/jose_jws.erl",
"src/jws/jose_jws_alg.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "jose",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/base/jose_base64.erl",
"src/base/jose_base64url.erl",
"src/jose.erl",
"src/jose_app.erl",
"src/jose_crypto_compat.erl",
"src/jose_public_key.erl",
"src/jose_server.erl",
"src/jose_sup.erl",
"src/json/jose_json_jason.erl",
"src/json/jose_json_jiffy.erl",
"src/json/jose_json_jsone.erl",
"src/json/jose_json_jsx.erl",
"src/json/jose_json_ojson.erl",
"src/json/jose_json_poison.erl",
"src/json/jose_json_poison_compat_encoder.erl",
"src/json/jose_json_poison_lexical_encoder.erl",
"src/json/jose_json_thoas.erl",
"src/json/jose_json_unsupported.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_crypto.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_libsodium.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_unsupported.erl",
"src/jwa/curve25519/jose_curve25519_crypto.erl",
"src/jwa/curve25519/jose_curve25519_fallback.erl",
"src/jwa/curve25519/jose_curve25519_libdecaf.erl",
"src/jwa/curve25519/jose_curve25519_libsodium.erl",
"src/jwa/curve25519/jose_curve25519_unsupported.erl",
"src/jwa/curve448/jose_curve448_crypto.erl",
"src/jwa/curve448/jose_curve448_fallback.erl",
"src/jwa/curve448/jose_curve448_libdecaf.erl",
"src/jwa/curve448/jose_curve448_unsupported.erl",
"src/jwa/jose_jwa.erl",
"src/jwa/jose_jwa_aes.erl",
"src/jwa/jose_jwa_aes_kw.erl",
"src/jwa/jose_jwa_base64url.erl",
"src/jwa/jose_jwa_bench.erl",
"src/jwa/jose_jwa_chacha20.erl",
"src/jwa/jose_jwa_chacha20_poly1305.erl",
"src/jwa/jose_jwa_concat_kdf.erl",
"src/jwa/jose_jwa_curve25519.erl",
"src/jwa/jose_jwa_curve448.erl",
"src/jwa/jose_jwa_ed25519.erl",
"src/jwa/jose_jwa_ed448.erl",
"src/jwa/jose_jwa_hchacha20.erl",
"src/jwa/jose_jwa_math.erl",
"src/jwa/jose_jwa_pkcs1.erl",
"src/jwa/jose_jwa_pkcs5.erl",
"src/jwa/jose_jwa_pkcs7.erl",
"src/jwa/jose_jwa_poly1305.erl",
"src/jwa/jose_jwa_sha3.erl",
"src/jwa/jose_jwa_unsupported.erl",
"src/jwa/jose_jwa_x25519.erl",
"src/jwa/jose_jwa_x448.erl",
"src/jwa/jose_jwa_xchacha20.erl",
"src/jwa/jose_jwa_xchacha20_poly1305.erl",
"src/jwa/sha3/jose_sha3_keccakf1600_driver.erl",
"src/jwa/sha3/jose_sha3_keccakf1600_nif.erl",
"src/jwa/sha3/jose_sha3_libdecaf.erl",
"src/jwa/sha3/jose_sha3_unsupported.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_crypto.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_libsodium.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_unsupported.erl",
"src/jwe/jose_jwe_alg_aes_kw.erl",
"src/jwe/jose_jwe_alg_c20p_kw.erl",
"src/jwe/jose_jwe_alg_dir.erl",
"src/jwe/jose_jwe_alg_ecdh_1pu.erl",
"src/jwe/jose_jwe_alg_ecdh_es.erl",
"src/jwe/jose_jwe_alg_ecdh_ss.erl",
"src/jwe/jose_jwe_alg_pbes2.erl",
"src/jwe/jose_jwe_alg_rsa.erl",
"src/jwe/jose_jwe_alg_xc20p_kw.erl",
"src/jwe/jose_jwe_enc_aes.erl",
"src/jwe/jose_jwe_enc_c20p.erl",
"src/jwe/jose_jwe_enc_xc20p.erl",
"src/jwe/jose_jwe_zip.erl",
"src/jwk/jose_jwk_der.erl",
"src/jwk/jose_jwk_kty_ec.erl",
"src/jwk/jose_jwk_kty_oct.erl",
"src/jwk/jose_jwk_kty_okp_ed25519.erl",
"src/jwk/jose_jwk_kty_okp_ed25519ph.erl",
"src/jwk/jose_jwk_kty_okp_ed448.erl",
"src/jwk/jose_jwk_kty_okp_ed448ph.erl",
"src/jwk/jose_jwk_kty_okp_x25519.erl",
"src/jwk/jose_jwk_kty_okp_x448.erl",
"src/jwk/jose_jwk_kty_rsa.erl",
"src/jwk/jose_jwk_openssh_key.erl",
"src/jwk/jose_jwk_pem.erl",
"src/jwk/jose_jwk_set.erl",
"src/jws/jose_jws_alg_ecdsa.erl",
"src/jws/jose_jws_alg_eddsa.erl",
"src/jws/jose_jws_alg_hmac.erl",
"src/jws/jose_jws_alg_none.erl",
"src/jws/jose_jws_alg_poly1305.erl",
"src/jws/jose_jws_alg_rsa_pkcs1_v1_5.erl",
"src/jws/jose_jws_alg_rsa_pss.erl",
"src/jwt/jose_jwt.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "jose",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/base/jose_base64.erl",
"src/base/jose_base64url.erl",
"src/jose.app.src",
"src/jose.erl",
"src/jose_app.erl",
"src/jose_block_encryptor.erl",
"src/jose_crypto_compat.erl",
"src/jose_public_key.erl",
"src/jose_server.erl",
"src/jose_sup.erl",
"src/json/jose_json.erl",
"src/json/jose_json_jason.erl",
"src/json/jose_json_jiffy.erl",
"src/json/jose_json_jsone.erl",
"src/json/jose_json_jsx.erl",
"src/json/jose_json_ojson.erl",
"src/json/jose_json_poison.erl",
"src/json/jose_json_poison_compat_encoder.erl",
"src/json/jose_json_poison_lexical_encoder.erl",
"src/json/jose_json_thoas.erl",
"src/json/jose_json_unsupported.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_crypto.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_libsodium.erl",
"src/jwa/chacha20_poly1305/jose_chacha20_poly1305_unsupported.erl",
"src/jwa/curve25519/jose_curve25519.erl",
"src/jwa/curve25519/jose_curve25519_crypto.erl",
"src/jwa/curve25519/jose_curve25519_fallback.erl",
"src/jwa/curve25519/jose_curve25519_libdecaf.erl",
"src/jwa/curve25519/jose_curve25519_libsodium.erl",
"src/jwa/curve25519/jose_curve25519_unsupported.erl",
"src/jwa/curve448/jose_curve448.erl",
"src/jwa/curve448/jose_curve448_crypto.erl",
"src/jwa/curve448/jose_curve448_fallback.erl",
"src/jwa/curve448/jose_curve448_libdecaf.erl",
"src/jwa/curve448/jose_curve448_unsupported.erl",
"src/jwa/jose_jwa.erl",
"src/jwa/jose_jwa_aes.erl",
"src/jwa/jose_jwa_aes_kw.erl",
"src/jwa/jose_jwa_base64url.erl",
"src/jwa/jose_jwa_bench.erl",
"src/jwa/jose_jwa_chacha20.erl",
"src/jwa/jose_jwa_chacha20_poly1305.erl",
"src/jwa/jose_jwa_concat_kdf.erl",
"src/jwa/jose_jwa_curve25519.erl",
"src/jwa/jose_jwa_curve448.erl",
"src/jwa/jose_jwa_ed25519.erl",
"src/jwa/jose_jwa_ed448.erl",
"src/jwa/jose_jwa_hchacha20.erl",
"src/jwa/jose_jwa_math.erl",
"src/jwa/jose_jwa_pkcs1.erl",
"src/jwa/jose_jwa_pkcs5.erl",
"src/jwa/jose_jwa_pkcs7.erl",
"src/jwa/jose_jwa_poly1305.erl",
"src/jwa/jose_jwa_sha3.erl",
"src/jwa/jose_jwa_unsupported.erl",
"src/jwa/jose_jwa_x25519.erl",
"src/jwa/jose_jwa_x448.erl",
"src/jwa/jose_jwa_xchacha20.erl",
"src/jwa/jose_jwa_xchacha20_poly1305.erl",
"src/jwa/sha3/jose_sha3.erl",
"src/jwa/sha3/jose_sha3_keccakf1600_driver.erl",
"src/jwa/sha3/jose_sha3_keccakf1600_nif.erl",
"src/jwa/sha3/jose_sha3_libdecaf.erl",
"src/jwa/sha3/jose_sha3_unsupported.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_crypto.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_libsodium.erl",
"src/jwa/xchacha20_poly1305/jose_xchacha20_poly1305_unsupported.erl",
"src/jwe/jose_jwe.erl",
"src/jwe/jose_jwe_alg.erl",
"src/jwe/jose_jwe_alg_aes_kw.erl",
"src/jwe/jose_jwe_alg_c20p_kw.erl",
"src/jwe/jose_jwe_alg_dir.erl",
"src/jwe/jose_jwe_alg_ecdh_1pu.erl",
"src/jwe/jose_jwe_alg_ecdh_es.erl",
"src/jwe/jose_jwe_alg_ecdh_ss.erl",
"src/jwe/jose_jwe_alg_pbes2.erl",
"src/jwe/jose_jwe_alg_rsa.erl",
"src/jwe/jose_jwe_alg_xc20p_kw.erl",
"src/jwe/jose_jwe_enc.erl",
"src/jwe/jose_jwe_enc_aes.erl",
"src/jwe/jose_jwe_enc_c20p.erl",
"src/jwe/jose_jwe_enc_xc20p.erl",
"src/jwe/jose_jwe_zip.erl",
"src/jwk/jose_jwk.erl",
"src/jwk/jose_jwk_der.erl",
"src/jwk/jose_jwk_kty.erl",
"src/jwk/jose_jwk_kty_ec.erl",
"src/jwk/jose_jwk_kty_oct.erl",
"src/jwk/jose_jwk_kty_okp_ed25519.erl",
"src/jwk/jose_jwk_kty_okp_ed25519ph.erl",
"src/jwk/jose_jwk_kty_okp_ed448.erl",
"src/jwk/jose_jwk_kty_okp_ed448ph.erl",
"src/jwk/jose_jwk_kty_okp_x25519.erl",
"src/jwk/jose_jwk_kty_okp_x448.erl",
"src/jwk/jose_jwk_kty_rsa.erl",
"src/jwk/jose_jwk_oct.erl",
"src/jwk/jose_jwk_openssh_key.erl",
"src/jwk/jose_jwk_pem.erl",
"src/jwk/jose_jwk_set.erl",
"src/jwk/jose_jwk_use_enc.erl",
"src/jwk/jose_jwk_use_sig.erl",
"src/jws/jose_jws.erl",
"src/jws/jose_jws_alg.erl",
"src/jws/jose_jws_alg_ecdsa.erl",
"src/jws/jose_jws_alg_eddsa.erl",
"src/jws/jose_jws_alg_hmac.erl",
"src/jws/jose_jws_alg_none.erl",
"src/jws/jose_jws_alg_poly1305.erl",
"src/jws/jose_jws_alg_rsa_pkcs1_v1_5.erl",
"src/jws/jose_jws_alg_rsa_pss.erl",
"src/jwt/jose_jwt.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(
name = "public_hdrs",
srcs = [
"include/jose.hrl",
"include/jose_base.hrl",
"include/jose_compat.hrl",
"include/jose_jwe.hrl",
"include/jose_jwk.hrl",
"include/jose_jws.hrl",
"include/jose_jwt.hrl",
"include/jose_public_key.hrl",
],
)
filegroup(
name = "priv",
srcs = [
"priv/.keep",
],
)
filegroup(
name = "licenses",
srcs = ["LICENSE.md"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "jose",
beam_files = [":beam_files"],
extra_apps = [
"asn1",
"crypto",
"public_key",
],
license_files = [":license_files"],
priv = [":priv"],
deps = ["@thoas//:erlang_app"],
)
alias(
name = "jose",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE.md",
],
)

View File

@ -1,10 +0,0 @@
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)

View File

@ -1,182 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/khepri_import_export.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "khepri",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/khepri.app.src",
"src/khepri.erl",
"src/khepri_adv.erl",
"src/khepri_app.erl",
"src/khepri_cluster.erl",
"src/khepri_condition.erl",
"src/khepri_event_handler.erl",
"src/khepri_evf.erl",
"src/khepri_export_erlang.erl",
"src/khepri_import_export.erl",
"src/khepri_machine.erl",
"src/khepri_machine_v0.erl",
"src/khepri_path.erl",
"src/khepri_pattern_tree.erl",
"src/khepri_payload.erl",
"src/khepri_projection.erl",
"src/khepri_sproc.erl",
"src/khepri_sup.erl",
"src/khepri_tree.erl",
"src/khepri_tx.erl",
"src/khepri_tx_adv.erl",
"src/khepri_utils.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [
"src/khepri_bang.hrl",
"src/khepri_cluster.hrl",
"src/khepri_error.hrl",
"src/khepri_evf.hrl",
"src/khepri_machine.hrl",
"src/khepri_payload.hrl",
"src/khepri_projection.hrl",
"src/khepri_ret.hrl",
"src/khepri_tree.hrl",
"src/khepri_tx.hrl",
],
)
filegroup(
name = "public_hdrs",
srcs = [
"include/khepri.hrl",
],
)
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = [
"LICENSE-Apache-2.0",
"LICENSE-MPL-2.0",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "khepri",
beam_files = [":beam_files"],
extra_apps = ["compiler"],
license_files = [":license_files"],
priv = [":priv"],
deps = [
"@horus//:erlang_app",
"@ra//:erlang_app",
"@seshat//:erlang_app",
],
)
alias(
name = "khepri",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/khepri.erl",
"src/khepri_adv.erl",
"src/khepri_app.erl",
"src/khepri_cluster.erl",
"src/khepri_condition.erl",
"src/khepri_event_handler.erl",
"src/khepri_evf.erl",
"src/khepri_export_erlang.erl",
"src/khepri_machine.erl",
"src/khepri_machine_v0.erl",
"src/khepri_path.erl",
"src/khepri_pattern_tree.erl",
"src/khepri_payload.erl",
"src/khepri_projection.erl",
"src/khepri_sproc.erl",
"src/khepri_sup.erl",
"src/khepri_tree.erl",
"src/khepri_tx.erl",
"src/khepri_tx_adv.erl",
"src/khepri_utils.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "khepri",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = [
"@horus//:erlang_app",
"@ra//:erlang_app",
"@seshat//:erlang_app",
],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE-Apache-2.0",
"LICENSE-MPL-2.0",
],
)

View File

@ -1,146 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/khepri_mnesia_migration_app.erl",
"src/khepri_mnesia_migration_sup.erl",
"src/kmm_utils.erl",
"src/m2k_cluster_sync.erl",
"src/m2k_cluster_sync_sup.erl",
"src/m2k_export.erl",
"src/m2k_subscriber.erl",
"src/m2k_table_copy.erl",
"src/m2k_table_copy_sup.erl",
"src/m2k_table_copy_sup_sup.erl",
"src/mnesia_to_khepri.erl",
"src/mnesia_to_khepri_example_converter.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "khepri_mnesia_migration",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = ["@khepri//:erlang_app"],
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/khepri_mnesia_migration.app.src",
"src/khepri_mnesia_migration_app.erl",
"src/khepri_mnesia_migration_sup.erl",
"src/kmm_utils.erl",
"src/m2k_cluster_sync.erl",
"src/m2k_cluster_sync_sup.erl",
"src/m2k_export.erl",
"src/m2k_subscriber.erl",
"src/m2k_table_copy.erl",
"src/m2k_table_copy_sup.erl",
"src/m2k_table_copy_sup_sup.erl",
"src/mnesia_to_khepri.erl",
"src/mnesia_to_khepri_example_converter.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [
"src/kmm_error.hrl",
# "src/kmm_logging.hrl", # keep
],
)
filegroup(
name = "public_hdrs",
srcs = ["src/kmm_logging.hrl"] + glob(["include/**/*.hrl"]), # keep
)
filegroup(
name = "priv",
srcs = glob(["priv/**/*"]),
)
filegroup(
name = "licenses",
srcs = [
"LICENSE-Apache-2.0",
"LICENSE-MPL-2.0",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "khepri_mnesia_migration",
beam_files = [":beam_files"],
license_files = [":license_files"],
priv = [":priv"],
deps = ["@khepri//:erlang_app"],
)
alias(
name = "khepri_mnesia_migration",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/mnesia_to_khepri_converter.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "khepri_mnesia_migration",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "license_files",
srcs = glob(["LICENSE*"]),
)

View File

@ -1,139 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
testonly = True,
srcs = [
"src/meck.erl",
"src/meck_args_matcher.erl",
"src/meck_code.erl",
"src/meck_code_gen.erl",
"src/meck_cover.erl",
"src/meck_expect.erl",
"src/meck_history.erl",
"src/meck_matcher.erl",
"src/meck_proc.erl",
"src/meck_ret_spec.erl",
"src/meck_util.erl",
],
outs = [
"ebin/meck.beam",
"ebin/meck_args_matcher.beam",
"ebin/meck_code.beam",
"ebin/meck_code_gen.beam",
"ebin/meck_cover.beam",
"ebin/meck_expect.beam",
"ebin/meck_history.beam",
"ebin/meck_matcher.beam",
"ebin/meck_proc.beam",
"ebin/meck_ret_spec.beam",
"ebin/meck_util.beam",
],
hdrs = [
"src/meck.hrl",
],
app_name = "meck",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
testonly = True,
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
testonly = True,
srcs = [
"src/meck.app.src",
"src/meck.erl",
"src/meck_args_matcher.erl",
"src/meck_code.erl",
"src/meck_code_gen.erl",
"src/meck_cover.erl",
"src/meck_expect.erl",
"src/meck_history.erl",
"src/meck_matcher.erl",
"src/meck_proc.erl",
"src/meck_ret_spec.erl",
"src/meck_util.erl",
],
)
filegroup(
name = "private_hdrs",
testonly = True,
srcs = [
"src/meck.hrl",
],
)
filegroup(
name = "public_hdrs",
testonly = True,
)
filegroup(
name = "priv",
testonly = True,
)
filegroup(
name = "licenses",
testonly = True,
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
testonly = True,
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
testonly = True,
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
testonly = True,
srcs = [":all_srcs"],
app_name = "meck",
beam_files = [":beam_files"],
extra_apps = [
"compiler",
"tools",
],
)
alias(
name = "meck",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,158 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_untyped_record",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/observer_cli.erl",
"src/observer_cli_application.erl",
"src/observer_cli_escriptize.erl",
"src/observer_cli_ets.erl",
"src/observer_cli_help.erl",
"src/observer_cli_inet.erl",
"src/observer_cli_lib.erl",
"src/observer_cli_mnesia.erl",
"src/observer_cli_plugin.erl",
"src/observer_cli_port.erl",
"src/observer_cli_process.erl",
"src/observer_cli_store.erl",
"src/observer_cli_system.erl",
],
outs = [
"ebin/observer_cli.beam",
"ebin/observer_cli_application.beam",
"ebin/observer_cli_escriptize.beam",
"ebin/observer_cli_ets.beam",
"ebin/observer_cli_help.beam",
"ebin/observer_cli_inet.beam",
"ebin/observer_cli_lib.beam",
"ebin/observer_cli_mnesia.beam",
"ebin/observer_cli_plugin.beam",
"ebin/observer_cli_port.beam",
"ebin/observer_cli_process.beam",
"ebin/observer_cli_store.beam",
"ebin/observer_cli_system.beam",
],
hdrs = ["include/observer_cli.hrl"],
app_name = "observer_cli",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/observer_cli.app.src",
"src/observer_cli.erl",
"src/observer_cli_application.erl",
"src/observer_cli_escriptize.erl",
"src/observer_cli_ets.erl",
"src/observer_cli_help.erl",
"src/observer_cli_inet.erl",
"src/observer_cli_lib.erl",
"src/observer_cli_mnesia.erl",
"src/observer_cli_plugin.erl",
"src/observer_cli_port.erl",
"src/observer_cli_process.erl",
"src/observer_cli_store.erl",
"src/observer_cli_system.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = ["include/observer_cli.hrl"],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "observer_cli",
beam_files = [":beam_files"],
deps = ["@recon//:erlang_app"],
)
alias(
name = "observer_cli",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,231 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+strict_validation",
"+warn_bif_clash",
"+warn_deprecated_function",
"+warn_export_all",
"+warn_export_vars",
"+warn_exported_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
"+warn_unused_function",
"+warn_unused_import",
"+warn_unused_record",
"+warn_unused_vars",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/prometheus_collector.erl",
"src/prometheus_format.erl",
"src/prometheus_instrumenter.erl",
"src/prometheus_metric.erl",
],
outs = [
"ebin/prometheus_collector.beam",
"ebin/prometheus_format.beam",
"ebin/prometheus_instrumenter.beam",
"ebin/prometheus_metric.beam",
],
hdrs = [
"include/prometheus.hrl",
"include/prometheus_model.hrl",
],
app_name = "prometheus",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/collectors/mnesia/prometheus_mnesia_collector.erl",
"src/collectors/vm/prometheus_vm_dist_collector.erl",
"src/collectors/vm/prometheus_vm_memory_collector.erl",
"src/collectors/vm/prometheus_vm_msacc_collector.erl",
"src/collectors/vm/prometheus_vm_statistics_collector.erl",
"src/collectors/vm/prometheus_vm_system_info_collector.erl",
"src/contrib/prometheus_http.erl",
"src/contrib/prometheus_mnesia.erl",
"src/contrib/prometheus_test_instrumenter.erl",
"src/formats/prometheus_protobuf_format.erl",
"src/formats/prometheus_text_format.erl",
"src/metrics/prometheus_boolean.erl",
"src/metrics/prometheus_counter.erl",
"src/metrics/prometheus_gauge.erl",
"src/metrics/prometheus_histogram.erl",
"src/metrics/prometheus_quantile_summary.erl",
"src/metrics/prometheus_summary.erl",
"src/model/prometheus_model.erl",
"src/model/prometheus_model_helpers.erl",
"src/prometheus.erl",
"src/prometheus_buckets.erl",
"src/prometheus_metric_spec.erl",
"src/prometheus_misc.erl",
"src/prometheus_registry.erl",
"src/prometheus_sup.erl",
"src/prometheus_time.erl",
],
outs = [
"ebin/prometheus.beam",
"ebin/prometheus_boolean.beam",
"ebin/prometheus_buckets.beam",
"ebin/prometheus_counter.beam",
"ebin/prometheus_gauge.beam",
"ebin/prometheus_histogram.beam",
"ebin/prometheus_http.beam",
"ebin/prometheus_metric_spec.beam",
"ebin/prometheus_misc.beam",
"ebin/prometheus_mnesia.beam",
"ebin/prometheus_mnesia_collector.beam",
"ebin/prometheus_model.beam",
"ebin/prometheus_model_helpers.beam",
"ebin/prometheus_protobuf_format.beam",
"ebin/prometheus_quantile_summary.beam",
"ebin/prometheus_registry.beam",
"ebin/prometheus_summary.beam",
"ebin/prometheus_sup.beam",
"ebin/prometheus_test_instrumenter.beam",
"ebin/prometheus_text_format.beam",
"ebin/prometheus_time.beam",
"ebin/prometheus_vm_dist_collector.beam",
"ebin/prometheus_vm_memory_collector.beam",
"ebin/prometheus_vm_msacc_collector.beam",
"ebin/prometheus_vm_statistics_collector.beam",
"ebin/prometheus_vm_system_info_collector.beam",
],
hdrs = [
"include/prometheus.hrl",
"include/prometheus_model.hrl",
],
app_name = "prometheus",
beam = [":behaviours"],
erlc_opts = "//:erlc_opts",
deps = ["@quantile_estimator//:erlang_app"],
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/collectors/mnesia/prometheus_mnesia_collector.erl",
"src/collectors/vm/prometheus_vm_dist_collector.erl",
"src/collectors/vm/prometheus_vm_memory_collector.erl",
"src/collectors/vm/prometheus_vm_msacc_collector.erl",
"src/collectors/vm/prometheus_vm_statistics_collector.erl",
"src/collectors/vm/prometheus_vm_system_info_collector.erl",
"src/contrib/prometheus_http.erl",
"src/contrib/prometheus_mnesia.erl",
"src/contrib/prometheus_test_instrumenter.erl",
"src/formats/prometheus_protobuf_format.erl",
"src/formats/prometheus_text_format.erl",
"src/metrics/prometheus_boolean.erl",
"src/metrics/prometheus_counter.erl",
"src/metrics/prometheus_gauge.erl",
"src/metrics/prometheus_histogram.erl",
"src/metrics/prometheus_quantile_summary.erl",
"src/metrics/prometheus_summary.erl",
"src/model/prometheus_model.erl",
"src/model/prometheus_model_helpers.erl",
"src/prometheus.app.src",
"src/prometheus.erl",
"src/prometheus_buckets.erl",
"src/prometheus_collector.erl",
"src/prometheus_format.erl",
"src/prometheus_instrumenter.erl",
"src/prometheus_metric.erl",
"src/prometheus_metric_spec.erl",
"src/prometheus_misc.erl",
"src/prometheus_registry.erl",
"src/prometheus_sup.erl",
"src/prometheus_time.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [
"include/prometheus.hrl",
"include/prometheus_model.hrl",
],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "prometheus",
beam_files = [":beam_files"],
deps = ["@quantile_estimator//:erlang_app"],
)
alias(
name = "prometheus",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,244 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+report_warnings",
"+warn_export_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_untyped_record",
"+warn_unused_import",
"+warn_unused_vars",
"+{warn_format,1}",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+report_warnings",
"+warn_export_vars",
"+warn_missing_spec",
"+warn_obsolete_guard",
"+warn_untyped_record",
"+warn_unused_import",
"+warn_unused_vars",
"+{warn_format,1}",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "parse_transforms",
testonly = True,
srcs = [
"src/vararg.erl",
],
outs = [
"ebin/vararg.beam",
],
hdrs = [
"include/proper.hrl",
"include/proper_common.hrl",
"include/proper_internal.hrl",
"include/proper_param_adts.hrl",
],
app_name = "proper",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "behaviours",
testonly = True,
srcs = [
"src/proper_target.erl",
],
outs = [
"ebin/proper_target.beam",
],
hdrs = [
"include/proper.hrl",
"include/proper_common.hrl",
"include/proper_internal.hrl",
"include/proper_param_adts.hrl",
],
app_name = "proper",
beam = [":parse_transforms"],
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
testonly = True,
srcs = [
"src/proper.erl",
"src/proper_arith.erl",
"src/proper_array.erl",
"src/proper_dict.erl",
"src/proper_erlang_abstract_code.erl",
"src/proper_fsm.erl",
"src/proper_gb_sets.erl",
"src/proper_gb_trees.erl",
"src/proper_gen.erl",
"src/proper_gen_next.erl",
"src/proper_orddict.erl",
"src/proper_ordsets.erl",
"src/proper_prop_remover.erl",
"src/proper_queue.erl",
"src/proper_sa.erl",
"src/proper_sets.erl",
"src/proper_shrink.erl",
"src/proper_statem.erl",
"src/proper_symb.erl",
"src/proper_transformer.erl",
"src/proper_types.erl",
"src/proper_typeserver.erl",
"src/proper_unicode.erl",
"src/proper_unused_imports_remover.erl",
],
outs = [
"ebin/proper.beam",
"ebin/proper_arith.beam",
"ebin/proper_array.beam",
"ebin/proper_dict.beam",
"ebin/proper_erlang_abstract_code.beam",
"ebin/proper_fsm.beam",
"ebin/proper_gb_sets.beam",
"ebin/proper_gb_trees.beam",
"ebin/proper_gen.beam",
"ebin/proper_gen_next.beam",
"ebin/proper_orddict.beam",
"ebin/proper_ordsets.beam",
"ebin/proper_prop_remover.beam",
"ebin/proper_queue.beam",
"ebin/proper_sa.beam",
"ebin/proper_sets.beam",
"ebin/proper_shrink.beam",
"ebin/proper_statem.beam",
"ebin/proper_symb.beam",
"ebin/proper_transformer.beam",
"ebin/proper_types.beam",
"ebin/proper_typeserver.beam",
"ebin/proper_unicode.beam",
"ebin/proper_unused_imports_remover.beam",
],
hdrs = [
"include/proper.hrl",
"include/proper_common.hrl",
"include/proper_internal.hrl",
"include/proper_param_adts.hrl",
],
app_name = "proper",
beam = [
":parse_transforms",
":behaviours",
],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
testonly = True,
srcs = [
":behaviours",
":other_beam",
":parse_transforms",
],
)
filegroup(
name = "srcs",
testonly = True,
srcs = [
"src/proper.app.src",
"src/proper.erl",
"src/proper_arith.erl",
"src/proper_array.erl",
"src/proper_dict.erl",
"src/proper_erlang_abstract_code.erl",
"src/proper_fsm.erl",
"src/proper_gb_sets.erl",
"src/proper_gb_trees.erl",
"src/proper_gen.erl",
"src/proper_gen_next.erl",
"src/proper_orddict.erl",
"src/proper_ordsets.erl",
"src/proper_prop_remover.erl",
"src/proper_queue.erl",
"src/proper_sa.erl",
"src/proper_sets.erl",
"src/proper_shrink.erl",
"src/proper_statem.erl",
"src/proper_symb.erl",
"src/proper_target.erl",
"src/proper_transformer.erl",
"src/proper_types.erl",
"src/proper_typeserver.erl",
"src/proper_unicode.erl",
"src/proper_unused_imports_remover.erl",
"src/vararg.erl",
],
)
filegroup(
name = "private_hdrs",
testonly = True,
)
filegroup(
name = "public_hdrs",
testonly = True,
srcs = [
"include/proper.hrl",
"include/proper_common.hrl",
"include/proper_internal.hrl",
"include/proper_param_adts.hrl",
],
)
filegroup(
name = "priv",
testonly = True,
)
filegroup(
name = "licenses",
testonly = True,
)
filegroup(
name = "public_and_private_hdrs",
testonly = True,
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
testonly = True,
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
testonly = True,
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "proper",
beam_files = [":beam_files"],
extra_apps = ["compiler"],
)
alias(
name = "proper",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,96 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/quantile.erl",
"src/quantile_estimator.erl",
],
outs = [
"ebin/quantile.beam",
"ebin/quantile_estimator.beam",
],
hdrs = ["include/quantile_estimator.hrl"],
app_name = "quantile_estimator",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/quantile.erl",
"src/quantile_estimator.app.src",
"src/quantile_estimator.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = ["include/quantile_estimator.hrl"],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = [],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "quantile_estimator",
beam_files = [":beam_files"],
)
alias(
name = "quantile_estimator",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,220 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/ra_machine.erl",
"src/ra_snapshot.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "ra",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/ra.erl",
"src/ra_app.erl",
"src/ra_aux.erl",
"src/ra_bench.erl",
"src/ra_counters.erl",
"src/ra_dbg.erl",
"src/ra_directory.erl",
"src/ra_env.erl",
"src/ra_ets_queue.erl",
"src/ra_file.erl",
"src/ra_file_handle.erl",
"src/ra_flru.erl",
"src/ra_leaderboard.erl",
"src/ra_lib.erl",
"src/ra_log.erl",
"src/ra_log_ets.erl",
"src/ra_log_meta.erl",
"src/ra_log_pre_init.erl",
"src/ra_log_read_plan.erl",
"src/ra_log_reader.erl",
"src/ra_log_segment.erl",
"src/ra_log_segment_writer.erl",
"src/ra_log_snapshot.erl",
"src/ra_log_sup.erl",
"src/ra_log_wal.erl",
"src/ra_log_wal_sup.erl",
"src/ra_lol.erl",
"src/ra_machine_ets.erl",
"src/ra_machine_simple.erl",
"src/ra_metrics_ets.erl",
"src/ra_monitors.erl",
"src/ra_mt.erl",
"src/ra_range.erl",
"src/ra_server.erl",
"src/ra_server_proc.erl",
"src/ra_server_sup.erl",
"src/ra_server_sup_sup.erl",
"src/ra_sup.erl",
"src/ra_system.erl",
"src/ra_system_recover.erl",
"src/ra_system_sup.erl",
"src/ra_systems_sup.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "ra",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
deps = [
"@gen_batch_server//:erlang_app",
],
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/ra.app.src",
"src/ra.erl",
"src/ra_app.erl",
"src/ra_aux.erl",
"src/ra_bench.erl",
"src/ra_counters.erl",
"src/ra_dbg.erl",
"src/ra_directory.erl",
"src/ra_env.erl",
"src/ra_ets_queue.erl",
"src/ra_file.erl",
"src/ra_file_handle.erl",
"src/ra_flru.erl",
"src/ra_leaderboard.erl",
"src/ra_lib.erl",
"src/ra_log.erl",
"src/ra_log_ets.erl",
"src/ra_log_meta.erl",
"src/ra_log_pre_init.erl",
"src/ra_log_read_plan.erl",
"src/ra_log_reader.erl",
"src/ra_log_segment.erl",
"src/ra_log_segment_writer.erl",
"src/ra_log_snapshot.erl",
"src/ra_log_sup.erl",
"src/ra_log_wal.erl",
"src/ra_log_wal_sup.erl",
"src/ra_lol.erl",
"src/ra_machine.erl",
"src/ra_machine_ets.erl",
"src/ra_machine_simple.erl",
"src/ra_metrics_ets.erl",
"src/ra_monitors.erl",
"src/ra_mt.erl",
"src/ra_range.erl",
"src/ra_server.erl",
"src/ra_server_proc.erl",
"src/ra_server_sup.erl",
"src/ra_server_sup_sup.erl",
"src/ra_snapshot.erl",
"src/ra_sup.erl",
"src/ra_system.erl",
"src/ra_system_recover.erl",
"src/ra_system_sup.erl",
"src/ra_systems_sup.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [
"src/ra.hrl",
"src/ra_server.hrl",
],
)
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "ra",
beam_files = [":beam_files"],
extra_apps = [
"crypto",
"sasl",
],
license_files = [":license_files"],
priv = [":priv"],
deps = [
"@aten//:erlang_app",
"@gen_batch_server//:erlang_app",
"@seshat//:erlang_app",
],
)
alias(
name = "ra",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)

View File

@ -1,139 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/ranch_transport.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "ranch",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/ranch.erl",
"src/ranch_acceptor.erl",
"src/ranch_acceptors_sup.erl",
"src/ranch_app.erl",
"src/ranch_conns_sup.erl",
"src/ranch_conns_sup_sup.erl",
"src/ranch_crc32c.erl",
"src/ranch_embedded_sup.erl",
"src/ranch_listener_sup.erl",
"src/ranch_protocol.erl",
"src/ranch_proxy_header.erl",
"src/ranch_server.erl",
"src/ranch_server_proxy.erl",
"src/ranch_ssl.erl",
"src/ranch_sup.erl",
"src/ranch_tcp.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "ranch",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/ranch.erl",
"src/ranch_acceptor.erl",
"src/ranch_acceptors_sup.erl",
"src/ranch_app.erl",
"src/ranch_conns_sup.erl",
"src/ranch_conns_sup_sup.erl",
"src/ranch_crc32c.erl",
"src/ranch_embedded_sup.erl",
"src/ranch_listener_sup.erl",
"src/ranch_protocol.erl",
"src/ranch_proxy_header.erl",
"src/ranch_server.erl",
"src/ranch_server_proxy.erl",
"src/ranch_ssl.erl",
"src/ranch_sup.erl",
"src/ranch_tcp.erl",
"src/ranch_transport.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "ranch",
app_description = "Socket acceptor pool for TCP protocols.",
app_version = "2.1.0",
app_registered = ["ranch_server"],
beam_files = [":beam_files"],
extra_apps = ["ssl"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "ranch",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,101 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/recon.erl",
"src/recon_alloc.erl",
"src/recon_lib.erl",
"src/recon_map.erl",
"src/recon_rec.erl",
"src/recon_trace.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "recon",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/recon.app.src",
"src/recon.erl",
"src/recon_alloc.erl",
"src/recon_lib.erl",
"src/recon_map.erl",
"src/recon_rec.erl",
"src/recon_trace.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "recon",
beam_files = [":beam_files"],
extra_apps = ["syntax_tools"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "recon",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,101 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}), # keep
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/redbug.erl",
"src/redbug_compiler.erl",
"src/redbug_dtop.erl",
"src/redbug_lexer.erl",
"src/redbug_parser.erl",
"src/redbug_targ.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "redbug",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/redbug.app.src",
"src/redbug.erl",
"src/redbug_compiler.erl",
"src/redbug_dtop.erl",
"src/redbug_lexer.erl",
"src/redbug_parser.erl",
"src/redbug_targ.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "redbug",
beam_files = [":beam_files"],
extra_apps = ["runtime_tools"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "redbug",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,117 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+recv_opt_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+recv_opt_info",
"+warn_export_vars",
"+warn_obsolete_guard",
"+warn_shadow_vars",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/seshat.erl",
"src/seshat_app.erl",
"src/seshat_counters_server.erl",
"src/seshat_sup.erl",
],
outs = [
"ebin/seshat.beam",
"ebin/seshat_app.beam",
"ebin/seshat_counters_server.beam",
"ebin/seshat_sup.beam",
],
hdrs = [],
app_name = "seshat",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/seshat.app.src",
"src/seshat.erl",
"src/seshat_app.erl",
"src/seshat_counters_server.erl",
"src/seshat_sup.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = [],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
app_name = "seshat",
beam_files = [":beam_files"],
extra_apps = [
"crypto",
"sasl",
],
)
alias(
name = "seshat",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,106 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/stdout_formatter.erl",
"src/stdout_formatter_paragraph.erl",
"src/stdout_formatter_table.erl",
"src/stdout_formatter_utils.erl",
],
outs = [
"ebin/stdout_formatter.beam",
"ebin/stdout_formatter_paragraph.beam",
"ebin/stdout_formatter_table.beam",
"ebin/stdout_formatter_utils.beam",
],
hdrs = ["include/stdout_formatter.hrl"],
app_name = "stdout_formatter",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/stdout_formatter.app.src",
"src/stdout_formatter.erl",
"src/stdout_formatter_paragraph.erl",
"src/stdout_formatter_table.erl",
"src/stdout_formatter_utils.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = ["include/stdout_formatter.hrl"],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "stdout_formatter",
beam_files = [":beam_files"],
)
alias(
name = "stdout_formatter",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,121 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "behaviours",
srcs = [
"src/syslog_logger.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "syslog",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/syslog.erl",
"src/syslog_error_h.erl",
"src/syslog_lager_backend.erl",
"src/syslog_lib.erl",
"src/syslog_logger_h.erl",
"src/syslog_monitor.erl",
"src/syslog_rfc3164.erl",
"src/syslog_rfc5424.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "syslog",
beam = [":behaviours"],
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [
":behaviours",
":other_beam",
],
)
filegroup(
name = "srcs",
srcs = [
"src/syslog.app.src",
"src/syslog.erl",
"src/syslog_error_h.erl",
"src/syslog_lager_backend.erl",
"src/syslog_lib.erl",
"src/syslog_logger.erl",
"src/syslog_logger_h.erl",
"src/syslog_monitor.erl",
"src/syslog_rfc3164.erl",
"src/syslog_rfc5424.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(
name = "public_hdrs",
srcs = [
"include/syslog.hrl",
],
)
filegroup(name = "priv")
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "syslog",
beam_files = [":beam_files"],
extra_apps = ["sasl"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "syslog",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,110 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/sysmon_handler_app.erl",
"src/sysmon_handler_example_handler.erl",
"src/sysmon_handler_filter.erl",
"src/sysmon_handler_sup.erl",
"src/sysmon_handler_testhandler.erl",
],
outs = [
"ebin/sysmon_handler_app.beam",
"ebin/sysmon_handler_example_handler.beam",
"ebin/sysmon_handler_filter.beam",
"ebin/sysmon_handler_sup.beam",
"ebin/sysmon_handler_testhandler.beam",
],
hdrs = ["include/sysmon_handler.hrl"],
app_name = "sysmon_handler",
beam = [],
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/sysmon_handler.app.src",
"src/sysmon_handler_app.erl",
"src/sysmon_handler_example_handler.erl",
"src/sysmon_handler_filter.erl",
"src/sysmon_handler_sup.erl",
"src/sysmon_handler_testhandler.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = [],
)
filegroup(
name = "public_hdrs",
srcs = ["include/sysmon_handler.hrl"],
)
filegroup(
name = "priv",
srcs = ["priv/sysmon_handler.schema"],
)
filegroup(
name = "licenses",
srcs = [
"LICENSE",
"LICENSE-APACHE2",
"LICENSE-MPL-RabbitMQ",
],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "sysmon_handler",
beam_files = [":beam_files"],
extra_apps = ["sasl"],
)
alias(
name = "sysmon_handler",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,121 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
"+warnings_as_errors",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
"+warnings_as_errors",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/systemd.erl",
"src/systemd_app.erl",
"src/systemd_journal_h.erl",
"src/systemd_kmsg_formatter.erl",
"src/systemd_protocol.erl",
"src/systemd_socket.erl",
"src/systemd_sup.erl",
"src/systemd_watchdog.erl",
],
outs = [
"ebin/systemd.beam",
"ebin/systemd_app.beam",
"ebin/systemd_journal_h.beam",
"ebin/systemd_kmsg_formatter.beam",
"ebin/systemd_protocol.beam",
"ebin/systemd_socket.beam",
"ebin/systemd_sup.beam",
"ebin/systemd_watchdog.beam",
],
hdrs = [
"include/systemd.hrl",
"src/systemd_internal.hrl",
],
app_name = "systemd",
beam = [],
erlc_opts = "//:erlc_opts",
deps = ["@enough//:erlang_app"],
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/systemd.app.src",
"src/systemd.erl",
"src/systemd_app.erl",
"src/systemd_journal_h.erl",
"src/systemd_kmsg_formatter.erl",
"src/systemd_protocol.erl",
"src/systemd_socket.erl",
"src/systemd_sup.erl",
"src/systemd_watchdog.erl",
],
)
filegroup(
name = "private_hdrs",
srcs = ["src/systemd_internal.hrl"],
)
filegroup(
name = "public_hdrs",
srcs = ["include/systemd.hrl"],
)
filegroup(
name = "priv",
srcs = [],
)
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "systemd",
beam_files = [":beam_files"],
deps = ["@enough//:erlang_app"],
)
alias(
name = "systemd",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

View File

@ -1,10 +0,0 @@
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)

View File

@ -1,94 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
srcs = [
"src/thoas.erl",
"src/thoas_decode.erl",
"src/thoas_encode.erl",
],
hdrs = [":public_and_private_hdrs"],
app_name = "thoas",
dest = "ebin",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
srcs = [
"src/thoas.app.src",
"src/thoas.erl",
"src/thoas_decode.erl",
"src/thoas_encode.erl",
],
)
filegroup(name = "private_hdrs")
filegroup(name = "public_hdrs")
filegroup(name = "priv")
filegroup(
name = "licenses",
srcs = ["LICENSE"],
)
filegroup(
name = "public_and_private_hdrs",
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_name = "thoas",
beam_files = [":beam_files"],
license_files = [":license_files"],
priv = [":priv"],
)
alias(
name = "thoas",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
filegroup(
name = "license_files",
srcs = [
"LICENSE",
],
)

View File

@ -1,26 +0,0 @@
load("@rules_erlang//:erlang_bytecode2.bzl", "erlc_opts")
filegroup(
name = "sources",
srcs = [
"mix.exs",
] + glob([
"LICENSE*",
"lib/**/*",
]),
visibility = ["//visibility:public"],
)
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)

View File

@ -1,15 +0,0 @@
diff --git a/lib/amqp/core.ex b/lib/amqp/core.ex
index a7302aa..abf2be6 100644
--- a/lib/amqp/core.ex
+++ b/lib/amqp/core.ex
@@ -3,6 +3,10 @@ defmodule AMQP.Core do
require Record
+ # Elixir 1.15 compiler optimizations require that we explicitly
+ # add the rabbit_common code path
+ true = :code.add_path(:filename.join(:os.getenv(~c"DEPS_DIR"), ~c"rabbit_common/ebin"))
+
Record.defrecord(
:p_basic,
:P_basic,

View File

@ -1,42 +0,0 @@
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(
":secondary_umbrella.bzl",
fetch_secondary_umbrella = "secondary_umbrella",
)
def _secondary_umbrella(_ctx):
fetch_secondary_umbrella()
secondary_umbrella = module_extension(
implementation = _secondary_umbrella,
)
def _hex(_ctx):
http_archive(
name = "hex",
sha256 = "0e3e3290d0fcbdc6bb0526b73ca174d68dcff4d53ee86015c49ad0493e39ee65",
strip_prefix = "hex-2.0.5",
urls = ["https://github.com/hexpm/hex/archive/refs/tags/v2.0.5.zip"],
build_file_content = """\
load(
"@rabbitmq-server//bazel/elixir:mix_archive_build.bzl",
"mix_archive_build",
)
mix_archive_build(
name = "archive",
srcs = [
"mix.exs",
] + glob([
"lib/**/*",
]),
out = "hex.ez",
visibility = ["//visibility:public"],
)
""",
)
hex = module_extension(
implementation = _hex,
)

View File

@ -1,36 +0,0 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
ADD_PLUGINS_DIR_BUILD_FILE = """set -euo pipefail
cat << EOF > plugins/BUILD.bazel
load("@rules_pkg//:pkg.bzl", "pkg_zip")
pkg_zip(
name = "inet_tcp_proxy_ez",
package_dir = "inet_tcp_proxy/ebin",
srcs = [
"@inet_tcp_proxy_dist//:erlang_app",
],
package_file_name = "inet_tcp_proxy-0.1.0.ez",
visibility = ["//visibility:public"],
)
filegroup(
name = "standard_plugins",
srcs = glob(["**/*"]),
visibility = ["//visibility:public"],
)
EOF
"""
def secondary_umbrella():
http_archive(
name = "rabbitmq-server-generic-unix-4.0",
build_file = "@//:BUILD.package_generic_unix",
patch_cmds = [ADD_PLUGINS_DIR_BUILD_FILE],
strip_prefix = "rabbitmq_server-4.0.0",
# This file is produced just in time by the test-mixed-versions.yaml GitHub Actions workflow.
urls = [
"https://rabbitmq-github-actions.s3.eu-west-1.amazonaws.com/secondary-umbrellas/26.1/package-generic-unix-for-mixed-version-testing-v4.0.2.tar.xz",
],
)

View File

@ -1 +0,0 @@
exports_files(["elixir_escript_main.exs"])

View File

@ -1,94 +0,0 @@
load(
"@rules_elixir//private:elixir_toolchain.bzl",
"elixir_dirs",
"erlang_dirs",
"maybe_install_erlang",
)
load(
"@rules_erlang//:erlang_app_info.bzl",
"ErlangAppInfo",
)
def _impl(ctx):
(erlang_home, _, erlang_runfiles) = erlang_dirs(ctx)
(elixir_home, elixir_runfiles) = elixir_dirs(ctx)
app_info = ctx.attr.app[ErlangAppInfo]
env = "\n".join([
"export {}={}".format(k, v)
for k, v in ctx.attr.env.items()
])
config_path = ""
if ctx.file.mix_config != None:
config_path = ctx.file.mix_config.path
command = """set -euo pipefail
{maybe_install_erlang}
if [[ "{elixir_home}" == /* ]]; then
ABS_ELIXIR_HOME="{elixir_home}"
else
ABS_ELIXIR_HOME=$PWD/{elixir_home}
fi
export OUT="{out}"
export CONFIG_PATH="{config_path}"
export APP="{app}"
export MAIN_MODULE="Elixir.{main_module}"
{env}
export PATH="{erlang_home}/bin:$PATH"
set -x
"{elixir_home}"/bin/elixir {script}
""".format(
maybe_install_erlang = maybe_install_erlang(ctx),
erlang_home = erlang_home,
elixir_home = elixir_home,
env = env,
script = ctx.file._script.path,
out = ctx.outputs.out.path,
config_path = config_path,
app = app_info.app_name,
main_module = ctx.attr.main_module,
)
inputs = depset(
direct = ctx.files._script + ctx.files.mix_config,
transitive = [
erlang_runfiles.files,
elixir_runfiles.files,
],
)
ctx.actions.run_shell(
inputs = inputs,
outputs = [ctx.outputs.out],
command = command,
mnemonic = "ELIXIR",
)
elixir_escript_main = rule(
implementation = _impl,
attrs = {
"_script": attr.label(
allow_single_file = True,
default = Label(":elixir_escript_main.exs"),
),
"app": attr.label(
providers = [ErlangAppInfo],
),
"env": attr.string_dict(),
"main_module": attr.string(),
"mix_config": attr.label(
allow_single_file = [".exs"],
),
"out": attr.output(),
},
toolchains = [
"@rules_elixir//:toolchain_type",
],
)

View File

@ -1,130 +0,0 @@
defmodule ElixirEscriptMain do
# https://github.com/elixir-lang/elixir/blob/99785cc16be096d02012ad889ca51b5045b599a4/lib/mix/lib/mix/tasks/escript.build.ex#L327
def gen_main(project, name, module, app, language) do
config_path = project[:config_path]
compile_config =
if File.regular?(config_path) do
config = Config.Reader.read!(config_path, env: Mix.env(), target: Mix.target())
Macro.escape(config)
else
[]
end
runtime_path = config_path |> Path.dirname() |> Path.join("runtime.exs")
runtime_config =
if File.regular?(runtime_path) do
File.read!(runtime_path)
end
module_body =
quote do
@spec main(OptionParser.argv()) :: any
def main(args) do
unquote(main_body_for(language, module, app, compile_config, runtime_config))
end
defp load_config(config) do
each_fun = fn {app, kw} ->
set_env_fun = fn {k, v} -> :application.set_env(app, k, v, persistent: true) end
:lists.foreach(set_env_fun, kw)
end
:lists.foreach(each_fun, config)
:ok
end
defp start_app(nil) do
:ok
end
defp start_app(app) do
case :application.ensure_all_started(app) do
{:ok, _} ->
:ok
{:error, {app, reason}} ->
formatted_error =
case :code.ensure_loaded(Application) do
{:module, Application} -> Application.format_error(reason)
{:error, _} -> :io_lib.format(~c"~p", [reason])
end
error_message = [
"ERROR! Could not start application ",
:erlang.atom_to_binary(app, :utf8),
": ",
formatted_error,
?\n
]
io_error(error_message)
:erlang.halt(1)
end
end
defp io_error(message) do
:io.put_chars(:standard_error, message)
end
end
{:module, ^name, binary, _} = Module.create(name, module_body, Macro.Env.location(__ENV__))
[{~c"#{name}.beam", binary}]
end
defp main_body_for(:elixir, module, app, compile_config, runtime_config) do
config =
if runtime_config do
quote do
runtime_config =
Config.Reader.eval!(
"config/runtime.exs",
unquote(runtime_config),
env: unquote(Mix.env()),
target: unquote(Mix.target()),
imports: :disabled
)
Config.Reader.merge(unquote(compile_config), runtime_config)
end
else
compile_config
end
quote do
case :application.ensure_all_started(:elixir) do
{:ok, _} ->
args = Enum.map(args, &List.to_string(&1))
System.argv(args)
load_config(unquote(config))
start_app(unquote(app))
Kernel.CLI.run(fn _ -> unquote(module).main(args) end)
error ->
io_error(["ERROR! Failed to start Elixir.\n", :io_lib.format(~c"error: ~p~n", [error])])
:erlang.halt(1)
end
end
end
end
output = System.get_env("OUT")
IO.puts("Will write to " <> output)
project = [
config_path: System.get_env("CONFIG_PATH", "config/config.exs"),
]
app = String.to_atom(System.get_env("APP"))
name = String.to_atom(Atom.to_string(app) <> "_escript")
module = String.to_atom(System.get_env("MAIN_MODULE"))
:application.ensure_all_started(:mix)
Mix.State.start_link(:none)
[{_, bytecode}] = ElixirEscriptMain.gen_main(project, name, module, app, :elixir)
{:ok, file} = File.open(output, [:write])
IO.binwrite(file, bytecode)
File.close(file)
IO.puts("done.")

View File

@ -1,175 +0,0 @@
load("@bazel_skylib//lib:shell.bzl", "shell")
load(
"@rules_elixir//private:elixir_toolchain.bzl",
"elixir_dirs",
"erlang_dirs",
"maybe_install_erlang",
)
load(
"@rules_erlang//:erlang_app_info.bzl",
"ErlangAppInfo",
"flat_deps",
)
load(
"@rules_erlang//:util.bzl",
"path_join",
)
load(
"@rules_erlang//private:util.bzl",
"additional_file_dest_relative_path",
"erl_libs_contents",
)
def _impl(ctx):
(erlang_home, _, erlang_runfiles) = erlang_dirs(ctx)
(elixir_home, elixir_runfiles) = elixir_dirs(ctx)
out = ctx.actions.declare_file(ctx.attr.out.name)
mix_invocation_dir = ctx.actions.declare_directory("{}_mix".format(ctx.label.name))
erl_libs_dir = ctx.label.name + "_deps"
erl_libs_files = erl_libs_contents(
ctx,
target_info = None,
headers = True,
dir = erl_libs_dir,
deps = flat_deps(ctx.attr.deps),
ez_deps = ctx.files.ez_deps,
expand_ezs = True,
)
erl_libs_path = ""
if len(erl_libs_files) > 0:
erl_libs_path = path_join(
ctx.bin_dir.path,
ctx.label.workspace_root,
ctx.label.package,
erl_libs_dir,
)
copy_srcs_commands = []
for src in ctx.attr.srcs:
for src_file in src[DefaultInfo].files.to_list():
dest = additional_file_dest_relative_path(src.label, src_file)
copy_srcs_commands.extend([
'mkdir -p "$(dirname ${{MIX_INVOCATION_DIR}}/{dest})"'.format(
dest = dest,
),
'cp {flags}"{src}" "${{MIX_INVOCATION_DIR}}/{dest}"'.format(
flags = "-r " if src_file.is_directory else "",
src = src_file.path,
dest = dest,
),
])
script = """set -euo pipefail
{maybe_install_erlang}
if [ -n "{erl_libs_path}" ]; then
export ERL_LIBS=$PWD/{erl_libs_path}
fi
if [[ "{elixir_home}" == /* ]]; then
ABS_ELIXIR_HOME="{elixir_home}"
else
ABS_ELIXIR_HOME=$PWD/{elixir_home}
fi
ABS_OUT_PATH="$PWD/{out}"
export PATH="$ABS_ELIXIR_HOME"/bin:"{erlang_home}"/bin:${{PATH}}
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
MIX_INVOCATION_DIR="{mix_invocation_dir}"
{copy_srcs_commands}
ORIGINAL_DIR=$PWD
cd "${{MIX_INVOCATION_DIR}}"
export HOME="${{PWD}}"
export MIX_ENV=prod
export ERL_COMPILER_OPTIONS=deterministic
for archive in {archives}; do
"${{ABS_ELIXIR_HOME}}"/bin/mix archive.install --force $ORIGINAL_DIR/$archive
done
if [[ -n "{erl_libs_path}" ]]; then
mkdir -p _build/${{MIX_ENV}}/lib
for dep in "$ERL_LIBS"/*; do
ln -s $dep _build/${{MIX_ENV}}/lib
done
fi
{setup}
"${{ABS_ELIXIR_HOME}}"/bin/mix archive.build \\
--no-deps-check \\
-o "${{ABS_OUT_PATH}}"
# remove symlinks from the _build directory since it
# is an unused output, and bazel does not allow them
find . -type l -delete
""".format(
maybe_install_erlang = maybe_install_erlang(ctx),
erl_libs_path = erl_libs_path,
erlang_home = erlang_home,
elixir_home = elixir_home,
mix_invocation_dir = mix_invocation_dir.path,
copy_srcs_commands = "\n".join(copy_srcs_commands),
archives = " ".join([shell.quote(a.path) for a in ctx.files.archives]),
setup = ctx.attr.setup,
out = out.path,
)
inputs = depset(
direct = ctx.files.srcs,
transitive = [
erlang_runfiles.files,
elixir_runfiles.files,
depset(ctx.files.archives),
depset(erl_libs_files),
],
)
ctx.actions.run_shell(
inputs = inputs,
outputs = [
out,
mix_invocation_dir,
],
command = script,
mnemonic = "MIX",
)
return [
DefaultInfo(
files = depset([out]),
),
]
mix_archive_build = rule(
implementation = _impl,
attrs = {
"srcs": attr.label_list(
mandatory = True,
allow_files = True,
),
"archives": attr.label_list(
allow_files = [".ez"],
),
"setup": attr.string(),
"ez_deps": attr.label_list(
allow_files = [".ez"],
),
"deps": attr.label_list(
providers = [ErlangAppInfo],
),
"out": attr.output(),
},
toolchains = [
"@rules_elixir//:toolchain_type",
],
)

View File

@ -1,67 +0,0 @@
load(
"@rules_erlang//:erlang_app_info.bzl",
"ErlangAppInfo",
"flat_deps",
)
load(
"@rules_erlang//:util.bzl",
"path_join",
)
def _impl(ctx):
ebin = ctx.actions.declare_directory(path_join(ctx.attr.app_name, "ebin"))
script = """set -euo pipefail
DEST="$(mktemp -d)"
unzip -q -d "$DEST" {archive}
cp "$DEST"/{app_name}/ebin/* {ebin}
""".format(
archive = ctx.file.archive.path,
app_name = ctx.attr.app_name,
ebin = ebin.path,
)
ctx.actions.run_shell(
inputs = ctx.files.archive,
outputs = [ebin],
command = script,
mnemonic = "MixArchiveExtract",
)
deps = flat_deps(ctx.attr.deps)
runfiles = ctx.runfiles([ebin])
for dep in ctx.attr.deps:
runfiles = runfiles.merge(dep[DefaultInfo].default_runfiles)
return [
DefaultInfo(
files = depset([ebin]),
runfiles = runfiles,
),
ErlangAppInfo(
app_name = ctx.attr.app_name,
extra_apps = ctx.attr.extra_apps,
include = [],
beam = [ebin],
priv = [],
license_files = [],
srcs = ctx.files.srcs,
deps = deps,
)
]
mix_archive_extract = rule(
implementation = _impl,
attrs = {
"app_name": attr.string(mandatory = True),
"extra_apps": attr.string_list(),
"deps": attr.label_list(providers = [ErlangAppInfo]),
"archive": attr.label(
allow_single_file = [".ez"],
),
"srcs": attr.label_list(),
},
provides = [ErlangAppInfo],
)

View File

@ -1,177 +0,0 @@
load(":ct_logdir_vars.bzl", "ct_logdir_vars")
package(
default_visibility = ["//visibility:public"],
)
ct_logdir_vars(
name = "ct_logdir_vars",
)
genrule(
name = "test-logs",
outs = ["open-test-logs.sh"],
cmd = """set -euo pipefail
cat << 'EOF' > $@
#!/usr/bin/env bash
set -euo pipefail
if [ -n "$(CT_LOGDIR)" ]; then
open "$(CT_LOGDIR)/index.html"
exit 0
fi
if [ $$# -eq 0 ]; then
echo "Usage: bazel run test-logs TEST_LABEL [shard_index]"
exit 1
fi
RELATIVE=$${1#//}
PACKAGE=$${RELATIVE%%:*}
SUITE=$${RELATIVE##*:}
OUTPUT_DIR=test.outputs
if [ $$# -gt 1 ]; then
OUTPUT_DIR=shard_$$2_of_*/test.outputs
fi
if [ ! -d "bazel-testlogs/$$PACKAGE/$$SUITE/"$$OUTPUT_DIR ]; then
echo "Test output dir not found, perhaps shard_index needed?"
echo "Usage: bazel run test-logs TEST_LABEL [shard_index]"
exit 1
fi
cd "bazel-testlogs/$$PACKAGE/$$SUITE/"$$OUTPUT_DIR
if [ -f outputs.zip ]; then
unzip -u outputs.zip
fi
set +e
open index.html
rc=$$?
set -e
if [[ $$rc -eq 3 ]]; then
# For xdg-open exit code 3 means "A required tool could not be found." That is, there is no browser.
echo "Open your browser at http://$$(hostname -s):8000/index.html"
python -m http.server 8000
fi
EOF
""",
executable = True,
toolchains = [":ct_logdir_vars"],
)
genrule(
name = "remote-test-logs",
outs = ["open-remote-test-logs.sh"],
cmd = """set -euo pipefail
cat << 'EOF' > $@
#!/usr/bin/env bash
set -euo pipefail
if [ $$# -eq 0 ]; then
echo "Usage: bazel run remote-test-logs TEST_LABEL [shard_index]"
exit 1
fi
RELATIVE=$${1#//}
PACKAGE=$${RELATIVE%%:*}
SUITE=$${RELATIVE##*:}
OUTPUT_DIR=test.outputs
if [ $$# -gt 1 ]; then
OUTPUT_DIR=shard_$$2_of_*/test.outputs
fi
TESTLOGS=$$(echo $$(bazel info output_path)/k8-*/testlogs)
if [ ! -d "$$TESTLOGS/$$PACKAGE/$$SUITE/$$OUTPUT_DIR" ]; then
echo "Test output dir not found, perhaps shard_index needed?"
echo "Usage: bazel run remote-test-logs TEST_LABEL [shard_index]"
exit 1
fi
cd "$$TESTLOGS/$$PACKAGE/$$SUITE/$$OUTPUT_DIR" && unzip -u outputs.zip
open index.html
EOF
""",
executable = True,
)
genrule(
name = "test-node-data",
outs = ["open-test-node-data.sh"],
cmd = """set -euo pipefail
cat << 'EOF' > $@
set -euo pipefail
if [ -n "$(CT_LOGDIR)" ]; then
open "$(CT_LOGDIR)/index.html"
exit 0
fi
if [ $$# -eq 0 ]; then
echo "Usage: bazel run test-node-data TEST_LABEL [shard_index]"
exit 1
fi
RELATIVE=$${1#//}
PACKAGE=$${RELATIVE%%:*}
SUITE=$${RELATIVE##*:}
OUTPUT_DIR=test.outputs
if [ $$# -gt 1 ]; then
OUTPUT_DIR=shard_$$2_of_*/test.outputs
fi
if [ ! -d "bazel-testlogs/$$PACKAGE/$$SUITE/"$$OUTPUT_DIR ]; then
echo "Test output dir not found, perhaps shard_index needed?"
echo "Usage: bazel run test-node-data TEST_LABEL [shard_index]"
exit 1
fi
cd bazel-testlogs/$$PACKAGE/$$SUITE/$$OUTPUT_DIR
if [ -f outputs.zip ]; then
unzip -u outputs.zip
fi
open index.html
open ct_run.*/deps.*/run.*/log_private
EOF
""",
executable = True,
toolchains = [":ct_logdir_vars"],
)
# NOTE: this rule may not work properly if --remote_download_minimal has been used,
# which is currently the default for remote runs
genrule(
name = "remote-test-node-data",
outs = ["open-remote-test-node-data.sh"],
cmd = """set -euo pipefail
cat << 'EOF' > $@
set -euo pipefail
if [ $$# -eq 0 ]; then
echo "Usage: bazel run remote-test-node-data TEST_LABEL [shard_index]"
exit 1
fi
RELATIVE=$${1#//}
PACKAGE=$${RELATIVE%%:*}
SUITE=$${RELATIVE##*:}
OUTPUT_DIR=test.outputs
if [ $$# -gt 1 ]; then
OUTPUT_DIR=shard_$$2_of_*/test.outputs
fi
TESTLOGS=$$(echo $$(bazel info output_path)/k8-*/testlogs)
if [ ! -d $$TESTLOGS/$$PACKAGE/$$SUITE/$$OUTPUT_DIR ]; then
echo "Test output dir not found, perhaps shard_index needed?"
echo "Usage: bazel run remote-test-node-data TEST_LABEL [shard_index]"
exit 1
fi
cd $$TESTLOGS/$$PACKAGE/$$SUITE/$$OUTPUT_DIR && unzip -u outputs.zip
open index.html
open ct_run.*/deps.*/run.*/log_private
EOF
""",
executable = True,
)

View File

@ -1,23 +0,0 @@
load(
"@bazel_skylib//rules:common_settings.bzl",
"BuildSettingInfo",
)
def _impl(ctx):
vars = {
"CT_LOGDIR": ctx.attr._ct_logdir[BuildSettingInfo].value,
}
return [platform_common.TemplateVariableInfo(vars)]
ct_logdir_vars = rule(
implementation = _impl,
attrs = {
"_ct_logdir": attr.label(
default = Label("@rules_erlang//:ct_logdir"),
),
},
provides = [
platform_common.TemplateVariableInfo,
],
)

View File

@ -1,147 +0,0 @@
load("@rules_erlang//:eunit2.bzl", "eunit")
load("@rules_erlang//:xref2.bzl", "xref")
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt")
load(
"//:rabbitmq.bzl",
"RABBITMQ_DIALYZER_OPTS",
"assert_suites",
"broker_for_integration_suites",
"rabbitmq_app",
"rabbitmq_integration_suite",
"rabbitmq_suite",
)
load(
":app.bzl",
"all_beam_files",
"all_srcs",
"all_test_beam_files",
"test_suite_beam_files",
)
APP_NAME = "amqp10_client"
APP_DESCRIPTION = "AMQP 1.0 client"
APP_MODULE = "amqp10_client_app"
APP_EXTRA_KEYS = """%% Hex.pm package informations.
{licenses, ["MPL-2.0"]},
{links, [
{"Website", "https://www.rabbitmq.com/"},
{"GitHub", "https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/amqp10_client"}
]},
{build_tools, ["make", "rebar3"]},
{files, [
"erlang.mk",
"git-revisions.txt",
"include",
"LICENSE*",
"Makefile",
"rabbitmq-components.mk",
"README",
"README.md",
"src"
]}
"""
all_beam_files(name = "all_beam_files")
all_test_beam_files(name = "all_test_beam_files")
all_srcs(name = "all_srcs")
test_suite_beam_files(name = "test_suite_beam_files")
# gazelle:erlang_app_extra_app ssl
# gazelle:erlang_app_extra_app inets
# gazelle:erlang_app_extra_app crypto
# gazelle:erlang_app_extra_app public_key
rabbitmq_app(
name = "erlang_app",
srcs = [":all_srcs"],
hdrs = [":public_hdrs"],
app_description = APP_DESCRIPTION,
app_extra_keys = APP_EXTRA_KEYS,
app_module = APP_MODULE,
app_name = APP_NAME,
beam_files = [":beam_files"],
extra_apps = [
"crypto",
"inets",
"ssl",
"public_key",
],
license_files = [":license_files"],
priv = [":priv"],
deps = [
"//deps/amqp10_common:erlang_app",
"//deps/rabbit_common:erlang_app",
"@credentials_obfuscation//:erlang_app",
"@gun//:erlang_app",
],
)
xref(
name = "xref",
target = ":erlang_app",
)
plt(
name = "deps_plt",
for_target = ":erlang_app",
ignore_warnings = True,
plt = "//:base_plt",
)
dialyze(
name = "dialyze",
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
plt = ":deps_plt",
target = ":erlang_app",
)
broker_for_integration_suites(
)
TEST_DEPS = [
"//deps/amqp10_common:erlang_app",
]
rabbitmq_suite(
name = "msg_SUITE",
deps = TEST_DEPS,
)
rabbitmq_integration_suite(
name = "system_SUITE",
size = "medium",
additional_beam = [
"test/activemq_ct_helpers.beam",
"test/mock_server.beam",
],
data = [
"@activemq//:exec_dir",
],
test_env = {
"ACTIVEMQ": "$TEST_SRCDIR/$TEST_WORKSPACE/external/activemq/bin/activemq",
},
deps = TEST_DEPS,
)
assert_suites()
alias(
name = "amqp10_client",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
eunit(
name = "eunit",
compiled_suites = [
":test_activemq_ct_helpers_beam",
":test_mock_server_beam",
],
target = ":test_erlang_app",
)

View File

@ -1,6 +1,5 @@
PROJECT = amqp10_client
PROJECT_DESCRIPTION = AMQP 1.0 client
PROJECT_MOD = amqp10_client_app
define PROJECT_APP_EXTRA_KEYS
%% Hex.pm package informations.
@ -42,17 +41,17 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk \
DEP_PLUGINS += elvis_mk
dep_elvis_mk = git https://github.com/inaka/elvis.mk.git master
include rabbitmq-components.mk
include erlang.mk
include ../../rabbitmq-components.mk
include ../../erlang.mk
HEX_TARBALL_FILES += rabbitmq-components.mk \
HEX_TARBALL_FILES += ../../rabbitmq-components.mk \
git-revisions.txt
# --------------------------------------------------------------------
# ActiveMQ for the testsuite.
# --------------------------------------------------------------------
ACTIVEMQ_VERSION := 5.18.3
ACTIVEMQ_VERSION := 6.1.7
ACTIVEMQ_URL := 'https://archive.apache.org/dist/activemq/$(ACTIVEMQ_VERSION)/apache-activemq-$(ACTIVEMQ_VERSION)-bin.tar.gz'
ACTIVEMQ := $(abspath test/system_SUITE_data/apache-activemq-$(ACTIVEMQ_VERSION)/bin/activemq)

Some files were not shown because too many files have changed in this diff Show More