Skip to content

Commit

Permalink
Turn off BuildBuddy integration (backport #11343) (backport #11390) (…
Browse files Browse the repository at this point in the history
…backport #11416) (#11424)

* Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)

* Turn off BuildBuddy integration (#11343)

Builds now execute on the github actions workers, using Google Cloud Storage (GCS) as a cache

(cherry picked from commit a6874e3)

# Conflicts:
#	.github/workflows/update-elixir-patches.yaml
#	.github/workflows/update-otp-patches.yaml
#	MODULE.bazel
#	WORKSPACE
#	deps/rabbitmq_peer_discovery_consul/test/system_SUITE_data/consul.hcl
(cherry picked from commit 2c62185)

# Conflicts:
#	.bazelrc
#	.github/workflows/rabbitmq_peer_discovery_aws.yaml
#	.github/workflows/templates/test-mixed-versions.template.yaml
#	.github/workflows/templates/test.template.yaml
#	.github/workflows/test-mixed-versions.yaml
#	.github/workflows/test.yaml
#	MODULE.bazel
#	bazel/platforms/BUILD.bazel

* fixup backport

(cherry picked from commit dd62ac1)

# Conflicts:
#	.github/workflows/update-elixir-patches.yaml
#	.github/workflows/update-otp-patches.yaml

* remove rabbitmq_amqp_client tests from this branch

as the plugin does not exist here

(cherry picked from commit 28ee2dd)

# Conflicts:
#	.github/workflows/test-mixed-versions.yaml

* Reduce bazel sandbox for rabbitmq_amqp1_0 tests in CI

since they use java

(cherry picked from commit 0d5c0e5)

* Install daemonize as needed in the peer_discovery_etcd suite

(cherry picked from commit 23f6e5c)

* fixup backport

* oauth2_client does not exist on this branch

and rabbitmq_prelaunch will run as part of the rabbit shards

* Use erlang 25.0/elixir 1.14 for mixed version tests

---------

Co-authored-by: Rin Kuryloski <rin.kuryloski@broadcom.com>
(cherry picked from commit c78563a)

# Conflicts:
#	.bazelrc
#	.github/workflows/rabbitmq_peer_discovery_aws.yaml
#	.github/workflows/test-mixed-versions.yaml
#	.github/workflows/test.yaml
#	.github/workflows/update-elixir-patches.yaml
#	.github/workflows/update-otp-patches.yaml
#	MODULE.bazel
#	WORKSPACE
#	bazel/platforms/BUILD.bazel

* fixup backport

* removed rabbitmqctl_check_formatted

We only apply it to later elixirs

* no need to have RABBITMQ_METADATA_STORE in the matrix

* debug rabbitmq_ct_helpers dialyzer error

* try to skip the broken plt rules on github actions for now

* try target_compatible_with

* exec_compatible_with is problematic the way we cquery

as it results in explicitly requesting the target

instead try just a manual tag

* It seems dialyzing against elixir doesn't work with setup-beam

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Rin Kuryloski <rin.kuryloski@broadcom.com>
  • Loading branch information
mergify[bot] and pjk25 authored Jun 12, 2024
1 parent 4ed5f2e commit 89426bb
Show file tree
Hide file tree
Showing 27 changed files with 648 additions and 987 deletions.
58 changes: 0 additions & 58 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,6 @@ build --flag_alias=test_build=//:enable_test_build

build --combined_report=lcov

build:buildbuddy --bes_results_url=https://app.buildbuddy.io/invocation/
build:buildbuddy --bes_backend=grpcs://remote.buildbuddy.io
build:buildbuddy --remote_cache=grpcs://remote.buildbuddy.io
build:buildbuddy --remote_timeout=1200
build:buildbuddy --grpc_keepalive_time=360s
build:buildbuddy --grpc_keepalive_timeout=360s
build:buildbuddy --remote_download_minimal
build:buildbuddy --build_metadata=REPO_URL=https://github.com/rabbitmq/rabbitmq-server.git
build:buildbuddy --experimental_remote_cache_compression
build:buildbuddy --experimental_remote_cache_async
build:buildbuddy --noslim_profile
build:buildbuddy --experimental_profile_include_target_label
build:buildbuddy --experimental_profile_include_primary_output
build:buildbuddy --experimental_remote_build_event_upload=minimal
build:buildbuddy --nolegacy_important_outputs

# buildbuddy implies remote cache, so ct_logdir is restored to its default for reproducibility
build:buildbuddy --@rules_erlang//:ct_logdir=

build:rbe --config=buildbuddy

build:rbe --remote_executor=grpcs://remote.buildbuddy.io

build:rbe --strategy=TestRunner=remote,worker,sandboxed,local
build:rbe --jobs=50

build:rbe --crosstool_top=@rbe//cc:toolchain
build:rbe --extra_toolchains=@rbe//config:cc-toolchain

build:rbe --host_platform=//bazel/platforms:erlang_internal_platform

build:rbe --host_cpu=k8
build:rbe --cpu=k8

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_3_platform

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

build:rbe-26 --config=rbe
build:rbe-26 --platforms=//bazel/platforms:erlang_linux_26_platform

# no-op config so that --config=local does not error
build:local --color=auto

# Try importing a user specific .bazelrc
# You can create your own by copying and editing the template-user.bazelrc template:
# cp template-user.bazelrc user.bazelrc
Expand Down
69 changes: 51 additions & 18 deletions .github/workflows/rabbitmq_peer_discovery_aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,78 @@ on:
jobs:
peer-discovery-aws-integration-test:
name: Integration Test
runs-on: ubuntu-latest
strategy:
matrix:
otp_version_id:
- 25_3
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v4
- name: WAIT FOR OCI IMAGE WORKFLOW
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.ref }}
check-name: build-publish-dev-bazel
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30 # seconds
images: pivotalrabbitmq/rabbitmq
tags: |
type=sha,format=long
- uses: int128/wait-for-docker-image-action@v1
if: steps.authorized.outputs.authorized == 'true'
with:
tags: ${{ steps.metadata.outputs.tags }}
timeout-seconds: 3600
polling-seconds: 60
- name: COMPUTE REPO CACHE KEY
if: steps.authorized.outputs.authorized == 'true'
id: repo-cache-key
run: |
echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT
- name: LOAD REPO CACHE
if: steps.authorized.outputs.authorized == 'true'
uses: actions/cache/restore@v4
with:
key: ${{ steps.repo-cache-key.outputs.value }}
path: /home/runner/repo-cache/
- name: CONFIGURE OTP & ELIXIR
if: steps.authorized.outputs.authorized == 'true'
uses: erlef/setup-beam@v1.17
with:
otp-version: 25.3
elixir-version: 1.14
- name: SETUP ecs-cli
if: steps.authorized.outputs.authorized == 'true'
env:
ECS_CLI_VERSION: 1.21.0
run: |
curl -Lo /usr/local/bin/ecs-cli https://amazon-ecs-cli.s3.amazonaws.com/ecs-cli-linux-amd64-v${ECS_CLI_VERSION} && \
chmod +x /usr/local/bin/ecs-cli && \
ecs-cli --version
- name: AUTHENTICATE TO GOOGLE CLOUD
if: steps.authorized.outputs.authorized == 'true'
uses: google-github-actions/auth@v2.1.2
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: CONFIGURE BAZEL
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME }}" ]; then
cat << EOF >> user.bazelrc
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
build:buildbuddy --build_metadata=ROLE=CI
build:buildbuddy --build_metadata=VISIBILITY=PRIVATE
build:buildbuddy --color=yes
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }}
build --google_default_credentials
EOF
fi
cat << EOF >> user.bazelrc
build --repository_cache=/home/runner/repo-cache/
build --color=yes
EOF
bazelisk info release
#! - name: Setup tmate session
#! uses: mxschmitt/action-tmate@v3
- name: RUN INTEGRATION TESTS
run: |
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
branch_or_tag="${GITHUB_REF##*/}"
bazelisk test //deps/rabbitmq_peer_discovery_aws:integration_SUITE \
--config=rbe-${{ matrix.otp_version_id }} \
--test_tag_filters=aws \
--build_tests_only \
--test_env AWS_ACCESS_KEY_ID=${{ secrets.CONCOURSE_AWS_ACCESS_KEY_ID }} \
--test_env AWS_SECRET_ACCESS_KEY=${{ secrets.CONCOURSE_AWS_SECRET_ACCESS_KEY }} \
--test_env RABBITMQ_IMAGE="pivotalrabbitmq/rabbitmq:${{ github.sha }}" \
--test_env AWS_ECS_CLUSTER_NAME="rabbitmq-peer-discovery-aws-actions-${branch_or_tag//[._]/-}" \
--test_output=streamed \
--verbose_failures
4 changes: 2 additions & 2 deletions .github/workflows/templates/test-mixed-versions.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ jobs:
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
otp-version: 25.0
elixir-version: 1.14
- name: ENSURE WORKFLOWS ARE UP TO DATE
run: |
mkdir local-bin/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/templates/test.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
- name: SETUP ERLANG/ELIXIR
uses: erlef/setup-beam@v1
with:
otp-version: 26
elixir-version: 1.15
otp-version: 25.3
elixir-version: 1.14
- name: ENSURE WORKFLOWS ARE UP TO DATE
run: |
mkdir local-bin/
Expand Down
Loading

0 comments on commit 89426bb

Please sign in to comment.