Commit Graph

59444 Commits

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