Skip to content

Commit a6874e3

Browse files
authored
Turn off BuildBuddy integration (#11343)
Builds now execute on the github actions workers, using Google Cloud Storage (GCS) as a cache
1 parent 730d913 commit a6874e3

File tree

16 files changed

+2917
-729
lines changed

16 files changed

+2917
-729
lines changed

.bazelrc

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -15,70 +15,6 @@ build --test_timeout=7200
1515

1616
build --combined_report=lcov
1717

18-
build:buildbuddy --bes_results_url=https://app.buildbuddy.io/invocation/
19-
build:buildbuddy --bes_backend=grpcs://remote.buildbuddy.io
20-
build:buildbuddy --remote_cache=grpcs://remote.buildbuddy.io
21-
build:buildbuddy --remote_timeout=1200
22-
build:buildbuddy --grpc_keepalive_time=360s
23-
build:buildbuddy --grpc_keepalive_timeout=360s
24-
build:buildbuddy --remote_download_minimal
25-
build:buildbuddy --build_metadata=REPO_URL=https://github.com/rabbitmq/rabbitmq-server.git
26-
build:buildbuddy --experimental_remote_cache_compression
27-
build:buildbuddy --experimental_remote_cache_async
28-
build:buildbuddy --noslim_profile
29-
build:buildbuddy --experimental_profile_include_target_label
30-
build:buildbuddy --experimental_profile_include_primary_output
31-
build:buildbuddy --remote_build_event_upload=minimal
32-
build:buildbuddy --nolegacy_important_outputs
33-
34-
# buildbuddy implies remote cache, so ct_logdir is restored to its default for reproducibility
35-
build:buildbuddy --@rules_erlang//:ct_logdir=
36-
37-
build:rbe --config=buildbuddy
38-
39-
build:rbe --remote_executor=grpcs://remote.buildbuddy.io
40-
41-
build:rbe --strategy=TestRunner=remote,worker,sandboxed,local
42-
build:rbe --jobs=50
43-
44-
build:rbe --crosstool_top=@rbe//cc:toolchain
45-
build:rbe --extra_toolchains=@rbe//config:cc-toolchain
46-
47-
build:rbe --host_platform=//bazel/platforms:erlang_internal_platform
48-
49-
build:rbe --host_cpu=k8
50-
build:rbe --cpu=k8
51-
52-
build:rbe-24 --config=rbe
53-
build:rbe-24 --platforms=//bazel/platforms:erlang_linux_24_platform
54-
55-
build:rbe-25 --config=rbe
56-
build:rbe-25 --platforms=//bazel/platforms:erlang_linux_25_3_platform
57-
58-
build:rbe-25_0 --config=rbe
59-
build:rbe-25_0 --platforms=//bazel/platforms:erlang_linux_25_0_platform
60-
61-
build:rbe-25_1 --config=rbe
62-
build:rbe-25_1 --platforms=//bazel/platforms:erlang_linux_25_1_platform
63-
64-
build:rbe-25_2 --config=rbe
65-
build:rbe-25_2 --platforms=//bazel/platforms:erlang_linux_25_2_platform
66-
67-
build:rbe-25_3 --config=rbe
68-
build:rbe-25_3 --platforms=//bazel/platforms:erlang_linux_25_3_platform
69-
70-
build:rbe-26 --config=rbe
71-
build:rbe-26 --platforms=//bazel/platforms:erlang_linux_26_2_platform
72-
73-
build:rbe-26_1 --config=rbe
74-
build:rbe-26_1 --platforms=//bazel/platforms:erlang_linux_26_1_platform
75-
76-
build:rbe-26_2 --config=rbe
77-
build:rbe-26_2 --platforms=//bazel/platforms:erlang_linux_26_2_platform
78-
79-
# no-op config so that --config=local does not error
80-
build:local --color=auto
81-
8218
# Try importing a user specific .bazelrc
8319
# You can create your own by copying and editing the template-user.bazelrc template:
8420
# cp template-user.bazelrc user.bazelrc

.github/workflows/rabbitmq_peer_discovery_aws.yaml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
peer-discovery-aws-integration-test:
1414
name: Integration Test
1515
runs-on: ubuntu-22.04
16-
strategy:
17-
matrix:
18-
otp_version_id:
19-
- 26_2
2016
timeout-minutes: 45
2117
steps:
2218
- name: CHECK IF IMAGE WILL PUSH
@@ -43,34 +39,63 @@ jobs:
4339
tags: ${{ steps.metadata.outputs.tags }}
4440
timeout-seconds: 3600
4541
polling-seconds: 60
42+
- name: COMPUTE REPO CACHE KEY
43+
if: steps.authorized.outputs.authorized == 'true'
44+
id: repo-cache-key
45+
run: |
46+
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
47+
- name: LOAD REPO CACHE
48+
if: steps.authorized.outputs.authorized == 'true'
49+
uses: actions/cache/restore@v4
50+
with:
51+
key: ${{ steps.repo-cache-key.outputs.value }}
52+
path: /home/runner/repo-cache/
53+
- name: CONFIGURE OTP & ELIXIR
54+
if: steps.authorized.outputs.authorized == 'true'
55+
uses: erlef/[email protected]
56+
with:
57+
otp-version: 26
58+
elixir-version: 1.15
59+
- name: SETUP ecs-cli
60+
if: steps.authorized.outputs.authorized == 'true'
61+
env:
62+
ECS_CLI_VERSION: 1.21.0
63+
run: |
64+
curl -Lo /usr/local/bin/ecs-cli https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-v${ECS_CLI_VERSION} && \
65+
chmod +x /usr/local/bin/ecs-cli && \
66+
ecs-cli --version
67+
- name: AUTHENTICATE TO GOOGLE CLOUD
68+
if: steps.authorized.outputs.authorized == 'true'
69+
uses: google-github-actions/[email protected]
70+
with:
71+
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
4672
- name: CONFIGURE BAZEL
4773
if: steps.authorized.outputs.authorized == 'true'
4874
run: |
49-
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
75+
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
5076
cat << EOF >> user.bazelrc
51-
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
77+
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
78+
build --google_default_credentials
5279
EOF
5380
fi
5481
cat << EOF >> user.bazelrc
55-
build:buildbuddy --build_metadata=ROLE=CI
56-
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
57-
build:buildbuddy --color=yes
82+
build --repository_cache=/home/runner/repo-cache/
83+
build --color=yes
5884
EOF
85+
86+
bazelisk info release
5987
#! - name: Setup tmate session
6088
#! uses: mxschmitt/action-tmate@v3
6189
- name: RUN INTEGRATION TESTS
6290
if: steps.authorized.outputs.authorized == 'true'
6391
run: |
64-
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
65-
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
66-
6792
branch_or_tag="${GITHUB_REF##*/}"
6893
bazelisk test //deps/rabbitmq_peer_discovery_aws:integration_SUITE \
69-
--config=rbe-${{ matrix.otp_version_id }} \
7094
--test_tag_filters=aws \
7195
--build_tests_only \
7296
--test_env AWS_ACCESS_KEY_ID=${{ secrets.CONCOURSE_AWS_ACCESS_KEY_ID }} \
7397
--test_env AWS_SECRET_ACCESS_KEY=${{ secrets.CONCOURSE_AWS_SECRET_ACCESS_KEY }} \
7498
--test_env RABBITMQ_IMAGE="pivotalrabbitmq/rabbitmq:sha-${{ github.sha }}" \
7599
--test_env AWS_ECS_CLUSTER_NAME="rabbitmq-peer-discovery-aws-actions-${branch_or_tag//[._]/-}" \
100+
--test_output=streamed \
76101
--verbose_failures
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
#@ load("@ytt:data", "data")
2+
#@yaml/text-templated-strings
3+
4+
#@ def job_names(plugins):
5+
#@ names = []
6+
#@ for p in plugins:
7+
#@ names.append("test-"+p)
8+
#@ end
9+
#@ return names
10+
#@ end
11+
12+
#@ def sharded_job_names(plugin, shard_count):
13+
#@ names = []
14+
#@ for shard_index in range(0, shard_count):
15+
#@ names.append("test-"+plugin+"-"+str(shard_index))
16+
#@ end
17+
#@ return names
18+
#@ end
19+
20+
---
21+
name: Test Mixed Version Clusters
22+
on:
23+
push:
24+
branches:
25+
- main
26+
- v3.12.x
27+
- v3.11.x
28+
- v3.10.x
29+
- v3.9.x
30+
- v3.8.x
31+
- bump-otp-*
32+
- bump-elixir-*
33+
- bump-rbe-*
34+
- bump-rules_erlang
35+
paths:
36+
- 'deps/**'
37+
- 'scripts/**'
38+
- Makefile
39+
- plugins.mk
40+
- rabbitmq-components.mk
41+
- .bazelrc
42+
- .bazelversion
43+
- BUILD.*
44+
- '*.bzl'
45+
- '*.bazel'
46+
- .github/workflows/test-mixed-versions.yaml
47+
pull_request:
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
50+
cancel-in-progress: true
51+
jobs:
52+
ensure-mixed-version-archive:
53+
runs-on: ubuntu-22.04
54+
steps:
55+
- name: CHECKOUT REPOSITORY
56+
uses: actions/checkout@v4
57+
with:
58+
path: primary-umbrella
59+
#! - name: Setup tmate session
60+
#! uses: mxschmitt/action-tmate@v3
61+
- name: CHECK FOR ARCHIVE ON S3
62+
id: check
63+
working-directory: primary-umbrella
64+
run: |
65+
set -u
66+
67+
ARCHIVE_URL="$(grep -Eo 'https://rabbitmq-github-actions.s3.eu-west-1.amazonaws.com.*.tar.xz' bazel/bzlmod/secondary_umbrella.bzl)"
68+
echo "ARCHIVE_URL: ${ARCHIVE_URL}"
69+
70+
curl -LO "${ARCHIVE_URL}"
71+
72+
if xzcat --test package-generic-unix-for-mixed-version-testing-v*.tar.xz; then
73+
exists=true
74+
else
75+
exists=false
76+
fi
77+
echo "exists=${exists}" | tee $GITHUB_ENV
78+
79+
OTP_VERSION_ID=${ARCHIVE_URL#*secondary-umbrellas/rbe-}
80+
OTP_VERSION_ID=${OTP_VERSION_ID%*/package-generic-unix-for-mixed-version-testing-v*.tar.xz}
81+
echo "otp_version_id=${OTP_VERSION_ID}" | tee -a $GITHUB_OUTPUT
82+
83+
VERSION=${ARCHIVE_URL#*package-generic-unix-for-mixed-version-testing-v}
84+
VERSION=${VERSION%*.tar.xz}
85+
echo "version=${VERSION}" | tee -a $GITHUB_OUTPUT
86+
- name: CHECKOUT REPOSITORY (MIXED VERSION)
87+
if: env.exists != 'true'
88+
uses: actions/checkout@v4
89+
with:
90+
ref: v${{ steps.check.outputs.version }}
91+
path: secondary-umbrella
92+
- name: BUILD SECONDARY UMBRELLA ARCHIVE
93+
if: env.exists != 'true'
94+
working-directory: secondary-umbrella
95+
run: |
96+
if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then
97+
cat << EOF >> user.bazelrc
98+
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
99+
EOF
100+
fi
101+
cat << EOF >> user.bazelrc
102+
build:buildbuddy --build_metadata=ROLE=CI
103+
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
104+
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-secondary-umbrella
105+
build:buildbuddy --color=yes
106+
107+
build:buildbuddy --remote_download_toplevel
108+
EOF
109+
110+
sed -i"_orig" -E "/APP_VERSION/ s/3\.[0-9]+\.[0-9]+/${{ steps.check.outputs.version }}/" rabbitmq.bzl
111+
bazelisk build :package-generic-unix \
112+
--config=rbe-${{ steps.check.outputs.otp_version_id }} \
113+
--test_build \
114+
--verbose_failures
115+
116+
OUTPUT_DIR=${{ github.workspace }}/output
117+
mkdir -p ${OUTPUT_DIR}/rbe-${{ steps.check.outputs.otp_version_id }}
118+
cp \
119+
bazel-bin/package-generic-unix.tar.xz \
120+
${OUTPUT_DIR}/rbe-${{ steps.check.outputs.otp_version_id }}/package-generic-unix-for-mixed-version-testing-v${{ steps.check.outputs.version }}.tar.xz
121+
- name: UPLOAD THE ARCHIVE TO S3
122+
if: env.exists != 'true'
123+
uses: jakejarvis/[email protected]
124+
with:
125+
args: --acl public-read --follow-symlinks
126+
env:
127+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
128+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
129+
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
130+
AWS_REGION: ${{ secrets.AWS_REGION }}
131+
SOURCE_DIR: output
132+
DEST_DIR: secondary-umbrellas
133+
134+
check-workflow:
135+
needs: ensure-mixed-version-archive
136+
runs-on: ubuntu-latest
137+
outputs:
138+
repo_cache_key: ${{ steps.repo-cache-key.outputs.value }}
139+
steps:
140+
- name: CHECKOUT REPOSITORY
141+
uses: actions/checkout@v4
142+
- name: SETUP ERLANG/ELIXIR
143+
uses: erlef/setup-beam@v1
144+
with:
145+
otp-version: 26
146+
elixir-version: 1.15
147+
- name: ENSURE WORKFLOWS ARE UP TO DATE
148+
run: |
149+
mkdir local-bin/
150+
curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash
151+
make actions-workflows YTT=$PWD/local-bin/ytt
152+
git diff --exit-code
153+
- name: COMPUTE REPO CACHE KEY
154+
id: repo-cache-key
155+
run: |
156+
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
157+
158+
#@ for plugin in data.values.internal_deps:
159+
test-(@= plugin @):
160+
needs: check-workflow
161+
uses: ./.github/workflows/test-plugin-mixed.yaml
162+
with:
163+
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
164+
plugin: #@ plugin
165+
secrets: inherit
166+
#@ end
167+
168+
#@ rabbit_shard_count = 10
169+
#@ for shard_index in range(0, rabbit_shard_count):
170+
test-rabbit-(@= str(shard_index) @):
171+
needs: #@ ["check-workflow"] + job_names(data.values.internal_deps)
172+
uses: ./.github/workflows/test-plugin-mixed.yaml
173+
with:
174+
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
175+
plugin: rabbit
176+
shard_index: #@ shard_index
177+
shard_count: #@ rabbit_shard_count
178+
secrets: inherit
179+
#@ end
180+
181+
#@ for plugin in data.values.tier1_plugins:
182+
test-(@= plugin @):
183+
needs: #@ ["check-workflow"] + sharded_job_names("rabbit", rabbit_shard_count)
184+
uses: ./.github/workflows/test-plugin-mixed.yaml
185+
with:
186+
repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }}
187+
plugin: #@ plugin
188+
secrets: inherit
189+
#@ end
190+
191+
summary-test:
192+
needs: #@ job_names(data.values.internal_deps + data.values.tier1_plugins) + sharded_job_names("rabbit", rabbit_shard_count)
193+
runs-on: ubuntu-latest
194+
steps:
195+
- name: SUMMARY
196+
run: |
197+
cat << 'EOF' | jq -e 'map(.result == "success") | all(.)'
198+
${{ toJson(needs) }}
199+
EOF

0 commit comments

Comments
 (0)