Commit Graph

59967 Commits

Author SHA1 Message Date
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