From e006e84d6fa7107e92e0659db12adbe4e7de8fba Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Wed, 8 Mar 2023 15:21:27 +0100 Subject: [PATCH 1/3] Add OTP 25.3 to the build and CI matrix as otp-max (cherry picked from commit 3ebfa257e26f3132a980fac660e8d6d038b8a68d) (cherry picked from commit 25c30d435ff7dd17502b77964ad4d373bf0b429f) (cherry picked from commit 8a82109fcfa94ea02f55c494c19d32154e2f3a43) # Conflicts: # .bazelrc # .github/workflows/rabbitmq_peer_discovery_aws.yaml # .github/workflows/test-windows.yaml # .github/workflows/test.yaml --- .bazelrc | 17 ++++++++++++++++- .github/workflows/oci.yaml | 2 +- .../workflows/rabbitmq_peer_discovery_aws.yaml | 4 ++++ .github/workflows/test-selenium.yaml | 4 ++-- .github/workflows/test-windows.yaml | 4 ++++ .github/workflows/test.yaml | 12 ++++++++++++ .github/workflows/update-otp-patches.yaml | 8 ++++++++ MODULE.bazel | 8 ++++++++ WORKSPACE | 12 ++++++++++++ bazel/platforms/BUILD.bazel | 9 +++++++++ packaging/docker-image/BUILD.bazel | 1 + 11 files changed, 77 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index 9c7b519b28da..8ee7734351ec 100644 --- a/.bazelrc +++ b/.bazelrc @@ -45,8 +45,23 @@ build:rbe-24 --config=rbe build:rbe-24 --platforms=//bazel/platforms:erlang_linux_24_platform build:rbe-25 --config=rbe -build:rbe-25 --platforms=//bazel/platforms:erlang_linux_25_2_platform +build:rbe-25 --platforms=//bazel/platforms:erlang_linux_25_3_platform +<<<<<<< HEAD +======= +build:rbe-25_0 --config=rbe +build:rbe-25_0 --platforms=//bazel/platforms:erlang_linux_25_0_platform + +build:rbe-25_1 --config=rbe +build:rbe-25_1 --platforms=//bazel/platforms:erlang_linux_25_1_platform + +build:rbe-25_2 --config=rbe +build:rbe-25_2 --platforms=//bazel/platforms:erlang_linux_25_2_platform + +build:rbe-25_3 --config=rbe +build:rbe-25_3 --platforms=//bazel/platforms:erlang_linux_25_3_platform + +>>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) # no-op config so that --config=local does not error build:local --color=auto diff --git a/.github/workflows/oci.yaml b/.github/workflows/oci.yaml index 2169805b01d2..58ad31ffc97e 100644 --- a/.github/workflows/oci.yaml +++ b/.github/workflows/oci.yaml @@ -156,7 +156,7 @@ jobs: - image_tag_suffix: otp-min-bazel otp_version_id: 24 - image_tag_suffix: otp-max-bazel - otp_version_id: 25_2 + otp_version_id: 25_3 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/rabbitmq_peer_discovery_aws.yaml b/.github/workflows/rabbitmq_peer_discovery_aws.yaml index 0407f55f9b66..52907792abd1 100644 --- a/.github/workflows/rabbitmq_peer_discovery_aws.yaml +++ b/.github/workflows/rabbitmq_peer_discovery_aws.yaml @@ -9,8 +9,12 @@ jobs: matrix: include: - image_tag_suffix: otp-max-bazel +<<<<<<< HEAD otp_version_id: 25_2 otp_major: 25 +======= + otp_version_id: 25_3 +>>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) timeout-minutes: 45 steps: - name: CHECKOUT REPOSITORY diff --git a/.github/workflows/test-selenium.yaml b/.github/workflows/test-selenium.yaml index 2fc5066c6c27..e67682021e8b 100644 --- a/.github/workflows/test-selenium.yaml +++ b/.github/workflows/test-selenium.yaml @@ -28,11 +28,11 @@ jobs: fail-fast: false matrix: erlang_version: - - "25.2" + - "25.3" browser: - chrome include: - - erlang_version: "25.2" + - erlang_version: "25.3" elixir_version: 1.13.4 env: SELENIUM_DIR: deps/rabbitmq_management/selenium diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml index bc109aad71fb..5589c9fd9928 100644 --- a/.github/workflows/test-windows.yaml +++ b/.github/workflows/test-windows.yaml @@ -14,9 +14,13 @@ jobs: fail-fast: false matrix: include: +<<<<<<< HEAD - erlang_version: "24" elixir_version: 1.13.4 - erlang_version: "25.2" +======= + - erlang_version: "25.3" +>>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) elixir_version: 1.14.0 timeout-minutes: 120 steps: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b9cb94d8845c..ba7de305cee6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,9 +29,15 @@ jobs: strategy: fail-fast: false matrix: +<<<<<<< HEAD erlang_major: - "24" - "25" +======= + otp_version_id: + - 25_0 + - 25_3 +>>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) timeout-minutes: 120 steps: - name: CHECKOUT REPOSITORY @@ -75,9 +81,15 @@ jobs: fail-fast: false matrix: include: +<<<<<<< HEAD - erlang_version: "24" elixir_version: 1.13.4 - erlang_version: "25.2" +======= + - erlang_version: "25.0" + elixir_version: 1.14.0 + - erlang_version: "25.3" +>>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) elixir_version: 1.14.0 timeout-minutes: 60 steps: diff --git a/.github/workflows/update-otp-patches.yaml b/.github/workflows/update-otp-patches.yaml index cd10d8698b1f..d7ca6c610c59 100644 --- a/.github/workflows/update-otp-patches.yaml +++ b/.github/workflows/update-otp-patches.yaml @@ -16,6 +16,7 @@ jobs: - "25.0" - "25.1" - "25.2" + - "25.3" include: - erlang_version: "24.3" name: '24' @@ -39,6 +40,13 @@ jobs: labels: | backport-v3.11.x backport-v3.10.x + - erlang_version: "25.3" + name: '25_3' + branch: main + labels: | + backport-v3.12.x + backport-v3.11.x + backport-v3.10.x timeout-minutes: 10 steps: - name: CHECKOUT REPOSITORY diff --git a/MODULE.bazel b/MODULE.bazel index 3f7888543024..e806b581bd54 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -63,6 +63,12 @@ erlang_config.internal_erlang_from_github_release( version = "25.2.3", ) +erlang_config.internal_erlang_from_github_release( + name = "25_3", + sha256 = "85c447efc1746740df4089d75bc0e47b88d5161d7c44e9fc4c20fa33ea5d19d7", + version = "25.3", +) + erlang_config.internal_erlang_from_http_archive( name = "git_master", strip_prefix = "otp-master", @@ -106,6 +112,8 @@ register_toolchains( "@erlang_config//25_1:toolchain2", "@erlang_config//25_2:toolchain", "@erlang_config//25_2:toolchain2", + "@erlang_config//25_3:toolchain", + "@erlang_config//25_3:toolchain2", "@erlang_config//git_master:toolchain", "@erlang_config//git_master:toolchain2", "@elixir_config//external:toolchain", diff --git a/WORKSPACE b/WORKSPACE index 6c3f6cf6b8cd..cff8b34d16ff 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -83,6 +83,13 @@ http_file( urls = ["https://github.com/erlang/otp/archive/OTP-25.2.3.tar.gz"], ) +http_file( + name = "otp_src_25_3", + downloaded_file_path = "OTP-25.3.tar.gz", + sha256 = "f4fc2c5e1da56eb659003015ab80c42e50cef1129cca8c14457a522d1793498d", + urls = ["https://github.com/erlang/otp/archive/OTP-25.3.tar.gz"], +) + http_archive( name = "io_buildbuddy_buildbuddy_toolchain", sha256 = "a2a5cccec251211e2221b1587af2ce43c36d32a42f5d881737db3b546a536510", @@ -124,6 +131,11 @@ erlang_config( sha256 = "f4d9f11d67ba478a053d72e635a44722a975603fe1284063fdf38276366bc61c", version = "25.2.3", ), + internal_erlang_from_github_release( + name = "25_3", + sha256 = "85c447efc1746740df4089d75bc0e47b88d5161d7c44e9fc4c20fa33ea5d19d7", + version = "25.3", + ), internal_erlang_from_http_archive( name = "git_master", strip_prefix = "otp-master", diff --git a/bazel/platforms/BUILD.bazel b/bazel/platforms/BUILD.bazel index aca4d9a70133..9ec10da0f991 100644 --- a/bazel/platforms/BUILD.bazel +++ b/bazel/platforms/BUILD.bazel @@ -47,6 +47,15 @@ platform( parents = ["@rbe//config:platform"], ) +platform( + name = "erlang_linux_25_3_platform", + constraint_values = [ + "@erlang_config//:erlang_25_3", + "@elixir_config//:elixir_1_14", + ], + parents = ["@rbe//config:platform"], +) + platform( name = "erlang_linux_git_master_platform", constraint_values = [ diff --git a/packaging/docker-image/BUILD.bazel b/packaging/docker-image/BUILD.bazel index 7c896f221fb2..fbe721f20530 100644 --- a/packaging/docker-image/BUILD.bazel +++ b/packaging/docker-image/BUILD.bazel @@ -124,6 +124,7 @@ container_image( "@erlang_config//:erlang_25_0": ["@otp_src_25_0//file"], "@erlang_config//:erlang_25_1": ["@otp_src_25_1//file"], "@erlang_config//:erlang_25_2": ["@otp_src_25_2//file"], + "@erlang_config//:erlang_25_3": ["@otp_src_25_3//file"], }), ) From 347c95ecfe83a21537d8fb0359e8607dfd997314 Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Wed, 8 Mar 2023 17:41:38 +0100 Subject: [PATCH 2/3] Fix a dialyzer error revealed by otp 25.3 (cherry picked from commit ba9c43de16ad977a740fe39641015c24e1c8a86c) (cherry picked from commit 4d263d0a551b0613d6788d7aea572abcf5955912) (cherry picked from commit 7a00ca0e7c3a71f7f817108bda6c1ee9ad94a1cd) # Conflicts: # deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl --- deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl b/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl index 47edb0f487c5..224b83714b6e 100644 --- a/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl +++ b/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl @@ -658,8 +658,12 @@ auth_phase_1_0(Response, rabbit_core_metrics:auth_attempt_succeeded(<<>>, <<>>, amqp10), Secure = #'v1_0.sasl_challenge'{challenge = {binary, Challenge}}, ok = send_on_channel0(Sock, Secure, rabbit_amqp1_0_sasl), +<<<<<<< HEAD State#v1{connection = Connection#v1_connection{auth_state = AuthState1}}; +======= + State#v1{connection = Connection#v1_connection{auth_state = AuthState1}}; +>>>>>>> 7a00ca0e7c (Fix a dialyzer error revealed by otp 25.3) {ok, User = #user{username = Username}} -> case rabbit_access_control:check_user_loopback(Username, Sock) of ok -> From 48b51715273d130ab4266a7d1795c5641ae2f42a Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Wed, 8 Mar 2023 21:32:51 +0100 Subject: [PATCH 3/3] Fixup backport --- .bazelrc | 15 --------------- .../workflows/rabbitmq_peer_discovery_aws.yaml | 6 +----- .github/workflows/test-windows.yaml | 4 ---- .github/workflows/test.yaml | 6 ------ .../src/rabbit_amqp1_0_reader.erl | 5 ----- 5 files changed, 1 insertion(+), 35 deletions(-) diff --git a/.bazelrc b/.bazelrc index 8ee7734351ec..d105b82398d6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -47,21 +47,6 @@ build:rbe-24 --platforms=//bazel/platforms:erlang_linux_24_platform build:rbe-25 --config=rbe build:rbe-25 --platforms=//bazel/platforms:erlang_linux_25_3_platform -<<<<<<< HEAD -======= -build:rbe-25_0 --config=rbe -build:rbe-25_0 --platforms=//bazel/platforms:erlang_linux_25_0_platform - -build:rbe-25_1 --config=rbe -build:rbe-25_1 --platforms=//bazel/platforms:erlang_linux_25_1_platform - -build:rbe-25_2 --config=rbe -build:rbe-25_2 --platforms=//bazel/platforms:erlang_linux_25_2_platform - -build:rbe-25_3 --config=rbe -build:rbe-25_3 --platforms=//bazel/platforms:erlang_linux_25_3_platform - ->>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) # no-op config so that --config=local does not error build:local --color=auto diff --git a/.github/workflows/rabbitmq_peer_discovery_aws.yaml b/.github/workflows/rabbitmq_peer_discovery_aws.yaml index 52907792abd1..e40febfa64f0 100644 --- a/.github/workflows/rabbitmq_peer_discovery_aws.yaml +++ b/.github/workflows/rabbitmq_peer_discovery_aws.yaml @@ -9,12 +9,8 @@ jobs: matrix: include: - image_tag_suffix: otp-max-bazel -<<<<<<< HEAD - otp_version_id: 25_2 - otp_major: 25 -======= otp_version_id: 25_3 ->>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) + otp_major: 25 timeout-minutes: 45 steps: - name: CHECKOUT REPOSITORY diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml index 5589c9fd9928..baba7a0c1e17 100644 --- a/.github/workflows/test-windows.yaml +++ b/.github/workflows/test-windows.yaml @@ -14,13 +14,9 @@ jobs: fail-fast: false matrix: include: -<<<<<<< HEAD - erlang_version: "24" elixir_version: 1.13.4 - - erlang_version: "25.2" -======= - erlang_version: "25.3" ->>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) elixir_version: 1.14.0 timeout-minutes: 120 steps: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ba7de305cee6..4d753a279f58 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -81,15 +81,9 @@ jobs: fail-fast: false matrix: include: -<<<<<<< HEAD - erlang_version: "24" elixir_version: 1.13.4 - - erlang_version: "25.2" -======= - - erlang_version: "25.0" - elixir_version: 1.14.0 - erlang_version: "25.3" ->>>>>>> 8a82109fcf (Add OTP 25.3 to the build and CI matrix as otp-max) elixir_version: 1.14.0 timeout-minutes: 60 steps: diff --git a/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl b/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl index 224b83714b6e..7842284a6616 100644 --- a/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl +++ b/deps/rabbitmq_amqp1_0/src/rabbit_amqp1_0_reader.erl @@ -658,12 +658,7 @@ auth_phase_1_0(Response, rabbit_core_metrics:auth_attempt_succeeded(<<>>, <<>>, amqp10), Secure = #'v1_0.sasl_challenge'{challenge = {binary, Challenge}}, ok = send_on_channel0(Sock, Secure, rabbit_amqp1_0_sasl), -<<<<<<< HEAD - State#v1{connection = - Connection#v1_connection{auth_state = AuthState1}}; -======= State#v1{connection = Connection#v1_connection{auth_state = AuthState1}}; ->>>>>>> 7a00ca0e7c (Fix a dialyzer error revealed by otp 25.3) {ok, User = #user{username = Username}} -> case rabbit_access_control:check_user_loopback(Username, Sock) of ok ->