Skip to content

Commit 01eed5b

Browse files
authored
Merge branch 'main' into troubleshoot-ci-flake-2
2 parents 4ec01cc + 50c095d commit 01eed5b

File tree

133 files changed

+2936
-1122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2936
-1122
lines changed

.github/workflows/test-authnz.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@ jobs:
7272
docker build -t mocha-test --target test .
7373
7474
- name: Run Suites
75-
run: |
75+
id: run-suites
76+
run: |
7677
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
77-
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
78-
${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
79-
mkdir -p /tmp/full-suite-authnz-messaging
80-
mv /tmp/selenium/* /tmp/full-suite-authnz-messaging
78+
CONF_DIR_PREFIX="$(mktemp -d)" RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
79+
${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging
80+
echo "SELENIUM_ARTIFACTS=$CONF_DIR_PREFIX" >> "$GITHUB_OUTPUT"
8181
8282
- name: Upload Test Artifacts
8383
if: always()
8484
uses: actions/[email protected]
85+
env:
86+
SELENIUM_ARTIFACTS: ${{ steps.run-suites.outputs.SELENIUM_ARTIFACTS }}
8587
with:
86-
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
88+
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
8789
path: |
88-
logs/*
89-
screens/*
90-
/tmp/selenium/*
90+
$SELENIUM_ARTIFACTS/*
9191
9292
summary-selenium:
9393
needs:

.github/workflows/test-make-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ jobs:
119119
# metadata_store: ${{ inputs.metadata_store }}
120120
# mixed_clusters: ${{ inputs.mixed_clusters }}
121121
# make_target: tests
122-
# plugin: ${{ matrix.plugin }}
122+
# plugin: ${{ matrix.plugin }}

.github/workflows/test-make-type-check.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
- rabbitmq_aws
3535
- rabbitmq_consistent_hash_exchange
3636
- rabbitmq_event_exchange
37-
- rabbitmq_federation
37+
- rabbitmq_exchange_federation
38+
- rabbitmq_federation_common
3839
- rabbitmq_federation_management
3940
- rabbitmq_federation_prometheus
4041
- rabbitmq_jms_topic_exchange
@@ -50,6 +51,7 @@ jobs:
5051
- rabbitmq_peer_discovery_k8s
5152
- rabbitmq_prelaunch
5253
- rabbitmq_prometheus
54+
- rabbitmq_queue_federation
5355
- rabbitmq_recent_history_exchange
5456
- rabbitmq_sharding
5557
- rabbitmq_shovel

.github/workflows/test-management-ui-for-pr.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,16 @@ jobs:
5959
- name: Run short UI suites on a standalone rabbitmq server
6060
run: |
6161
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
62-
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
62+
CONF_DIR_PREFIX="$(mktemp -d)" RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
6363
${SELENIUM_DIR}/run-suites.sh short-suite-management-ui
64-
65-
- name: Prepare logs for upload
66-
if: ${{ failure() && steps.tests.outcome == 'failed' }}
67-
run: |
68-
mkdir -p /tmp/short-suite
69-
mv /tmp/selenium/* /tmp/short-suite
64+
echo "SELENIUM_ARTIFACTS=$CONF_DIR_PREFIX" >> "$GITHUB_OUTPUT"
7065
7166
- name: Upload Test Artifacts
7267
if: ${{ failure() && steps.tests.outcome == 'failed' }}
7368
uses: actions/upload-artifact@v4
69+
env:
70+
SELENIUM_ARTIFACTS: ${{ steps.run-suites.outputs.SELENIUM_ARTIFACTS }}
7471
with:
7572
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
7673
path: |
77-
/tmp/short-suite
74+
$SELENIUM_ARTIFACTS/*

.github/workflows/test-management-ui.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,16 @@ jobs:
6767
id: tests
6868
run: |
6969
IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}')
70-
RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
70+
CONF_DIR_PREFIX="$(mktemp -d)" RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG \
7171
${SELENIUM_DIR}/run-suites.sh full-suite-management-ui
72-
73-
- name: Prepare logs for upload
74-
if: ${{ failure() && steps.tests.outcome == 'failed' }}
75-
run: |
76-
mkdir -p /tmp/full-suite
77-
mv -v /tmp/selenium/* /tmp/full-suite
72+
echo "SELENIUM_ARTIFACTS=$CONF_DIR_PREFIX" >> "$GITHUB_OUTPUT"
7873
7974
- name: Upload Test Artifacts
8075
if: ${{ failure() && steps.tests.outcome == 'failed' }}
8176
uses: actions/[email protected]
77+
env:
78+
SELENIUM_ARTIFACTS: ${{ steps.run-suites.outputs.SELENIUM_ARTIFACTS }}
8279
with:
8380
name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }}
8481
path: |
85-
/tmp/full-suite
82+
$SELENIUM_ARTIFACTS/*

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ elvis
4848
!/deps/rabbitmq_ct_helpers/
4949
!/deps/rabbitmq_ct_client_helpers/
5050
!/deps/rabbitmq_event_exchange/
51+
!/deps/rabbitmq_exchange_federation/
5152
!/deps/rabbitmq_federation/
53+
!/deps/rabbitmq_federation_common/
5254
!/deps/rabbitmq_federation_management/
5355
!/deps/rabbitmq_federation_prometheus/
5456
!/deps/rabbitmq_jms_topic_exchange/
@@ -62,6 +64,7 @@ elvis
6264
!/deps/rabbitmq_peer_discovery_k8s/
6365
!/deps/rabbitmq_prelaunch/
6466
!/deps/rabbitmq_prometheus/
67+
!/deps/rabbitmq_queue_federation/
6568
!/deps/rabbitmq_random_exchange/
6669
!/deps/rabbitmq_recent_history_exchange/
6770
!/deps/rabbitmq_sharding/

deps/rabbit/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ MANPAGES = $(wildcard $(DOCS_DIR)/*.[0-9])
151151
WEB_MANPAGES = $(patsubst %,%.html,$(MANPAGES))
152152
MD_MANPAGES = $(patsubst %,%.md,$(MANPAGES))
153153

154+
CT_HOOKS = rabbit_ct_hook
154155
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk
155156
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
156157

@@ -221,8 +222,6 @@ ct-fast:
221222
ct-slow:
222223
$(MAKE) ct CT_SUITES='$(SLOW_CT_SUITES)'
223224

224-
CT_OPTS += -ct_hooks rabbit_ct_hook []
225-
226225
# Parallel CT.
227226
#
228227
# @todo We must ensure that the CT_OPTS also apply to ct-master
@@ -258,7 +257,7 @@ define ct_master.erl
258257
halt(0)
259258
endef
260259

261-
PARALLEL_CT_SET_1_A = unit_cluster_formation_locking_mocks unit_cluster_formation_sort_nodes unit_collections unit_config_value_encryption unit_connection_tracking
260+
PARALLEL_CT_SET_1_A = unit_rabbit_ssl unit_cluster_formation_locking_mocks unit_cluster_formation_sort_nodes unit_collections unit_config_value_encryption unit_connection_tracking
262261
PARALLEL_CT_SET_1_B = amqp_address amqp_auth amqp_credit_api_v2 amqp_filtex amqp_dotnet amqp_jms signal_handling single_active_consumer unit_access_control_authn_authz_context_propagation unit_access_control_credential_validation unit_amqp091_content_framing unit_amqp091_server_properties unit_app_management
263262
PARALLEL_CT_SET_1_C = amqp_proxy_protocol amqpl_consumer_ack amqpl_direct_reply_to backing_queue bindings rabbit_db_maintenance rabbit_db_msup rabbit_db_policy rabbit_db_queue rabbit_db_topic_exchange rabbit_direct_reply_to_prop cluster_limit cluster_minority term_to_binary_compat_prop topic_permission transactions unicode unit_access_control
264263
PARALLEL_CT_SET_1_D = amqqueue_backward_compatibility channel_interceptor channel_operation_timeout classic_queue classic_queue_prop config_schema peer_discovery_dns peer_discovery_tmp_hidden_node per_node_limit per_user_connection_channel_limit

deps/rabbit/src/rabbit_classic_queue_index_v2.erl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
sync/1, needs_sync/1, flush/1,
2323
bounds/2, next_segment_boundary/1]).
2424

25-
%% Only used by tests
26-
-export([bounds/1]).
27-
2825
%% Used to upgrade/downgrade from/to the v1 index.
2926
-export([init_for_conversion/3]).
3027
-export([init_args/1]).
@@ -482,7 +479,7 @@ recover_index_v1_common(State0 = #qi{ queue_name = Name, dir = DirBin },
482479
{LoSeqId, HiSeqId, _} = rabbit_queue_index:bounds(V1State),
483480
%% When resuming after a crash we need to double check the messages that are both
484481
%% in the v1 and v2 index (effectively the messages below the upper bound of the
485-
%% v1 index that are about to be written to it).
482+
%% v2 index that are about to be written to it).
486483
{_, V2HiSeqId, _} = bounds(State0, undefined),
487484
SkipFun = fun
488485
(SeqId, FunState0) when SeqId < V2HiSeqId ->
@@ -1191,13 +1188,6 @@ flush_pre_publish_cache(TargetRamCount, State) ->
11911188
%% the test suite to pass. This can probably be made more accurate
11921189
%% in the future.
11931190

1194-
%% `bounds/1` is only used by tests
1195-
-spec bounds(State) ->
1196-
{non_neg_integer(), non_neg_integer(), State}
1197-
when State::state().
1198-
bounds(State) ->
1199-
bounds(State, undefined).
1200-
12011191
-spec bounds(State, non_neg_integer() | undefined) ->
12021192
{non_neg_integer(), non_neg_integer(), State}
12031193
when State::state().

deps/rabbit/src/rabbit_definitions_import_https.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ load(Proplist) ->
4949
URL = pget(url, Proplist),
5050
rabbit_log:info("Applying definitions from a remote URL"),
5151
rabbit_log:debug("HTTPS URL: ~ts", [URL]),
52-
TLSOptions = tls_options_or_default(Proplist),
52+
TLSOptions0 = tls_options_or_default(Proplist),
53+
TLSOptions = rabbit_ssl:wrap_password_opt(TLSOptions0),
5354
HTTPOptions = http_options(TLSOptions),
5455
load_from_url(URL, HTTPOptions).
5556

deps/rabbit/src/rabbit_fifo.erl

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,9 +1529,12 @@ activate_next_consumer(#?STATE{consumers = Cons0,
15291529
State = State0#?STATE{consumers = Cons,
15301530
service_queue = ServiceQueue1,
15311531
waiting_consumers = Waiting},
1532+
Effects1 = consumer_update_active_effects(State, Active,
1533+
false, waiting,
1534+
Effects0),
15321535
Effects = consumer_update_active_effects(State, Consumer,
15331536
true, single_active,
1534-
Effects0),
1537+
Effects1),
15351538
{State, Effects};
15361539
{{ActiveCKey, ?CONSUMER_PRIORITY(ActivePriority) = Active},
15371540
{_NextCKey, ?CONSUMER_PRIORITY(WaitingPriority)}}
@@ -1829,8 +1832,22 @@ complete_and_checkout(#{} = Meta, MsgIds, ConsumerKey,
18291832
Effects0, State0) ->
18301833
State1 = complete(Meta, ConsumerKey, MsgIds, Con0, State0),
18311834
%% a completion could have removed the active/quiescing consumer
1832-
{State2, Effects1} = activate_next_consumer(State1, Effects0),
1833-
checkout(Meta, State0, State2, Effects1).
1835+
Effects1 = add_active_effect(Con0, State1, Effects0),
1836+
{State2, Effects2} = activate_next_consumer(State1, Effects1),
1837+
checkout(Meta, State0, State2, Effects2).
1838+
1839+
add_active_effect(#consumer{status = quiescing} = Consumer,
1840+
#?STATE{cfg = #cfg{consumer_strategy = single_active},
1841+
consumers = Consumers} = State,
1842+
Effects) ->
1843+
case active_consumer(Consumers) of
1844+
undefined ->
1845+
consumer_update_active_effects(State, Consumer, false, waiting, Effects);
1846+
_ ->
1847+
Effects
1848+
end;
1849+
add_active_effect(_, _, Effects) ->
1850+
Effects.
18341851

18351852
cancel_consumer_effects(ConsumerId,
18361853
#?STATE{cfg = #cfg{resource = QName}},

0 commit comments

Comments
 (0)