Skip to content

Commit f553775

Browse files
Merge pull request #14114 from rabbitmq/otp28
Improve Erlang/OTP 28 compatibility, use OTP 28 in the pipelines
2 parents fae336a + 5cc73d8 commit f553775

28 files changed

+295
-254
lines changed

.github/workflows/oci-make.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
# a tag of the erlang image, see https://hub.docker.com/_/erlang for available tags
2121
# also used in the setup-beam step (same tag should work for both)
2222
description: OTP version (eg. `26`, `26.2.5.6`)
23-
default: 27
23+
default: 28
2424
build_arm:
2525
description: Build for ARM64 as well?
2626
type: boolean
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
matrix:
3838
otp_version:
39-
- ${{ github.event.inputs.otp_version || '27' }}
39+
- ${{ github.event.inputs.otp_version || '28' }}
4040
runs-on: ubuntu-latest
4141
outputs:
4242
# When dependabot, or a user from a fork, creates PRs, secrets are not injected, and the OCI workflow can't push the image
@@ -76,7 +76,7 @@ jobs:
7676
fail-fast: false
7777
matrix:
7878
otp_version:
79-
- ${{ github.event.inputs.otp_version || '27' }}
79+
- ${{ github.event.inputs.otp_version || '28' }}
8080
needs: build-package-generic-unix
8181
runs-on: ubuntu-latest
8282
if: ${{ needs.build-package-generic-unix.outputs.authorized }} == 'true'

.github/workflows/peer-discovery-aws.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref_name }}
1414
cancel-in-progress: true
1515
env:
16-
OTP_VERSION: "27"
16+
OTP_VERSION: "28"
1717
jobs:
1818
peer-discovery-aws-integration-test:
1919
name: Integration Test
@@ -48,10 +48,10 @@ jobs:
4848
polling-seconds: 60
4949
- name: CONFIGURE OTP & ELIXIR
5050
if: steps.authorized.outputs.authorized == 'true'
51-
uses: erlef/setup-beam@v1.17
51+
uses: erlef/setup-beam@v1
5252
with:
5353
otp-version: ${{ env.OTP_VERSION }}
54-
elixir-version: "1.17"
54+
elixir-version: "1.18"
5555
- name: SETUP ecs-cli
5656
if: steps.authorized.outputs.authorized == 'true'
5757
env:

.github/workflows/test-authnz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@v4
4545

4646
- name: Configure OTP & Elixir
47-
uses: erlef/setup-beam@v1.17
47+
uses: erlef/setup-beam@v1
4848
with:
4949
otp-version: ${{ matrix.erlang_version }}
5050
elixir-version: ${{ matrix.elixir_version }}

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ jobs:
3333
- name: FETCH TAGS
3434
run: git fetch --tags
3535

36+
- name: EXTRACT ACTIVEMQ VERSION
37+
if: inputs.plugin == 'amqp10_client'
38+
run: |
39+
awk '/^ACTIVEMQ_VERSION/ {print $1 "=" $3}' deps/amqp10_client/Makefile >> $GITHUB_ENV
40+
3641
- name: SETUP OTP & ELIXIR
37-
uses: erlef/setup-beam@v1.17
42+
uses: erlef/setup-beam@v1
3843
with:
3944
otp-version: ${{ inputs.erlang_version }}
4045
elixir-version: ${{ inputs.elixir_version }}
@@ -99,12 +104,27 @@ jobs:
99104
docker run -d --network host --name erlang_low_version erlang:${LOW_ERLANG_VERSION} \
100105
erl -sname rabbit_fifo_prop@localhost -setcookie $(cat ~/.erlang.cookie) -noinput
101106
107+
- name: RESTORE ACTIVEMQ FROM CACHE
108+
if: inputs.plugin == 'amqp10_client'
109+
uses: actions/cache/restore@v4
110+
id: cache-activemq-restore
111+
with:
112+
path: deps/amqp10_client/test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
113+
key: activemq-${{ env.ACTIVEMQ_VERSION }}
114+
102115
- name: RUN TESTS
103116
if: inputs.plugin != 'rabbitmq_cli'
104117
run: |
105118
sudo netstat -ntp
106119
make -C deps/${{ inputs.plugin }} ${{ inputs.make_target }} RABBITMQ_METADATA_STORE=${{ inputs.metadata_store }}
107120
121+
- name: CACHE ACTIVEMQ
122+
uses: actions/cache/save@v4
123+
if: inputs.plugin == 'amqp10_client' && steps.cache-activemq-restore.outputs.cache-hit != 'true'
124+
with:
125+
path: deps/amqp10_client/test/system_SUITE_data/apache-activemq-${{ env.ACTIVEMQ_VERSION }}-bin.tar.gz
126+
key: activemq-${{ env.ACTIVEMQ_VERSION }}
127+
108128
# rabbitmq_cli needs a correct broker version for two of its tests.
109129
# But setting PROJECT_VERSION makes other plugins fail.
110130
- name: RUN TESTS (rabbitmq_cli)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
plugin:
1818
# These are using plugin-specific test jobs.
1919
- rabbit
20-
- rabbitmq_mqtt
20+
# - rabbitmq_mqtt # disabled due to Elixir 1.18 JSON conficts
2121
- rabbitmq_peer_discovery_aws
2222
# These are from the test-plugin test job.
2323
- amqp10_client
@@ -57,14 +57,14 @@ jobs:
5757
- rabbitmq_shovel
5858
- rabbitmq_shovel_management
5959
- rabbitmq_shovel_prometheus
60-
- rabbitmq_stomp
61-
- rabbitmq_stream
60+
# - rabbitmq_stomp # disabled due to Elixir 1.18 JSON conficts
61+
# - rabbitmq_stream # disabled due to Elixir 1.18 JSON conficts
6262
- rabbitmq_stream_common
6363
- rabbitmq_stream_management
6464
- rabbitmq_tracing
6565
- rabbitmq_trust_store
6666
- rabbitmq_web_dispatch
67-
- rabbitmq_web_mqtt
67+
# - rabbitmq_web_mqtt # disabled due to Elixir 1.18 JSON conficts
6868
- rabbitmq_web_stomp
6969
# This one we do not want to run tests so no corresponding test job.
7070
- rabbitmq_ct_helpers

