-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: deflaker CI for testnet branch #9820
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
95b107b
deflake branch
ludamad f4ab000
deflake branch
ludamad 9a927e6
comment
ludamad 69a4284
syntax fix
ludamad c595e4a
Update ci-deflake.yml
ludamad 05da502
Update ci-deflake.yml
ludamad 37191d0
Update ci-deflake.yml
ludamad ca8a6f5
Update ci-deflake.yml
ludamad 90d1a59
Update ci-deflake.yml
ludamad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
# A testnet release-oriented set of tests to run 5 times to deflake them. | ||
name: CI (deploy branch) | ||
on: | ||
push: | ||
branches: | ||
- release/testnet* | ||
- '*/*deflake' | ||
workflow_dispatch: | ||
inputs: {} | ||
|
||
concurrency: | ||
# force parallelism in master | ||
group: ci-${{ github.ref_name == 'master' && github.run_id || github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
RUN_ID: ${{ github.run_id }} | ||
RUN_ATTEMPT: ${{ github.run_attempt }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GH_SELF_HOSTED_RUNNER_TOKEN: ${{ secrets.GH_SELF_HOSTED_RUNNER_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }} | ||
GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | ||
# kludge until we move away from runners | ||
WAIT_FOR_RUNNERS: false | ||
|
||
jobs: | ||
configure: | ||
runs-on: ubuntu-20.04 | ||
# Required permissions. | ||
permissions: | ||
pull-requests: read | ||
# Set job outputs to values from filter step. | ||
# Set username to a value derived from our github username. | ||
outputs: | ||
username: ${{ steps.compute_username.outputs.username }} | ||
yarn-project: ${{ steps.filter.outputs.yarn-project }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- name: Compute Username | ||
id: compute_username | ||
shell: bash | ||
env: | ||
REPO: "${{ github.repository }}" | ||
BRANCH: "${{ github.ref_name }}" | ||
run: | | ||
GIT_HASH="${{ github.sha }}" | ||
GIT_HASH_LAST8=${GIT_HASH: -8} | ||
GIT_HASH_LAST8_DEC=$(printf "%d" 0x$GIT_HASH_LAST8) | ||
GIT_HASH_MODULO_8=$((GIT_HASH_LAST8_DEC % 8)) | ||
echo "username=master-${GIT_HASH_MODULO_8}" | ||
echo "username=master-${GIT_HASH_MODULO_8}" >> $GITHUB_OUTPUT | ||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | ||
id: filter | ||
with: | ||
filters: | | ||
yarn-project: | ||
- 'yarn-project/**' | ||
|
||
setup: | ||
needs: [configure] | ||
uses: ./.github/workflows/setup-runner.yml | ||
with: | ||
username: ${{ needs.configure.outputs.username }}-x86 | ||
runner_type: builder-x86 | ||
secrets: inherit | ||
|
||
build: | ||
needs: [setup, configure] | ||
runs-on: ${{ needs.configure.outputs.username }}-x86 | ||
if: needs.configure.outputs.yarn-project == 'true' | ||
outputs: | ||
e2e_list: ${{ steps.e2e_list.outputs.list }} | ||
bench_list: ${{ steps.bench_list.outputs.list }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: build-x86 | ||
# prepare images locally, tagged by commit hash | ||
- name: "Build E2E Image" | ||
timeout-minutes: 40 | ||
run: | | ||
earthly-ci ./yarn-project+export-e2e-test-images | ||
|
||
# run specific end to end tests to deflake | ||
e2e: | ||
needs: [build, configure] | ||
if: needs.configure.outputs.yarn-project == 'true' | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: | ||
- e2e_2_pxes | ||
- e2e_block_building | ||
- e2e_prover_coordination | ||
- e2e_prover_full | ||
- e2e_p2p_gossip | ||
- e2e_p2p_rediscovery | ||
- e2e_p2p_reqresp | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
- name: Determine runner type | ||
id: runner_type | ||
run: | | ||
runner=$(./scripts/ci/select_runner.sh ${{ matrix.test }}) | ||
echo "type=$runner" >> $GITHUB_OUTPUT | ||
- name: Setup and Test | ||
timeout-minutes: 200 | ||
uses: ./.github/ensure-tester-with-images | ||
env: | ||
USERNAME: ${{ needs.configure.outputs.username }} | ||
with: | ||
runner_type: ${{ steps.runner_type.outputs.type }} | ||
builder_type: builder-x86 | ||
builder_images_to_copy: aztecprotocol/aztec:${{ env.GIT_COMMIT }} aztecprotocol/end-to-end:${{ env.GIT_COMMIT }} | ||
builder_command: scripts/earthly-ci ./yarn-project+export-e2e-test-images | ||
tester_ttl: 200 | ||
run: | | ||
set -eux | ||
cd ./yarn-project/end-to-end/ | ||
export FORCE_COLOR=1 | ||
for i in {1..5} ; do | ||
echo "START OF RUN $i" | ||
./scripts/e2e_test.sh ${{ matrix.test }} | ||
echo "END OF RUN $i" | ||
done | ||
|
||
# note: proving disabled | ||
kind-network-test: | ||
needs: [build, configure] | ||
if: needs.configure.outputs.yarn-project == 'true' | ||
runs-on: ${{ needs.configure.outputs.username }}-x86 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- test: reorg.test.ts | ||
values: 16-validators | ||
runner_type: 16core-tester-x86-high-memory | ||
timeout: 360 | ||
- test: 4epochs.test.ts | ||
values: 48-validators | ||
runner_type: 32core-tester-x86 | ||
timeout: 300 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: kind-network-${{ matrix.config.test }} | ||
- name: Setup and KIND Network Test | ||
timeout-minutes: ${{ matrix.config.timeout }} | ||
uses: ./.github/ensure-tester-with-images | ||
env: | ||
USERNAME: ${{ needs.configure.outputs.username }} | ||
with: | ||
runner_type: ${{ matrix.config.runner_type }} | ||
spot_strategy: None # use on-demand machines | ||
builder_type: builder-x86 | ||
# these are copied to the tester and expected by the earthly command below | ||
# if they fail to copy, it will try to build them on the tester and fail | ||
builder_images_to_copy: aztecprotocol/aztec:${{ env.GIT_COMMIT }} aztecprotocol/end-to-end:${{ env.GIT_COMMIT }} | ||
# command to produce the images in case they don't exist | ||
builder_command: scripts/earthly-ci ./yarn-project+export-e2e-test-images | ||
tester_ttl: ${{ matrix.config.timeout }} | ||
run: | | ||
cd yarn-project/end-to-end | ||
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin | ||
test=${{ matrix.config.test }} | ||
for i in {1..5} ; do | ||
echo "START OF RUN $i" | ||
NAMESPACE="${test%.test.ts}" FRESH_INSTALL=true VALUES_FILE=${{ matrix.config.values }}.yaml ./scripts/network_test.sh ./src/spartan/$test | ||
echo "END OF RUN $i" | ||
fi | ||
- name: Copy Network Logs | ||
if: always() # Run on failure too | ||
run: copy_from_tester /home/ubuntu/run-${{ env.RUN_ID }}/yarn-project/end-to-end/scripts/network-test.log network-test.log | ||
- name: Upload Network Logs | ||
if: always() # Run on failure too | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: kind-network-test-${{ matrix.config.values }}-${{ matrix.config.test }}.log | ||
path: network-test.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- master | ||
- release/testnet* | ||
- "*/release-master*" | ||
workflow_dispatch: | ||
inputs: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think remove this right?