diff --git a/.bazelrc b/.bazelrc index 3446d4d56116..ac56e2276592 100644 --- a/.bazelrc +++ b/.bazelrc @@ -13,6 +13,7 @@ build --flag_alias=test_build=//:enable_test_build build --combined_report=lcov +<<<<<<< HEAD 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 @@ -71,6 +72,8 @@ build:rbe-26 --platforms=//bazel/platforms:erlang_linux_26_platform # no-op config so that --config=local does not error build:local --color=auto +======= +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) # 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 diff --git a/.github/workflows/rabbitmq_peer_discovery_aws.yaml b/.github/workflows/rabbitmq_peer_discovery_aws.yaml index a39a1ab58b10..27daef3354b5 100644 --- a/.github/workflows/rabbitmq_peer_discovery_aws.yaml +++ b/.github/workflows/rabbitmq_peer_discovery_aws.yaml @@ -4,11 +4,15 @@ on: jobs: peer-discovery-aws-integration-test: name: Integration Test +<<<<<<< HEAD runs-on: ubuntu-latest strategy: matrix: otp_version_id: - 25_3 +======= + runs-on: ubuntu-22.04 +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) timeout-minutes: 45 steps: - name: CHECKOUT REPOSITORY @@ -16,33 +20,70 @@ jobs: - 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: 26 + elixir-version: 1.15 + - 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 diff --git a/.github/workflows/templates/test-mixed-versions.template.yaml b/.github/workflows/templates/test-mixed-versions.template.yaml index 0e8529ba6035..a725e1ee4f66 100644 --- a/.github/workflows/templates/test-mixed-versions.template.yaml +++ b/.github/workflows/templates/test-mixed-versions.template.yaml @@ -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/ diff --git a/.github/workflows/test-mixed-versions.yaml b/.github/workflows/test-mixed-versions.yaml index 4a5cdb018d3f..45eeb856a6ed 100644 --- a/.github/workflows/test-mixed-versions.yaml +++ b/.github/workflows/test-mixed-versions.yaml @@ -2,6 +2,7 @@ name: Test Mixed Version Clusters on: push: branches: +<<<<<<< HEAD - main - v3.11.x - v3.10.x @@ -11,33 +12,47 @@ on: - bump-elixir-* - bump-rbe-* - bump-rules_erlang +======= + - main + - v3.12.x + - v3.11.x + - v3.10.x + - v3.9.x + - v3.8.x + - bump-otp-* + - bump-elixir-* + - bump-rbe-* + - bump-rules_erlang +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) paths: - - 'deps/**' - - 'scripts/**' - - Makefile - - plugins.mk - - rabbitmq-components.mk - - .bazelrc - - .bazelversion - - BUILD.* - - '*.bzl' - - '*.bazel' - - .github/workflows/test-mixed-versions.yaml + - deps/** + - scripts/** + - Makefile + - plugins.mk + - rabbitmq-components.mk + - .bazelrc + - .bazelversion + - BUILD.* + - '*.bzl' + - '*.bazel' + - .github/workflows/test-mixed-versions.yaml pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: ensure-mixed-version-archive: +<<<<<<< HEAD name: Prepare Artifacts runs-on: ubuntu-latest +======= + runs-on: ubuntu-22.04 +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) steps: - name: CHECKOUT REPOSITORY uses: actions/checkout@v4 with: path: primary-umbrella - #! - name: Setup tmate session - #! uses: mxschmitt/action-tmate@v3 - name: CHECK FOR ARCHIVE ON S3 id: check working-directory: primary-umbrella @@ -110,6 +125,7 @@ jobs: AWS_REGION: ${{ secrets.AWS_REGION }} SOURCE_DIR: output DEST_DIR: secondary-umbrellas +<<<<<<< HEAD test-mixed-versions: name: Test (Mixed Version Cluster) @@ -121,42 +137,93 @@ jobs: otp_version_id: - "25_3" timeout-minutes: 120 +======= + check-workflow: + needs: ensure-mixed-version-archive + runs-on: ubuntu-latest + outputs: + repo_cache_key: ${{ steps.repo-cache-key.outputs.value }} +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) steps: - name: CHECKOUT REPOSITORY uses: actions/checkout@v4 - - name: CONFIGURE BAZEL + - name: SETUP ERLANG/ELIXIR + uses: erlef/setup-beam@v1 + with: + otp-version: 25 + elixir-version: 1.14 + - name: ENSURE WORKFLOWS ARE UP TO DATE run: | - if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then - cat << EOF >> user.bazelrc - build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} - EOF - fi - cat << EOF >> user.bazelrc - build:buildbuddy --build_metadata=ROLE=CI - build:buildbuddy --build_metadata=VISIBILITY=PUBLIC - build:buildbuddy --color=yes - EOF - #! - name: Setup tmate session - #! uses: mxschmitt/action-tmate@v3 - - name: RUN TESTS + mkdir local-bin/ + curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash + make actions-workflows YTT=$PWD/local-bin/ytt + git diff --exit-code + - name: COMPUTE REPO CACHE KEY + id: repo-cache-key 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 - bazelisk test //... \ - --config=rbe-${{ matrix.otp_version_id }} \ - --test_tag_filters=mixed-version-cluster,-aws,-docker \ - --build_tests_only \ - --verbose_failures - summary-mixed-versions: + echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT + test-amqp10_client: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: amqp10_client + secrets: inherit + test-amqp10_common: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: amqp10_common + secrets: inherit + test-amqp_client: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: amqp_client + secrets: inherit + test-rabbit_common: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: rabbit_common + secrets: inherit + test-rabbitmq_ct_client_helpers: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: rabbitmq_ct_client_helpers + secrets: inherit + test-rabbitmq_ct_helpers: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: rabbitmq_ct_helpers + secrets: inherit + test-rabbitmq_stream_common: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: rabbitmq_stream_common + secrets: inherit + test-trust_store_http: + needs: check-workflow + uses: ./.github/workflows/test-plugin-mixed.yaml + with: + repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} + plugin: trust_store_http + secrets: inherit + test-rabbit-0: needs: -<<<<<<< HEAD - - test-mixed-versions -======= - check-workflow - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -175,7 +242,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -194,7 +260,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -213,7 +278,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -232,7 +296,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -251,7 +314,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -270,7 +332,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -289,7 +350,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -308,7 +368,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -327,7 +386,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -347,24 +405,6 @@ jobs: repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} plugin: rabbitmq_cli secrets: inherit - test-rabbitmq_amqp_client: - needs: - - check-workflow - - test-rabbit-0 - - test-rabbit-1 - - test-rabbit-2 - - test-rabbit-3 - - test-rabbit-4 - - test-rabbit-5 - - test-rabbit-6 - - test-rabbit-7 - - test-rabbit-8 - - test-rabbit-9 - uses: ./.github/workflows/test-plugin-mixed.yaml - with: - repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} - plugin: rabbitmq_amqp_client - secrets: inherit test-rabbitmq_amqp1_0: needs: - check-workflow @@ -725,24 +765,6 @@ jobs: repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} plugin: rabbitmq_peer_discovery_k8s secrets: inherit - test-rabbitmq_prelaunch: - needs: - - check-workflow - - test-rabbit-0 - - test-rabbit-1 - - test-rabbit-2 - - test-rabbit-3 - - test-rabbit-4 - - test-rabbit-5 - - test-rabbit-6 - - test-rabbit-7 - - test-rabbit-8 - - test-rabbit-9 - uses: ./.github/workflows/test-plugin-mixed.yaml - with: - repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} - plugin: rabbitmq_prelaunch - secrets: inherit test-rabbitmq_prometheus: needs: - check-workflow @@ -1054,13 +1076,11 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers - test-rabbitmq_stream_common - test-trust_store_http - - test-rabbitmq_amqp_client - test-rabbitmq_amqp1_0 - test-rabbitmq_auth_backend_cache - test-rabbitmq_auth_backend_http @@ -1081,7 +1101,6 @@ jobs: - test-rabbitmq_peer_discovery_consul - test-rabbitmq_peer_discovery_etcd - test-rabbitmq_peer_discovery_k8s - - test-rabbitmq_prelaunch - test-rabbitmq_prometheus - test-rabbitmq_random_exchange - test-rabbitmq_recent_history_exchange @@ -1110,9 +1129,10 @@ jobs: - test-rabbit-8 - test-rabbit-9 - test-rabbitmq_cli ->>>>>>> bdd18ed800 (Add back rabbitmq_cli tests to CI) runs-on: ubuntu-latest steps: - name: SUMMARY run: | - echo "SUCCESS" + cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' + ${{ toJson(needs) }} + EOF diff --git a/.github/workflows/test-plugin-mixed.yaml b/.github/workflows/test-plugin-mixed.yaml new file mode 100644 index 000000000000..d666e1b12fa8 --- /dev/null +++ b/.github/workflows/test-plugin-mixed.yaml @@ -0,0 +1,182 @@ +name: Test Plugin Mixed Version Clusters +on: + workflow_call: + inputs: + repo_cache_key: + required: true + type: string + plugin: + required: true + type: string + shard_index: + default: 0 + type: number + shard_count: + default: 1 + type: number + secrets: + REMOTE_CACHE_BUCKET_NAME: + required: true + REMOTE_CACHE_CREDENTIALS_JSON: + required: true +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + erlang_version: + - 25.0 + metadata_store: + - mnesia + - khepri + include: + - erlang_version: 25.0 + elixir_version: 1.15 + timeout-minutes: 120 + steps: + - name: LOAD REPO CACHE + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.repo_cache_key }} + path: /home/runner/repo-cache/ + - name: CHECKOUT REPOSITORY + uses: actions/checkout@v4 + - name: CONFIGURE OTP & ELIXIR + uses: erlef/setup-beam@v1.17 + with: + otp-version: ${{ matrix.erlang_version }} + elixir-version: ${{ matrix.elixir_version }} + - name: AUTHENTICATE TO GOOGLE CLOUD + 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 --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 + - uses: actions/setup-dotnet@v4 + if: inputs.plugin == 'rabbit' + with: + dotnet-version: '3.1.x' + - name: deps/amqp10_client SETUP + if: inputs.plugin == 'amqp10_client' + run: | + # reduce sandboxing so that activemq works + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbit SETUP + if: inputs.plugin == 'rabbit' + run: | + # reduce sandboxing so that maven works + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_amqp1_0 SETUP + if: inputs.plugin == 'rabbitmq_amqp1_0' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_auth_backend_ldap SETUP + if: inputs.plugin == 'rabbitmq_auth_backend_ldap' + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + apparmor-utils \ + ldap-utils \ + slapd + + sudo aa-complain `which slapd` + + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_mqtt SETUP + if: inputs.plugin == 'rabbitmq_mqtt' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_peer_discovery_consul SETUP + if: inputs.plugin == 'rabbitmq_peer_discovery_consul' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_peer_discovery_etcd SETUP + if: inputs.plugin == 'rabbitmq_peer_discovery_etcd' + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + daemonize + - name: deps/rabbitmq_stream SETUP + if: inputs.plugin == 'rabbitmq_stream' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_stream_management SETUP + if: inputs.plugin == 'rabbitmq_stream_management' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_tracing SETUP + if: inputs.plugin == 'rabbitmq_tracing' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: COMPUTE TESTS IN SHARD + id: shard + run: | + bazelisk cquery \ + 'attr("tags", "mixed-version-cluster", tests(//deps/${{ inputs.plugin }}/...)) except attr("tags", "manual", //deps/${{ inputs.plugin }}/...)' \ + --output=label \ + | awk '{print $1;}' > tests.log + if [[ $(wc -l < tests.log) != "0" ]]; then + split -da 3 -l $((`wc -l < tests.log`/${{ inputs.shard_count }})) tests.log shard + printf -v padded_index "%03d" ${{ inputs.shard_index }} + echo "file=shard$padded_index" | tee -a $GITHUB_OUTPUT + else + echo "No tests in this shard" + echo "file=" | tee -a $GITHUB_OUTPUT + fi + - name: RUN TESTS + if: steps.shard.outputs.file != '' && inputs.plugin != 'rabbitmq_peer_discovery_aws' + run: | + echo "Tests in shard:" + cat ${{ steps.shard.outputs.file }} + echo "" + + ## WARNING: + ## secrets must not be set in --test_env or --action_env, + ## or otherwise logs must not be saved as artifacts. + ## rabbit_ct_helpers or other code may log portions of the + ## env vars and leak them + + bazelisk test $(< ${{ steps.shard.outputs.file }}) \ + --test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \ + --build_tests_only \ + --verbose_failures + - name: UPLOAD TEST LOGS + if: always() + uses: actions/upload-artifact@v4 + with: + name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }}-mixed + path: | + bazel-testlogs/deps/${{ inputs.plugin }}/* diff --git a/.github/workflows/test-plugin.yaml b/.github/workflows/test-plugin.yaml new file mode 100644 index 000000000000..c3d74b00fc30 --- /dev/null +++ b/.github/workflows/test-plugin.yaml @@ -0,0 +1,177 @@ +name: Test Plugin +on: + workflow_call: + inputs: + repo_cache_key: + required: true + type: string + plugin: + required: true + type: string + shard_index: + default: 0 + type: number + shard_count: + default: 1 + type: number + secrets: + REMOTE_CACHE_BUCKET_NAME: + required: true + REMOTE_CACHE_CREDENTIALS_JSON: + required: true +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + erlang_version: + - 26 + metadata_store: + - mnesia + - khepri + include: + - erlang_version: 26 + elixir_version: 1.15 + timeout-minutes: 120 + steps: + - name: LOAD REPO CACHE + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.repo_cache_key }} + path: /home/runner/repo-cache/ + - name: CHECKOUT REPOSITORY + uses: actions/checkout@v4 + - name: CONFIGURE OTP & ELIXIR + uses: erlef/setup-beam@v1.17 + with: + otp-version: ${{ matrix.erlang_version }} + elixir-version: ${{ matrix.elixir_version }} + - name: AUTHENTICATE TO GOOGLE CLOUD + 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 --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 + - uses: actions/setup-dotnet@v4 + if: inputs.plugin == 'rabbit' + with: + dotnet-version: '3.1.x' + - name: deps/amqp10_client SETUP + if: inputs.plugin == 'amqp10_client' + run: | + # reduce sandboxing so that activemq works + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbit SETUP + if: inputs.plugin == 'rabbit' + run: | + # reduce sandboxing so that maven works + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_amqp1_0 SETUP + if: inputs.plugin == 'rabbitmq_amqp1_0' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_auth_backend_ldap SETUP + if: inputs.plugin == 'rabbitmq_auth_backend_ldap' + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + apparmor-utils \ + ldap-utils \ + slapd + + sudo aa-complain `which slapd` + + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_mqtt SETUP + if: inputs.plugin == 'rabbitmq_mqtt' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_peer_discovery_consul SETUP + if: inputs.plugin == 'rabbitmq_peer_discovery_consul' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_peer_discovery_etcd SETUP + if: inputs.plugin == 'rabbitmq_peer_discovery_etcd' + run: | + sudo apt-get update && \ + sudo apt-get install -y \ + daemonize + - name: deps/rabbitmq_stream SETUP + if: inputs.plugin == 'rabbitmq_stream' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_stream_management SETUP + if: inputs.plugin == 'rabbitmq_stream_management' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: deps/rabbitmq_tracing SETUP + if: inputs.plugin == 'rabbitmq_tracing' + run: | + cat << EOF >> user.bazelrc + build --strategy=TestRunner=local + EOF + - name: COMPUTE TESTS IN SHARD + id: shard + run: | + bazelisk cquery \ + 'tests(//deps/${{ inputs.plugin }}/...) except attr("tags", "manual|mixed-version-cluster", //deps/...)' \ + --output=label \ + | awk '{print $1;}' > tests.log + split -da 3 -l $((`wc -l < tests.log`/${{ inputs.shard_count }})) tests.log shard + printf -v padded_index "%03d" ${{ inputs.shard_index }} + echo "file=shard$padded_index" | tee -a $GITHUB_OUTPUT + - name: RUN TESTS + if: inputs.plugin != 'rabbitmq_peer_discovery_aws' + run: | + echo "Tests in shard:" + cat ${{ steps.shard.outputs.file }} + echo "" + + ## WARNING: + ## secrets must not be set in --test_env or --action_env, + ## or otherwise logs must not be saved as artifacts. + ## rabbit_ct_helpers or other code may log portions of the + ## env vars and leak them + + bazelisk test $(< ${{ steps.shard.outputs.file }}) \ + --test_env RABBITMQ_METADATA_STORE=${{ matrix.metadata_store }} \ + --build_tests_only \ + --verbose_failures + - name: UPLOAD TEST LOGS + if: always() + uses: actions/upload-artifact@v4 + with: + name: bazel-testlogs-${{ inputs.plugin }}-${{ inputs.shard_index }}-${{ matrix.erlang_version }}-${{ matrix.metadata_store }} + path: | + bazel-testlogs/deps/${{ inputs.plugin }}/* diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5909b1ed8854..2c8e0cd796e1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,6 +2,7 @@ name: Test on: push: branches: +<<<<<<< HEAD - main - v3.11.x - v3.10.x @@ -10,23 +11,33 @@ on: - bump-otp-for-oci - bump-rbe-* - bump-rules_erlang +======= + - main + - v3.13.x + - v3.12.x + - v3.11.x + - bump-otp-for-oci + - bump-rbe-* + - bump-rules_erlang +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) paths: - - 'deps/**' - - 'scripts/**' - - Makefile - - plugins.mk - - rabbitmq-components.mk - - .bazelrc - - .bazelversion - - BUILD.* - - '*.bzl' - - '*.bazel' - - .github/workflows/test.yaml + - deps/** + - scripts/** + - Makefile + - plugins.mk + - rabbitmq-components.mk + - .bazelrc + - .bazelversion + - BUILD.* + - '*.bzl' + - '*.bazel' + - .github/workflows/test.yaml pull_request: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: +<<<<<<< HEAD test: name: Test runs-on: ubuntu-latest @@ -37,39 +48,54 @@ jobs: - 25_0 - 25_3 timeout-minutes: 120 +======= + check-workflow: + runs-on: ubuntu-latest + outputs: + repo_cache_key: ${{ steps.repo-cache-key.outputs.value }} +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) steps: - name: CHECKOUT REPOSITORY uses: actions/checkout@v4 - - name: CONFIGURE BAZEL + - name: SETUP ERLANG/ELIXIR + uses: erlef/setup-beam@v1 + with: + otp-version: 26 + elixir-version: 1.15 + - name: ENSURE WORKFLOWS ARE UP TO DATE + run: | + mkdir local-bin/ + curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash + make actions-workflows YTT=$PWD/local-bin/ytt + git diff --exit-code + - name: COMPUTE REPO CACHE KEY + id: repo-cache-key + run: | + echo "value=bazel-repo-cache-${{ hashFiles('MODULE.bazel') }}" | tee -a $GITHUB_OUTPUT + - name: AUTHENTICATE TO GOOGLE CLOUD + uses: google-github-actions/auth@v2.1.2 + with: + credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }} + - name: REPO CACHE + id: cache + uses: actions/cache@v4 + with: + key: ${{ steps.repo-cache-key.outputs.value }} + path: /home/runner/repo-cache/ + - name: PRIME CACHE + if: steps.cache.outputs.cache-hit != 'true' run: | - if [ -n "${{ secrets.BUILDBUDDY_API_KEY }}" ]; then + 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 --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME }} + build --google_default_credentials EOF fi cat << EOF >> user.bazelrc - build:buildbuddy --build_metadata=ROLE=CI - build:buildbuddy --build_metadata=VISIBILITY=PUBLIC - build:buildbuddy --color=yes + build --repository_cache=/home/runner/repo-cache/ + build --color=yes EOF -<<<<<<< HEAD - bazelisk info release - #! - name: Setup tmate session - #! uses: mxschmitt/action-tmate@v3 - - name: RUN 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 - bazelisk test //... \ - --config=rbe-${{ matrix.otp_version_id }} \ - --test_tag_filters=-aws,-docker,-mixed-version-cluster \ - --build_tests_only \ - --verbose_failures - summary-test: - needs: - - test -======= bazelisk cquery \ 'tests(//...) except attr("tags", "manual|mixed-version-cluster", //deps/...)' \ --output=label @@ -94,13 +120,6 @@ jobs: repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} plugin: amqp_client secrets: inherit - test-oauth2_client: - needs: check-workflow - uses: ./.github/workflows/test-plugin.yaml - with: - repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} - plugin: oauth2_client - secrets: inherit test-rabbit_common: needs: check-workflow uses: ./.github/workflows/test-plugin.yaml @@ -142,7 +161,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -161,7 +179,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -180,7 +197,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -199,7 +215,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -218,7 +233,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -237,7 +251,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -256,7 +269,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -275,7 +287,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -294,7 +305,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -313,7 +323,6 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers @@ -333,24 +342,6 @@ jobs: repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} plugin: rabbitmq_cli secrets: inherit - test-rabbitmq_amqp_client: - needs: - - check-workflow - - test-rabbit-0 - - test-rabbit-1 - - test-rabbit-2 - - test-rabbit-3 - - test-rabbit-4 - - test-rabbit-5 - - test-rabbit-6 - - test-rabbit-7 - - test-rabbit-8 - - test-rabbit-9 - uses: ./.github/workflows/test-plugin.yaml - with: - repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} - plugin: rabbitmq_amqp_client - secrets: inherit test-rabbitmq_amqp1_0: needs: - check-workflow @@ -711,24 +702,6 @@ jobs: repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} plugin: rabbitmq_peer_discovery_k8s secrets: inherit - test-rabbitmq_prelaunch: - needs: - - check-workflow - - test-rabbit-0 - - test-rabbit-1 - - test-rabbit-2 - - test-rabbit-3 - - test-rabbit-4 - - test-rabbit-5 - - test-rabbit-6 - - test-rabbit-7 - - test-rabbit-8 - - test-rabbit-9 - uses: ./.github/workflows/test-plugin.yaml - with: - repo_cache_key: ${{ needs.check-workflow.outputs.repo_cache_key }} - plugin: rabbitmq_prelaunch - secrets: inherit test-rabbitmq_prometheus: needs: - check-workflow @@ -1040,13 +1013,11 @@ jobs: - test-amqp10_client - test-amqp10_common - test-amqp_client - - test-oauth2_client - test-rabbit_common - test-rabbitmq_ct_client_helpers - test-rabbitmq_ct_helpers - test-rabbitmq_stream_common - test-trust_store_http - - test-rabbitmq_amqp_client - test-rabbitmq_amqp1_0 - test-rabbitmq_auth_backend_cache - test-rabbitmq_auth_backend_http @@ -1067,7 +1038,6 @@ jobs: - test-rabbitmq_peer_discovery_consul - test-rabbitmq_peer_discovery_etcd - test-rabbitmq_peer_discovery_k8s - - test-rabbitmq_prelaunch - test-rabbitmq_prometheus - test-rabbitmq_random_exchange - test-rabbitmq_recent_history_exchange @@ -1096,9 +1066,10 @@ jobs: - test-rabbit-8 - test-rabbit-9 - test-rabbitmq_cli ->>>>>>> bdd18ed800 (Add back rabbitmq_cli tests to CI) runs-on: ubuntu-latest steps: - name: SUMMARY run: | - echo "SUCCESS" + cat << 'EOF' | jq -e 'map(.result == "success") | all(.)' + ${{ toJson(needs) }} + EOF diff --git a/MODULE.bazel b/MODULE.bazel index ca9986b4c108..442944458aa7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -74,6 +74,7 @@ erlang_config = use_extension( "erlang_config", ) +<<<<<<< HEAD erlang_config.internal_erlang_from_github_release( name = "24", sha256 = "8444ff9abe23aea268adbb95463561fc222c965052d35d7c950b17be01c3ad82", @@ -124,6 +125,8 @@ erlang_config.internal_erlang_from_http_archive( extra_make_opts = ["-j 4"], ) +======= +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) use_repo( erlang_config, "erlang_config", @@ -134,30 +137,13 @@ elixir_config = use_extension( "elixir_config", ) -elixir_config.internal_elixir_from_github_release( - name = "1_13", - sha256 = "95daf2dd3052e6ca7d4d849457eaaba09de52d65ca38d6933c65bc1cdf6b8579", - version = "1.13.4", -) - -elixir_config.internal_elixir_from_github_release( - name = "1_14", - sha256 = "2ea249566c67e57f8365ecdcd0efd9b6c375f57609b3ac2de326488ac37c8ebd", - version = "1.14.5", -) - -elixir_config.internal_elixir_from_github_release( - name = "1_15", - sha256 = "09e697ab13fc60f27adaba9b71f8793105acd4320a89b16be0ceb4a13426d779", - version = "1.15.8", -) - use_repo( elixir_config, "elixir_config", ) register_toolchains( +<<<<<<< HEAD "@erlang_config//24:toolchain_major", "@erlang_config//24:toolchain_major_minor", "@erlang_config//25_0:toolchain_major", @@ -172,10 +158,9 @@ register_toolchains( "@erlang_config//26:toolchain_major_minor", "@erlang_config//git_master:toolchain_major", "@erlang_config//git_master:toolchain_major_minor", +======= +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) "@elixir_config//external:toolchain", - "@elixir_config//1_13:toolchain", - "@elixir_config//1_14:toolchain", - "@elixir_config//1_15:toolchain", ) erlang_package = use_extension( @@ -470,21 +455,6 @@ use_repo( "x509", ) -rbe = use_extension( - "//bazel/bzlmod:extensions.bzl", - "rbe", -) - -rbe.git_repository( - branch = "linux-rbe", - remote = "https://github.com/rabbitmq/rbe-erlang-platform.git", -) - -use_repo( - rbe, - "rbe", -) - secondary_umbrella = use_extension( "//bazel/bzlmod:extensions.bzl", "secondary_umbrella", diff --git a/Makefile b/Makefile index 292b822429bd..95e5a0aa4cd2 100644 --- a/Makefile +++ b/Makefile @@ -561,3 +561,74 @@ install-windows-docs: install-windows-erlapp *) mv "$$file" "$$file.txt" ;; \ esac; \ done + +INTERNAL_DEPS := \ + amqp10_client \ + amqp10_common \ + amqp_client \ + rabbit_common \ + rabbitmq_ct_client_helpers \ + rabbitmq_ct_helpers \ + rabbitmq_stream_common \ + trust_store_http + +TIER1_PLUGINS := \ + rabbitmq_amqp1_0 \ + rabbitmq_auth_backend_cache \ + rabbitmq_auth_backend_http \ + rabbitmq_auth_backend_ldap \ + rabbitmq_auth_backend_oauth2 \ + rabbitmq_auth_mechanism_ssl \ + rabbitmq_aws \ + rabbitmq_consistent_hash_exchange \ + rabbitmq_event_exchange \ + rabbitmq_federation \ + rabbitmq_federation_management \ + rabbitmq_jms_topic_exchange \ + rabbitmq_management \ + rabbitmq_management_agent \ + rabbitmq_mqtt \ + rabbitmq_peer_discovery_aws \ + rabbitmq_peer_discovery_common \ + rabbitmq_peer_discovery_consul \ + rabbitmq_peer_discovery_etcd \ + rabbitmq_peer_discovery_k8s \ + rabbitmq_prometheus \ + rabbitmq_random_exchange \ + rabbitmq_recent_history_exchange \ + rabbitmq_sharding \ + rabbitmq_shovel \ + rabbitmq_shovel_management \ + rabbitmq_stomp \ + rabbitmq_stream \ + rabbitmq_stream_management \ + rabbitmq_top \ + rabbitmq_tracing \ + rabbitmq_trust_store \ + rabbitmq_web_dispatch \ + rabbitmq_web_mqtt \ + rabbitmq_web_mqtt_examples \ + rabbitmq_web_stomp \ + rabbitmq_web_stomp_examples + +YTT ?= ytt + +actions-workflows: .github/workflows/test.yaml .github/workflows/test-mixed-versions.yaml + +.PHONY: .github/workflows/test.yaml .github/workflows/test-mixed-versions.yaml + +.github/workflows/test.yaml: .github/workflows/templates/test.template.yaml + $(gen_verbose) $(YTT) \ + --file $< \ + --data-value-yaml internal_deps=[$(subst $(space),$(comma),$(foreach s,$(INTERNAL_DEPS),"$s"))] \ + --data-value-yaml tier1_plugins=[$(subst $(space),$(comma),$(foreach s,$(TIER1_PLUGINS),"$s"))] \ + | sed 's/^true:/on:/' \ + | sed 's/pull_request: null/pull_request:/'> $@ + +.github/workflows/test-mixed-versions.yaml: .github/workflows/templates/test-mixed-versions.template.yaml + $(gen_verbose) $(YTT) \ + --file $< \ + --data-value-yaml internal_deps=[$(subst $(space),$(comma),$(foreach s,$(INTERNAL_DEPS),"$s"))] \ + --data-value-yaml tier1_plugins=[$(subst $(space),$(comma),$(foreach s,$(TIER1_PLUGINS),"$s"))] \ + | sed 's/^true:/on:/' \ + | sed 's/pull_request: null/pull_request:/'> $@ diff --git a/WORKSPACE b/WORKSPACE index 2df8d450d0ed..b63198ba4567 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -34,6 +34,7 @@ load("@rules_erlang//gazelle:deps.bzl", "gazelle_deps") gazelle_deps() +<<<<<<< HEAD http_file( name = "otp_src_24", downloaded_file_path = "OTP-24.3.4.6.tar.gz", @@ -76,6 +77,8 @@ http_file( urls = ["https://github.com/erlang/otp/archive/OTP-26.0.2.tar.gz"], ) +======= +>>>>>>> c78563a335 (Turn off BuildBuddy integration (backport #11343) (backport #11390) (#11416)) new_git_repository( name = "bats", build_file = "@//:BUILD.bats", @@ -90,9 +93,3 @@ activemq_archive() load("//bazel/bzlmod:secondary_umbrella.bzl", "secondary_umbrella") secondary_umbrella() - -git_repository( - name = "rbe", - branch = "linux-rbe", - remote = "https://github.com/rabbitmq/rbe-erlang-platform.git", -) diff --git a/bazel/bzlmod/extensions.bzl b/bazel/bzlmod/extensions.bzl index 121466979fc3..338c045a8ca8 100644 --- a/bazel/bzlmod/extensions.bzl +++ b/bazel/bzlmod/extensions.bzl @@ -95,64 +95,14 @@ elixir_config = module_extension( }, ) -def _rbe(ctx): - root_rbe_repo_props = [] - rbe_repo_props = [] - for mod in ctx.modules: - for repo in mod.tags.git_repository: - props = {"remote": repo.remote} - if repo.commit != "": - props["commit"] = repo.commit - if repo.tag != "": - props["tag"] = repo.tag - if repo.branch != "": - props["branch"] = repo.branch - if mod.is_root: - if not props in root_rbe_repo_props: - root_rbe_repo_props.append(props) - elif not props in rbe_repo_props: - rbe_repo_props.append(props) - - if len(root_rbe_repo_props) > 1: - fail("Multiple definitions for @rbe exist in root module: {}".format(rbe_repo_props)) - - if len(root_rbe_repo_props) > 0: - git_repository( - name = "rbe", - **root_rbe_repo_props[0] - ) - else: - if len(rbe_repo_props) > 1: - fail("Multiple definitions for @rbe exist: {}".format(rbe_repo_props)) - - if len(rbe_repo_props) > 0: - git_repository( - name = "rbe", - **rbe_repo_props[0] - ) - -git_repository_tag = tag_class(attrs = { - "remote": attr.string(), - "branch": attr.string(), - "tag": attr.string(), - "commit": attr.string(), -}) - -rbe = module_extension( - implementation = _rbe, - tag_classes = { - "git_repository": git_repository_tag, - }, -) - -def _secondary_umbrella(ctx): +def _secondary_umbrella(_ctx): fetch_secondary_umbrella() secondary_umbrella = module_extension( implementation = _secondary_umbrella, ) -def _hex(ctx): +def _hex(_ctx): http_archive( name = "hex", sha256 = "0e3e3290d0fcbdc6bb0526b73ca174d68dcff4d53ee86015c49ad0493e39ee65",