.github/workflows/test-make.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323
erlang_version:
2424
- '26'
2525
- '27'
26+
- '28'
2627
elixir_version:
27-
- '1.17'
28+
- '1.18'
2829
# @todo Add macOS and Windows.
2930
runs-on: ubuntu-latest
3031
timeout-minutes: 60
@@ -36,7 +37,7 @@ jobs:
3637
run: git fetch --tags
3738

3839
- name: SETUP OTP & ELIXIR
39-
uses: erlef/setup-beam@v1.17
40+
uses: erlef/setup-beam@v1.19
4041
with:
4142
otp-version: ${{ matrix.erlang_version }}
4243
elixir-version: ${{ matrix.elixir_version }}
@@ -62,9 +63,9 @@ jobs:
6263
fail-fast: false
6364
matrix:
6465
erlang_version:
65-
- '27'
66+
- '28'
6667
elixir_version:
67-
- '1.17'
68+
- '1.18'
6869
metadata_store:
6970
- mnesia
7071
- khepri
@@ -81,9 +82,9 @@ jobs:
8182
fail-fast: false
8283
matrix:
8384
erlang_version:
84-
- '27'
85+
- '28'
8586
elixir_version:
86-
- '1.17'
87+
- '1.18'
8788
metadata_store:
8889
- mnesia
8990
- khepri
@@ -100,9 +101,9 @@ jobs:
100101
fail-fast: false
101102
matrix:
102103
erlang_version: # Latest OTP
103-
- '27'
104+
- '28'
104105
elixir_version: # Latest Elixir
105-
- '1.17'
106+
- '1.18'
106107
uses: ./.github/workflows/test-make-type-check.yaml
107108
with:
108109
erlang_version: ${{ matrix.erlang_version }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v4
3333

3434
- name: Configure OTP & Elixir
35-
uses: erlef/setup-beam@v1.17
35+
uses: erlef/setup-beam@v1
3636
with:
3737
otp-version: ${{ matrix.erlang_version }}
3838
elixir-version: ${{ matrix.elixir_version }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/checkout@v4
3737

3838
- name: Configure OTP & Elixir
39-
uses: erlef/setup-beam@v1.17
39+
uses: erlef/setup-beam@v1
4040
with:
4141
otp-version: ${{ matrix.erlang_version }}
4242
elixir-version: ${{ matrix.elixir_version }}

deps/rabbit/src/rabbit_networking.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,13 +610,13 @@ ranch_handshake(Ref) ->
610610
tune_buffer_size(Sock, dynamic_buffer) ->
611611
case rabbit_net:setopts(Sock, [{buffer, 128}]) of
612612
ok -> ok;
613-
{error, _} -> rabbit_net:fast_close(Sock),
613+
{error, _} -> _ = rabbit_net:fast_close(Sock),
614614
exit(normal)
615615
end;
616616
tune_buffer_size(Sock, static_buffer) ->
617617
case tune_buffer_size_static(Sock) of
618618
ok -> ok;
619-
{error, _} -> rabbit_net:fast_close(Sock),
619+
{error, _} -> _ = rabbit_net:fast_close(Sock),
620620
exit(normal)
621621
end.
622622

deps/rabbit/src/rabbit_reader.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ socket_op(Sock, Fun) ->
275275
case Fun(Sock) of
276276
{ok, Res} -> Res;
277277
{error, Reason} -> socket_error(Reason),
278-
rabbit_net:fast_close(RealSocket),
278+
_ = rabbit_net:fast_close(RealSocket),
279279
exit(normal)
280280
end.
281281

@@ -287,10 +287,10 @@ start_connection(Parent, HelperSups, RanchRef, Deb, Sock) ->
287287
RealSocket = rabbit_net:unwrap_socket(Sock),
288288
Name = case rabbit_net:connection_string(Sock, inbound) of
289289
{ok, Str} -> list_to_binary(Str);
290-
{error, enotconn} -> rabbit_net:fast_close(RealSocket),
290+
{error, enotconn} -> _ = rabbit_net:fast_close(RealSocket),
291291
exit(normal);
292292
{error, Reason} -> socket_error(Reason),
293-
rabbit_net:fast_close(RealSocket),
293+
_ = rabbit_net:fast_close(RealSocket),
294294
exit(normal)
295295
end,
296296
{ok, HandshakeTimeout} = application:get_env(rabbit, handshake_timeout),
@@ -364,7 +364,7 @@ start_connection(Parent, HelperSups, RanchRef, Deb, Sock) ->
364364
%% We don't call gen_tcp:close/1 here since it waits for
365365
%% pending output to be sent, which results in unnecessary
366366
%% delays.
367-
rabbit_net:fast_close(RealSocket),
367+
_ = rabbit_net:fast_close(RealSocket),
368368
rabbit_networking:unregister_connection(self()),
369369
rabbit_core_metrics:connection_closed(self()),
370370
ClientProperties = case get(client_properties) of

0 commit comments

Comments
 (0)