Commit Graph

54708 Commits

Author SHA1 Message Date
Michal Kuratczyk 4a4285a25e
OCI updates: bump OpenSSL, remove outdated/unused Dockerfile (#9898)
* Remove unused and outdated Dockerfile

check BUILD.bazel for how the image is built

* Update OpenSSL from 3.1.1 to 3.1.4
2023-11-08 12:56:29 +01:00
David Ansari e99aa68ea4 Fix coverage
Dependency horus broke coverage on `main` branch.

After this commit, on `main` branch in rabbitmq-server root
directory, both show coverage:

1.
```
make -C deps/rabbitmq_mqtt ct-auth t=[v5,limit]:vhost_queue_limit FULL=1 COVER=1
open deps/rabbitmq_mqtt/logs/index.html
```

2.
```
bazel coverage //deps/rabbitmq_mqtt:auth_SUITE -t- --test_sharding_strategy=disabled --test_env FOCUS="-group [v5,limit] -case vhost_queue_limit"
genhtml --output genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat"
open genhtml/index.html
```
where `genhtml` is
https://github.com/linux-test-project/lcov/blob/master/bin/genhtml

Prior to this commit, coverage was broken with both Bazel and Erlang.mk:

On main - below logs are printed in different outputs:
First:
```
*** CT 2023-11-07 16:40:04.959 *** COVER INFO🔗
Adding nodes to cover test: ['rmq-ct-reader_SUITE-1-21000@localhost']
```

followed by
```
Could not start cover on 'rmq-ct-reader_SUITE-1-21000@localhost': {error,
                                                                   {already_started,
                                                                    <20798.286.0>}}
```

followed by
```
*** CT 2023-11-07 16:40:04.960 *** COVER INFO🔗
Successfully added nodes to cover test: []
```

followed by
```
Error in process <0.202.0> on node ct_rabbitmq_mqtt@nuc with exit value:
{{badmatch,{ok,[]}},
 [{rabbit_ct_broker_helpers,'-cover_add_node/1-fun-0-',1,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,2211}]},
  {rabbit_ct_broker_helpers,query_node,2,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,824}]},
  {rabbit_ct_broker_helpers,run_node_steps,4,
                            [{file,"rabbit_ct_broker_helpers.erl"},
                             {line,447}]},
  {rabbit_ct_broker_helpers,start_rabbitmq_node,4,
                            [{file,"rabbit_ct_broker_helpers.erl"},
```

It's also worth mentioning that
`make run-broker`
on v3.12.x:
```
  Starting broker... completed with 36 plugins.
1> whereis(cover_server).
undefined
```
but on main:
```
  Starting broker... completed with 36 plugins.
1> whereis(cover_server).
<0.295.0>
```
So, process `cover_server` runs on main in non test code.
2023-11-08 10:49:03 +01:00
Michael Klishin e52772057c
Merge pull request #9874 from rabbitmq/opt-mgmt-queue-listings
Optimise HTTP API /queues endpoint
2023-11-07 14:30:42 -05:00
Michael Klishin f109d73a3a
Merge pull request #9891 from rabbitmq/dependabot/maven/deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests
2023-11-07 13:59:29 -05:00
dependabot[bot] 9e963c97ef
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.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:51:41 +00:00
Michael Klishin b54ec8d04a
Merge pull request #9889 from rabbitmq/dependabot/maven/deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data
2023-11-07 13:36:23 -05:00
Michael Klishin 4e0df85d30
Merge pull request #9887 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2023-11-07 13:36:10 -05:00
Michael Klishin 07cac5e8ba
Merge pull request #9886 from rabbitmq/dependabot/maven/deps/rabbitmq_stream_management/test/http_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.2.2
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.1 to 3.2.2 in /deps/rabbitmq_stream_management/test/http_SUITE_data
2023-11-07 13:30:53 -05:00
dependabot[bot] c3676c6c79
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.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:30:48 +00:00
dependabot[bot] 37acb08feb
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.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:25:28 +00:00
dependabot[bot] d9c1406f62
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.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-07 18:14:33 +00:00
Karl Nilsson baff660ab4 use right dummy type 2023-11-07 11:53:57 +00:00
David Ansari 5b18e9d982 Avoid warning of unhandled message
Prior to this commit:
1. Start RabbitMQ with MQTT plugin enabled.
2.
```
rabbitmq-diagnostics consume_event_stream
^C
```
3. The logs will print the following warning:
```
[warning] <0.570.0> ** Undefined handle_info in rabbit_mqtt_internal_event_handler
[warning] <0.570.0> ** Unhandled message: {'DOWN',#Ref<0.2410135134.1846280193.145044>,process,
[warning] <0.570.0>                               <52723.100.0>,noconnection}
[warning] <0.570.0>
```

This is because rabbit_event_consumer:init/1 monitors the CLI process.

Any rabbit_event handler should therefore implement handle_info/2.

It's similar to what's described in the gen_event docs about
add_sup_handler/3:
> Any event handler attached to an event manager which in turn has a
> supervised handler should expect callbacks of the shape
> Module:handle_info({'EXIT', Pid, Reason}, State).
2023-11-07 12:33:02 +01:00
Karl Nilsson ff12d3b6b4 HTTP API /queues optimise resource_exists
There is no need to list all queues to check if the vhost
exists.
2023-11-07 11:27:11 +00:00
Karl Nilsson 9cf6454973 Expose rabbit_quorum_queue:infos/2
To allow callers to specify a subset of fields they'd like.
2023-11-07 09:20:52 +00:00
Karl Nilsson d77f937ff4 tweak 2023-11-07 08:48:57 +00:00
Arnaud Cogoluègnes 1ada0fd97f
Merge pull request #9883 from rabbitmq/dependabot/maven/deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests/main/org.junit.jupiter-junit-jupiter-engine-5.10.1
Bump org.junit.jupiter:junit-jupiter-engine from 5.10.0 to 5.10.1 in /deps/rabbitmq_amqp1_0/test/system_SUITE_data/java-tests
2023-11-07 09:02:16 +01:00
Michael Klishin 9eecc15737
Merge pull request #9882 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.junit.jupiter-junit-jupiter-5.10.1
Bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2023-11-06 14:14:12 -05:00
Michael Klishin 1e82765524
Merge pull request #9881 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/org.junit.jupiter-junit-jupiter-params-5.10.1
Bump org.junit.jupiter:junit-jupiter-params from 5.10.0 to 5.10.1 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot
2023-11-06 14:14:02 -05:00
dependabot[bot] 4cbe61362d
Bump org.junit.jupiter:junit-jupiter-engine
Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:57:18 +00:00
dependabot[bot] 0664b7ec7b
Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:46:05 +00:00
dependabot[bot] 818d68695f
Bump org.junit.jupiter:junit-jupiter-params
Bumps [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 18:41:57 +00:00
Karl Nilsson c2cd60b18d Optimise mgmt HTTP API /queues endpoint
Listing queues with the HTTP API when there are many (1000s) of
quorum queues could be excessively slow compared to the same scenario
with classic queues.

This optimises various aspects of HTTP API queue listings.
For QQs it removes the expensive cluster wide rpcs used to get the
"online" status of each quorum queue. This was previously done _before_
paging and thus would perform a cluster-wide query for _each_ quorum queue in
the vhost/system. This accounted for most of the slowness compared to
classic queues.

Secondly the query to separate the running from the down queues
consisted of two separate queries that later were combined when a single
query would have sufficed.

This commit also includes a variety of other improvements and minor
fixes discovered during testing and optimisation.

MINOR BREAKING CHANGE: quorum queues would previously only display one
of two states: running or down. Now there is a new state called minority
which is emitted when the queue has at least one member running but
cannot commit entries due to lack of quorum.

Also the quorum queue may transiently enter the down state when a node
goes down and before its elected a new leader.
2023-11-06 15:34:26 +00:00
Rin Kuryloski ac6301e27e
Merge pull request #9877 from rabbitmq/update-user-bazelrc-template
Adjust strategy flags for bazel
2023-11-06 11:14:43 +01:00
Rin Kuryloski 47566e418e Adjust strategy flags for bazel
With this adjustment, more actions will use the sandbox, which may
help with an error relating to a missing `rabbit.hrl` that could occur
when building the cli or running its tests

Since this adjusts the user-template.bazelrc, everyone should likely
update their own user.bazelrc accordingly
2023-11-06 10:08:24 +01:00
David Ansari 552775ead9 Fix dialyzer in OTP 25 2023-11-03 14:57:05 +01:00
Michael Klishin fcb4d95d80
Merge pull request #9870 from rabbitmq/fix-shovel-credit
Fix error insufficient_credit for AMQP 1.0 shovel
2023-11-03 09:19:37 -04:00
Rin Kuryloski b2d410b893 Add .mailmap file 2023-11-03 13:17:30 +01:00
David Ansari a6996ab1bc Fix error insufficient_credit for AMQP 1.0 shovel
WHY:

Shovelling from RabbitMQ to Azure Service Bus and Azure Event Hub fails.

Reported in
https://discord.com/channels/1092487794984755311/1092487794984755314/1169894510743011430

Reproduction steps:
1. Follow https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-integrate-with-rabbitmq
2. Publish messages to RabbitMQ:
```
java -jar target/perf-test.jar -x 1 -y 0 -u azure -p -C 100000 -s 1 -c 100000
```

Prior to this commit, after a few seconds and after around 20k messages
arrived in Azure, RabbitMQ errored and logged:
```
{function_clause,
    [{amqp10_client_connection,close_sent,
         [info,
          {'EXIT',<0.949.0>,
              {{badmatch,{error,insufficient_credit}},
               [{rabbit_amqp10_shovel,forward,4,
                    [{file,"rabbit_amqp10_shovel.erl"},
                     {line,334}]},
                {rabbit_shovel_worker,handle_info,2,
                    [{file,"rabbit_shovel_worker.erl"},
                     {line,101}]},
                {gen_server2,handle_msg,2,
                    [{file,"gen_server2.erl"},{line,1056}]},
                {proc_lib,init_p_do_apply,3,
                    [{file,"proc_lib.erl"},{line,241}]}]}},
```

After this commit, all 100k messages get shovelled to Azure Service Bus.

HOW:

1. Fix link credit accounting in Erlang AMQP 1.0 client library. For each
message being published, link credit must be decreased by 1 instead of
being increased by 1.

2. If the shovel plugin runs out of credits, it must wait until the
   receiver (Azure Service Bus) grants more credits to RabbitMQ.

Note that the solution in this commit is rather a naive quick fix for one
obvious bug. AMQP 1.0 integration between RabbitMQ and Azure Service Bus is
not tested and not guaranteed at this point in time.
More work will be needed in the future, some work is done as part of
https://github.com/rabbitmq/rabbitmq-server/pull/9022
2023-11-03 12:43:49 +01:00
David Ansari d1940c997e Fix Khepri flake
Previously, test pubsub was flaky
```
{shared_SUITE,pubsub,766}
{test_case_failed,missing m1}
```
because the binding wasn't present yet on node 0 when publishing to node
0.
2023-11-03 09:52:53 +01:00
Michael Davis 766f7a25ad
Fix a small typo in the 3.13.0 release notes 2023-11-02 15:21:32 -04:00
Michael Klishin e2a574eadb
Another 3.13 release notes update 2023-11-02 15:19:50 -04:00
Michael Klishin 96309b0fc9
3.13 compat differences: document a consistency model change with Khepri 2023-11-02 15:06:39 -04:00
Michael Klishin 2197324033
Merge pull request #9865 from rabbitmq/use-rules_erlang-3.14.0
Use rules_erlang 3.14.0
2023-11-02 14:13:01 -04:00
David Ansari 75e777b833 Provide more debug output for flaky test
In
https://github.com/rabbitmq/rabbitmq-server/actions/runs/6735035912/job/18308551274?pr=9865
test
```
bazel test //deps/rabbitmq_mqtt:v5_SUITE -t- --test_sharding_strategy=disabled \
    --test_env FOCUS="-group [mqtt,cluster_size_1] -case will_delay_equals_session_expiry" \
    --test_env RABBITMQ_METADATA_STORE=mnesia --config=rbe-26 --runs_per_test=100
```
seems to flake.
2023-11-02 18:40:38 +01:00
Jean-Sébastien Pédron be8ccde945
Merge pull request #9863 from rabbitmq/use-ra-key_metrics-in-rabbit_khepri
rabbit_khepri: Use `ra:key_metrics/1` instead of querying the internal state
2023-11-02 17:34:13 +01:00
Rin Kuryloski 49f2da63c2 Use rules_erlang 3.14.0
This version detects major version mismatches in transient
dependencies

In this case, it will notice if, for instance, ra and osiris ask for
different major versions of seshat
2023-11-02 16:50:10 +01:00
Jean-Sébastien Pédron 9d4a53380e
rabbit_khepri: Use `ra:key_metrics/1` instead of querying the internal state
[Why]
`rabbit_khepri` relied on undocumented internals of Ra. This made this
code very fragile and not future-proof at all.

[How]
Ra exposes a new `ra:key_metrics/1` API which fullfills the need. This
patch uses it.

At a consequence, we can get rid of the Dialyzer directives to turn off
some warnings.
2023-11-02 16:39:44 +01:00
Michael Klishin 3d8945fbb0
Merge pull request #9820 from dukex/improve-login-exp
Redirect user back to landing page
2023-11-01 16:33:57 -04:00
Michael Klishin d09c0e635e
Merge pull request #9846 from johanrhodin/patch-12
Update RabbitMQ-Overview.json
2023-11-01 16:30:56 -04:00
Johan Rhodin 0b2a94c1ec
Update RabbitMQ-Overview.json
Global counters for producers added in https://github.com/rabbitmq/rabbitmq-server/pull/3127 but never made it to this dashboard
2023-11-01 13:23:41 -05:00
Michael Klishin eef94c7dde
Merge pull request #9843 from rabbitmq/ik-remove-poodle-check
Remove POODLE check
2023-11-01 09:36:48 -04:00
Emerson Almeida 9c87e1902d remove test to idp-initiated 2023-11-01 10:23:02 -03:00
Emerson Almeida 64ded4632d make the baseUrl equal when run with prefix 2023-11-01 09:52:27 -03:00
Michael Klishin 9bab2f255c
Pass Dialyzer 2023-11-01 06:48:36 -04:00
Iliia Khaprov c577e04b73 Remove POODLE check, we are in the future 2023-11-01 10:53:27 +01:00
Iliia Khaprov 728dd57ffc Use application:get_env/3 2023-11-01 10:53:05 +01:00
Michael Klishin 4eda2a810d
Merge pull request #9841 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/kotlin.version-1.9.20
Bump kotlin.version from 1.9.10 to 1.9.20 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2023-10-31 15:02:29 -04:00
dependabot[bot] c73dfc6ca2
Bump kotlin.version
Bumps `kotlin.version` from 1.9.10 to 1.9.20.

Updates `org.jetbrains.kotlin:kotlin-test` from 1.9.10 to 1.9.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/commits)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 1.9.10 to 1.9.20

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 18:58:51 +00:00
Johan Rhodin 8887b7d8ba Update 3.12.8.md
Fix typo

(cherry picked from commit d1ee7d8aa5)
2023-10-31 12:36:43 -04:00