-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make zombienet CI great again #8748
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
Merged
Merged
Changes from 88 commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
eae680e
ci: get correct SHA in case of workflow_dispatch
lrubasze d9fd57c
ci: get correct SHA in case of workflow_dispatch
lrubasze aaad86c
ci: debugs
lrubasze c9855d2
ci: use full git sha to specify images version or to get gh run status
lrubasze dfd6379
ci: do not skip zombienet tests if manually started
lrubasze 6f0c4fc
feat: add reusable artifact download and extract action
lrubasze 14f4e0c
feat: add cleanup flag to download-artifact-extract action
lrubasze 0ebd138
ci: fetch required binaries for zombienet native provider
lrubasze b2e3653
ci: fix syntax
lrubasze f80709a
ci: zombienet-sdk add some description
lrubasze 8d105d8
ci: set ZOMBIE_PROVIDER=native
lrubasze 61bc930
ci: set +x permissions for downloaded binaries
lrubasze c0f1247
ci: change runner for zombienet-sdk
lrubasze c6124f9
ci: temporarily disable non-cumulus zombienet-sdk
lrubasze 0a96493
ci: change image for zombienet-sdk
lrubasze c3a0de0
ci: simplify download-artifact logic
lrubasze a9ed6e6
ci: download-artifact check befory copy
lrubasze 452c6c4
ci: remove k8s_auth step
lrubasze 781643f
ci: do not retry 'zombienet-sdk' tests
lrubasze 2ea076c
ci: unset RUN_IN_CI for zombienet-sdk
lrubasze 0683d1b
ci: cleanup
lrubasze 4acf862
ci: zombienet-sdk handle RUN_IN_CI flag depending on provider
lrubasze 79d8ea9
ci: parity-large runner for zombienet-sdk
lrubasze 86fc491
ci: reenable zombienet test for polkadot
lrubasze 7fd727f
ci: specify zombienet-sdk envs in separate file
lrubasze 3cbe8b8
ci: fix handling zombienet-sdk vars
lrubasze 3494640
ci: process logs for zombienet-sdk tests
lrubasze 9874e21
ci: cleanup
lrubasze 970d213
ci: fix runner and images for zombienet-sdk cumulus
lrubasze 8d14ad8
ci: cleanup
lrubasze 632e252
polkadot-zombienet: add more tolerance to elastic_scaling slot_based …
lrubasze b4781c6
polkadot-zombienet: add even more tolerance to elastic_scaling slot_b…
lrubasze 32dfeed
polkadot-zombienet: 0018-shared-core-idle-parachain increase timeout
lrubasze 66579f1
polkadot-zombienet: increase tolerance for doesnt_break_parachains test
lrubasze d4d6eab
cumulus-zombienet-sdk-helpers: add more debug information
lrubasze 4fa9763
ci: disable zombienet-polkadot-approved-peer-mixed-validators test
lrubasze 9e5b9da
ci: truly disable zombienet-polkadot-approved-peer-mixed-validators test
lrubasze 2f66654
ci: switch cumulus zombienet tests to use zombienet action
lrubasze e4903e1
add logic for new cluster
pepoviola 59f71d8
add logic for new cluster
pepoviola 725b3ab
typo
pepoviola 20cc2fd
bump zombienet version
pepoviola 831c38a
ci: update parachain_template to use zombienet-sdk actions
lrubasze 9150a22
ci: cargo-nextest remove conflicting 'test-threads' option
lrubasze b8e1eea
ci: run zombienet tests with native provider
lrubasze fab2512
polkadot-zombienet: 0001-paritydb adjust check script for native prov…
lrubasze c877a09
ci: add missing inputs to zombienet action
lrubasze aed4dab
ci: RUN_IN_CONTAINER unset and moved to zombienet.env
lrubasze 0ab178f
ci: unset ZOMBIENET_IMAGE in run-zombienet-test.sh
lrubasze 5221d18
ci: disable some flaky polkadot zombienet tests
lrubasze 3b4b99b
ci: update and enable zombienet parachain_template
lrubasze 96a97e2
ci: add action to download binaries for zombienet tests
lrubasze de6094e
ci: allow to easily switch between zombienet native and k8s providers
lrubasze 4b08819
ci: zombienet-reusable-preflight cleanup
lrubasze fdc9c2b
ci: zombient_polkadot add ZOMBIENET_PROVIDER to the env
lrubasze 1b1d49d
polkadot-zombienet: add more tolerance to elastic_scaling basic_3core…
lrubasze d111d3f
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze 69f0839
Update .github/zombienet-sdk-env
pepoviola 76a661b
ci: update zombienet image to v1.3.129
lrubasze 004314f
polkadot-zombienet: add more tolerance to sync_backing test
lrubasze 081cc85
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze 46189af
bump 'zombienet-sdk' to v0.3.6
lrubasze f345247
move to zombienet action
pepoviola 5c7375e
re-enable substrate tests
pepoviola 352aa9f
set native provider
pepoviola 60dc9b1
add download for substrate
pepoviola a6fd057
fix substrate extract artifact
pepoviola 4262a95
polkadot-zombienet: add more tolerance to async_backing_6_seconds_rat…
lrubasze 7de2b43
ci: fix cumulus tests
lrubasze 53968d9
bump images
pepoviola 71568b6
ci: disable zombienet polkadot disputes tests
lrubasze 800b2e1
ci: specify FLAKY_TESTS multiline-wise for more clarity
lrubasze dff3947
ci: zombienet-reusable-preflight cleanup
lrubasze 5f33892
ci: add option to pick runner for test: default, large (atm all tests…
lrubasze 029beca
ci: fix runner configuration
lrubasze 4e1bcbf
ci: zombienet_polkadot assign default runner for some tests
lrubasze be460df
ci: zombienet_substrate assign default runner for some tests
lrubasze a318100
ci: zombienet_parachain-templat assign default runner for some tests
lrubasze e2abdb7
ci: zombienet_cumulus assign default runner for some tests
lrubasze 2a7d675
ci: temporarily increase artifact retention days to 2
lrubasze 1b39af7
Revert "ci: temporarily increase artifact retention days to 2"
lrubasze aac059c
ci: zombienet_polkadot assign large runner for smoke-0004-coretime-sm…
lrubasze 641935a
polkadot-zombienet: add more tolerance to elastic_scaling basic_3core…
lrubasze 6992b69
ci: disable some flaky zombienet polkadot tests
lrubasze 84f330c
ci: disable some flaky zombienet substrate tests
lrubasze 79c4a3b
ci: disable zombienet cumulus tests
lrubasze 99c924f
ci: disable zombienet parachain-template tests
lrubasze 5b7beef
bump zombienet version
pepoviola e3d1e8f
ci: comment
lrubasze 8a10e44
bump zombienet version and feedback
pepoviola e8bbde8
bump zombienet version
pepoviola e9de02d
Merge branch 'master' into ci/make-zombienet-ci-great-again
pepoviola 45355e0
Update from github-actions[bot] running command 'fmt'
github-actions[bot] b6505cd
add logic to download old releases
pepoviola 5653678
use .bin dir
pepoviola 3475f75
Test sidecar runners
lazam 6cfeb66
Revert sidecar runners
lazam 4b8d182
use old dir for old bins
pepoviola f9ebe65
typo and comments
pepoviola a6c5747
Merge branch 'master' into ci/make-zombienet-ci-great-again
pepoviola b540c96
do not rename workers
pepoviola 644a519
fix command for 'old' collators
pepoviola bf24619
fix test with old release
pepoviola a5d4588
resolve and merge
pepoviola 9908a59
small fixes and enable test
pepoviola e43b27d
re-enable tests
pepoviola 9ba1319
ci: enable zombienet-polkadot-shared-core-idle-parachain test
lrubasze e3fcc98
ci: fix ZOMBIENET_LARGE_RUNNER assignment
lrubasze c008970
ci: fix shared-core-idle-parachain CI setup
lrubasze c79bb66
ci: merge zombienet-env and zombienet-sdk-env
lrubasze 039eb2f
move to new native runners, default
pepoviola c99f761
ci: remove reference to missing zombienet-sdk-env
lrubasze 4c0a19d
ci: zombienet-reusable-preflight.yml cleanup
lrubasze 087dd0e
ci: disable zombienet-substrate-0002-validators-warp-sync
lrubasze 29b5c0b
ci: disable zombienet-substrate-0003-block-building-warp-sync
lrubasze 26a4154
new large runners for native
pepoviola e1491fa
ci: enable zombienet cumulus and polkadot on push and merge
lrubasze afbd902
ci: skip zombienet CI if T19-skip-zombienet_tests label present
lrubasze 7d50c8d
ci: use intermediate env variables to avoid script injection
lrubasze e3155db
ci: add some context to the scripts
lrubasze b420809
Merge branch 'master' into ci/make-zombienet-ci-great-again
pepoviola da8a381
cleanup
lrubasze 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 hidden or 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,78 @@ | ||
| name: "Download and extract artifact" | ||
| description: "Downloads an artifact, extracts it, and optionally copies files to a destination" | ||
|
|
||
| inputs: | ||
| artifact-name: | ||
| description: "Name of the artifact to download" | ||
| required: true | ||
| gh-token: | ||
| description: "GITHUB_TOKEN to use for downloading artifacts" | ||
| required: true | ||
| run-id: | ||
| description: "Run ID from which to download the artifact" | ||
| required: true | ||
| extract-path: | ||
| description: "Path where to extract the artifact" | ||
| default: "." | ||
| required: false | ||
| files-to-copy: | ||
| description: "Comma-separated (or newline-separated, remember about |) list of files to copy from the extracted artifact" | ||
| required: false | ||
| destination-path: | ||
| description: "Destination path for copied files" | ||
| required: false | ||
| cleanup: | ||
| description: "Whether to remove downloaded artifacts after copying (true/false)" | ||
| required: false | ||
| default: "false" | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| with: | ||
| name: ${{ inputs.artifact-name }} | ||
| github-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.run-id }} | ||
| path: ${{ inputs.extract-path }} | ||
|
|
||
| - name: Extract artifact | ||
| shell: bash | ||
| working-directory: ${{ inputs.extract-path }} | ||
| run: | | ||
| if [[ -f artifacts.tar ]]; then | ||
| tar -xvf artifacts.tar | ||
| elif [[ -f *.tar ]]; then | ||
| tar -xvf *.tar | ||
| elif [[ -f *.tar.gz ]]; then | ||
| tar -xzvf *.tar.gz | ||
| elif [[ -f *.tgz ]]; then | ||
| tar -xzvf *.tgz | ||
| elif [[ -f *.zip ]]; then | ||
| unzip *.zip | ||
| else | ||
| echo "No archive file found to extract" | ||
| ls -la | ||
| fi | ||
|
|
||
| - name: Copy files if specified | ||
| if: inputs.files-to-copy != '' | ||
| shell: bash | ||
| run: | | ||
| # Create destination directory | ||
| mkdir -p "${{ inputs.destination-path }}" | ||
|
|
||
| echo "${{ inputs.files-to-copy }}" | tr ',' '\n' | while read -r file; do | ||
| # trim leading and trailing whitespaces | ||
| file="$(echo "$file" | xargs)" | ||
| if [[ -n "$file" ]]; then | ||
| echo "Copying $file to ${{ inputs.destination-path }}" | ||
| cp -r "${{ inputs.extract-path }}/$file" "${{ inputs.destination-path }}/" | ||
| fi | ||
| done | ||
|
|
||
| # Cleanup if requested | ||
| if [[ "${{ inputs.cleanup }}" == "true" ]]; then | ||
| echo "Cleaning up downloaded artifacts in ${{ inputs.extract-path }}" | ||
| rm -rf "${{ inputs.extract-path }}" | ||
| fi | ||
104 changes: 104 additions & 0 deletions
104
.github/actions/download-binaries-for-zombienet-tests/action.yml
This file contains hidden or 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,104 @@ | ||
| name: "Download binaries for zombienet tests" | ||
| description: "Zombienet native tests expects some set of binaries to be available in the filesystem" | ||
|
|
||
| inputs: | ||
| build-id: | ||
| description: "" | ||
| required: true | ||
| ref-slug: | ||
| description: "Ref slug (e.g branch-name-short)" | ||
| required: true | ||
| gh-token: | ||
| description: "GITHUB_TOKEN to use for downloading artifacts" | ||
| required: true | ||
| destination-path: | ||
| description: "Destination path for copied files" | ||
| required: false | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-linux-substrate-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/substrate/substrate | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-linux-stable-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/polkadot | ||
| artifacts/polkadot-execute-worker | ||
| artifacts/polkadot-prepare-worker | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-linux-stable-cumulus-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/polkadot-parachain | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-test-parachain-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/test-parachain | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-test-collators-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/adder-collator | ||
| artifacts/undying-collator | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-malus-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| # TODO: should copy polkadot-execute-worker and polkadot-prepare-worker? | ||
| # if yes then it overlaps with build-linux-stable - address this | ||
| files-to-copy: | | ||
| artifacts/malus | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| artifact-name: build-templates-node-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
| extract-path: ./tmp | ||
| files-to-copy: | | ||
| artifacts/minimal-template-node | ||
| artifacts/parachain-template-node | ||
| artifacts/solochain-template-node | ||
| destination-path: ${{ inputs.destination-path }} | ||
| cleanup: "true" |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| name: "Zombienet-sdk test" | ||
| description: "Runs zombienet-sdk tests with archived artifacts" | ||
| inputs: | ||
| build-id: | ||
| description: "" | ||
| required: true | ||
| ref-slug: | ||
| description: | ||
| description: "Ref slug (e.g branch-name-short)" | ||
| required: true | ||
| test: | ||
| description: "test filter to pass to nextest (e.g: functional::spam_statement_distribution_requests::spam_statement_distribution_requests_test)" | ||
|
|
@@ -21,12 +22,6 @@ inputs: | |
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: k8s_auth | ||
| shell: bash | ||
| run: | | ||
| . /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh | ||
| k8s_auth | ||
|
|
||
| - name: common_vars | ||
| shell: bash | ||
| env: | ||
|
|
@@ -35,34 +30,78 @@ runs: | |
| run: | | ||
| echo "Vars" | ||
| echo "ZOMBIENET_INTEGRATION_TEST_IMAGE: $ZOMBIENET_INTEGRATION_TEST_IMAGE" | ||
| echo "COL_IMAGE: $COL_IMAGE" | ||
| echo "ZOMBIE_PROVIDER": $ZOMBIE_PROVIDER | ||
| echo "POLKADOT_IMAGE: $POLKADOT_IMAGE" | ||
| echo "CUMULUS_IMAGE: $CUMULUS_IMAGE" | ||
| echo "COL_IMAGE: $COL_IMAGE" | ||
| echo "MALUS_IMAGE: $MALUS_IMAGE" | ||
| echo "RUN_IN_CI: $RUN_IN_CI" | ||
| echo "Inputs" | ||
| echo "test: $TEST_NAME" | ||
| echo "prefix: $PREFIX" | ||
|
|
||
| - uses: actions/[email protected] | ||
| - name: Download binaries for zombienet native tests | ||
| if: env.ZOMBIE_PROVIDER == 'native' | ||
| uses: ./.github/actions/download-binaries-for-zombienet-tests | ||
| with: | ||
| gh-token: ${{ inputs.gh-token }} | ||
| ref-slug: ${{ inputs.ref-slug }} | ||
| build-id: ${{ inputs.build-id }} | ||
| destination-path: ./bin | ||
|
|
||
| - uses: ./.github/actions/download-artifact-extract | ||
| with: | ||
| name: prepare-${{ inputs.prefix }}-zombienet-artifacts-${{ inputs.ref-slug }} | ||
| github-token: ${{ inputs.gh-token }} | ||
| artifact-name: prepare-${{ inputs.prefix }}-zombienet-artifacts-${{ inputs.ref-slug }} | ||
| gh-token: ${{ inputs.gh-token }} | ||
| run-id: ${{ inputs.build-id }} | ||
|
|
||
| - name: tar | ||
| - name: k8s_auth | ||
| if: env.ZOMBIE_PROVIDER == 'k8s' | ||
| shell: bash | ||
| run: tar -xvf artifacts.tar | ||
| run: | | ||
| . /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh | ||
| k8s_auth | ||
|
|
||
| - name: zombie_test | ||
| shell: bash | ||
| env: | ||
| # zombienet-sdk expects RUN_IN_CI to be set when running in CI | ||
| RUN_IN_CI: 1 | ||
| # don't retry sdk tests | ||
| NEXTEST_RETRIES: 0 | ||
| TEST_NAME: ${{ inputs.test }} | ||
| PREFIX: ${{ inputs.prefix }} | ||
| run: | | ||
| ls -ltr ./artifacts | ||
| cargo nextest run --archive-file ./artifacts/${PREFIX}-zombienet-tests.tar.zst --no-capture -- ${TEST_NAME} | ||
| # RUN_IN_CI=1 shall be set only for k8s provider | ||
| if [[ "$ZOMBIE_PROVIDER" == "native" ]]; then | ||
| export RUN_IN_CI=0 | ||
| # set path to downloaded binaries | ||
| export PATH=$(pwd)/bin:$PATH | ||
| chmod +x $(pwd)/bin/* | ||
| else | ||
| export RUN_IN_CI=1 | ||
| # no need to check other runner variables. for k8s they shall store the same value | ||
| if [[ $ZOMBIENET_SDK_DEFAULT_RUNNER == "parity-zombienet" ]]; then | ||
| export ZOMBIE_K8S_CI_NAMESPACE=$(cat /data/namespace) | ||
| fi | ||
| fi | ||
|
|
||
| ls -ltr ./artifacts | ||
| # We want to run tests sequentially, '--no-capture' ensures that. | ||
| # If we want to get rid of '--no-capture' some day, please use '--test-threads 1' or NEXTEST_TEST_THREADS=1 | ||
| # Both options cannot coexist for cargo-nextest below v0.9.94 | ||
| cargo nextest run --archive-file ./artifacts/${PREFIX}-zombienet-tests.tar.zst --no-capture -- ${TEST_NAME} | ||
|
|
||
| - name: process_logs | ||
| if: ${{ ! cancelled() }} | ||
| shell: bash | ||
| run: | | ||
| echo "Processing log files" | ||
| echo "::group::Logs" | ||
| # do not fail the whole run if this step fails | ||
| if ! ./.github/scripts/process-logs-zombienet-sdk.sh ; then | ||
| echo "::endgroup::" | ||
| echo "::warning ::WARNING: Failed to process logs" | ||
| else | ||
| echo "::endgroup::" | ||
| fi | ||
|
|
||
| - name: upload_logs | ||
| uses: actions/upload-artifact@v4 | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.