Skip to content

Commit 89f668a

Browse files
Avoid secondary umbrella archive collisions in actions (backport #8653) (#8669)
* Avoid secondary umbrella archive collisions in actions (#8653) * Store secondary umbrella archives used in mixed version tests in a path which implies the erlang version used * Infer the secondary umbrella otp version from the url This avoids having two copies that need to be kept in sync (cherry picked from commit 464182a) # Conflicts: # .github/workflows/test-mixed-versions.yaml * Fixup backport conflicts --------- Co-authored-by: Rin Kuryloski <[email protected]>
1 parent d288287 commit 89f668a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/test-mixed-versions.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
ensure-mixed-version-archive:
3333
name: Prepare Artifacts
3434
runs-on: ubuntu-20.04
35-
env:
36-
# otp-min
37-
otp_version_id: 25_0
3835
steps:
3936
- name: CHECKOUT REPOSITORY
4037
uses: actions/checkout@v3
@@ -60,9 +57,13 @@ jobs:
6057
fi
6158
echo "exists=${exists}" | tee $GITHUB_ENV
6259
60+
OTP_VERSION_ID=${ARCHIVE_URL#*secondary-umbrellas/rbe-}
61+
OTP_VERSION_ID=${OTP_VERSION_ID%*/package-generic-unix-for-mixed-version-testing-v*.tar.xz}
62+
echo "otp_version_id=${OTP_VERSION_ID}" | tee -a $GITHUB_OUTPUT
63+
6364
VERSION=${ARCHIVE_URL#*package-generic-unix-for-mixed-version-testing-v}
6465
VERSION=${VERSION%*.tar.xz}
65-
echo "version=${VERSION}" | tee $GITHUB_OUTPUT
66+
echo "version=${VERSION}" | tee -a $GITHUB_OUTPUT
6667
- name: CHECKOUT REPOSITORY (MIXED VERSION)
6768
if: env.exists != 'true'
6869
uses: actions/checkout@v3
@@ -97,15 +98,15 @@ jobs:
9798
9899
sed -i"_orig" -E "/APP_VERSION/ s/3\.[0-9]+\.[0-9]+/${{ steps.check.outputs.version }}/" rabbitmq.bzl
99100
bazelisk build :package-generic-unix \
100-
--config=rbe-${{ env.otp_version_id }} \
101+
--config=rbe-${{ steps.check.outputs.otp_version_id }} \
101102
--test_build \
102103
--verbose_failures
103104
104105
OUTPUT_DIR=${{ github.workspace }}/output
105-
mkdir ${OUTPUT_DIR}
106+
mkdir -p ${OUTPUT_DIR}/rbe-${{ steps.check.outputs.otp_version_id }}
106107
cp \
107108
bazel-bin/package-generic-unix.tar.xz \
108-
${OUTPUT_DIR}/package-generic-unix-for-mixed-version-testing-v${{ steps.check.outputs.version }}.tar.xz
109+
${OUTPUT_DIR}/rbe-${{ steps.check.outputs.otp_version_id }}/package-generic-unix-for-mixed-version-testing-v${{ steps.check.outputs.version }}.tar.xz
109110
- name: UPLOAD THE ARCHIVE TO S3
110111
if: env.exists != 'true'
111112
uses: jakejarvis/[email protected]

bazel/bzlmod/secondary_umbrella.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def secondary_umbrella():
3131
strip_prefix = "rabbitmq_server-3.11.18",
3232
# This file is produced just in time by the test-mixed-versions.yaml GitHub Actions workflow.
3333
urls = [
34-
"https://rabbitmq-github-actions.s3.eu-west-1.amazonaws.com/secondary-umbrellas/package-generic-unix-for-mixed-version-testing-v3.11.18.tar.xz",
34+
"https://rabbitmq-github-actions.s3.eu-west-1.amazonaws.com/secondary-umbrellas/rbe-25_0/package-generic-unix-for-mixed-version-testing-v3.11.18.tar.xz",
3535
],
3636
)

0 commit comments

Comments
 (0)