Skip to content

amqqueue_process: adopt new is_duplicate backing queue callback #2

amqqueue_process: adopt new is_duplicate backing queue callback

amqqueue_process: adopt new is_duplicate backing queue callback #2

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_MIXED:
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
<<<<<<< HEAD

Check failure on line 32 in .github/workflows/test-plugin-mixed.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-plugin-mixed.yaml

Invalid workflow file

You have an error in your yaml syntax on line 32
# Khepri is currently skipped because Khepri is an unstable feature: we don't guarantee upgrability.
# Mixed-version tests currently fail with Khepri because of a new machine version introduced in
# Khepri v0.14.0.
# - khepri
=======
- khepri
>>>>>>> 8d7535e0b (amqqueue_process: adopt new `is_duplicate` backing queue callback)
include:
- erlang_version: 26
elixir_version: 1.17
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/[email protected]
with:
otp-version: ${{ matrix.erlang_version }}
elixir-version: ${{ matrix.elixir_version }}
hexpm-mirrors: |
https://builds.hex.pm
https://cdn.jsdelivr.net/hex
- name: AUTHENTICATE TO GOOGLE CLOUD
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }}
- name: CONFIGURE BAZEL
run: |
if [ -n "${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}" ]; then
cat << EOF >> user.bazelrc
build --remote_cache=https://storage.googleapis.com/${{ secrets.REMOTE_CACHE_BUCKET_NAME_MIXED }}
build --google_default_credentials
build --experimental_guard_against_concurrent_changes
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: '8.0'
- 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_auth_backend_ldap SETUP
if: inputs.plugin == 'rabbitmq_auth_backend_ldap'
run: |
sudo apt-get update && \
sudo apt-get install -y \
ldap-utils \
slapd
sudo systemctl is-active --quiet apparmor.service && sudo systemctl stop apparmor.service
sudo systemctl disable apparmor.service
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_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 }}/*