-
Notifications
You must be signed in to change notification settings - Fork 844
test(reexecute): add firewood chaos test [2/2] #4695
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 21 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8971646
refactor(reexecute): export NewMainnetCChainVM()
RodrigoVillar 4ec0964
test(reexecute): add firewood chaos test
RodrigoVillar 5c7ec5c
chore: exponential => linear
RodrigoVillar 9a893da
chore: add timeout when waiting for killed process to terminate
RodrigoVillar 4e1b5ac
chore: ctx
RodrigoVillar 7b6d057
chore: rebase nits
RodrigoVillar c8e8582
chore: remove unnecessary diff
RodrigoVillar 506a2e3
chore: remove deps.go
RodrigoVillar 004bc43
Merge branch 'master' into rodrigo/firewood-chaos-test
RodrigoVillar 98273a0
chore: rename task
RodrigoVillar d989910
chore: nit
RodrigoVillar fd0d1e0
Merge branch 'master' into rodrigo/firewood-chaos-test
RodrigoVillar 00a4852
refactor!: replace task logic with script
RodrigoVillar 8b17166
chore: add archival test
RodrigoVillar 8a239e6
fix: EOF
RodrigoVillar c84015d
fix: config
RodrigoVillar 9b24d42
refactor: remove JSON
RodrigoVillar f1c7cf0
fix: config (again)
RodrigoVillar ef82e6a
chore: rename chaos test yml
RodrigoVillar c793199
refactor!: merge chaos script into reexecution script"
RodrigoVillar 439dd59
Merge branch 'master' into rodrigo/firewood-chaos-test
RodrigoVillar b472805
chore: nits
RodrigoVillar 219b24a
refactor!: address PR comments
RodrigoVillar 59581a8
chore: defined tests set chaos defaults
RodrigoVillar c29a101
refactor: simplify chaos test validation conditional
RodrigoVillar ada0690
doc: make clear that chaos test works only with Firewood
RodrigoVillar 6464738
Merge branch 'master' into rodrigo/firewood-chaos-test
RodrigoVillar 4740b85
chore: license
RodrigoVillar 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
Some comments aren't visible on the classic Files Changed page.
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,111 @@ | ||
| name: Firewood Chaos Test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| test: | ||
| description: 'Test name to run (e.g., chaos-101-250k). Leave empty to use custom inputs below.' | ||
| default: '' | ||
| # Custom inputs (used when test is not provided) | ||
| start-block: | ||
maru-ava marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description: 'The start block for the benchmark.' | ||
| default: '' | ||
| end-block: | ||
| description: 'The end block for the benchmark.' | ||
| default: '' | ||
| block-dir-src: | ||
| description: 'The source block directory. Supports S3 directory/zip and local directories.' | ||
| default: '' | ||
| current-state-dir-src: | ||
| description: 'The current state directory. Supports S3 directory/zip and local directories.' | ||
| default: '' | ||
| # Chaos test specific inputs | ||
| config: | ||
| description: 'VM config preset (firewood, firewood-archive). Required for custom tests.' | ||
| default: 'firewood' | ||
| min-wait-time: | ||
| description: 'Minimum wait time before killing the process (e.g., 120s, 2m).' | ||
| default: '120s' | ||
| max-wait-time: | ||
| description: 'Maximum wait time before killing the process (e.g., 150s, 3m).' | ||
| default: '150s' | ||
| runner: | ||
| description: 'Runner to execute the chaos test. Input to the runs-on field of the job.' | ||
| required: true | ||
| timeout-minutes: | ||
| description: 'Timeout in minutes for the job.' | ||
| default: '60' | ||
| # XXX: remove this before merging | ||
| pull_request: | ||
|
Comment on lines
+38
to
+39
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for testing the PR - will remove prior to merging. |
||
| schedule: | ||
| - cron: '0 9 * * *' # Runs every day at 09:00 UTC (04:00 EST) | ||
|
|
||
| jobs: | ||
| define-matrix: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.define-matrix.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Define Matrix | ||
| id: define-matrix | ||
| shell: bash -x {0} | ||
| run: | | ||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||
| { | ||
| echo "matrix<<EOF" | ||
| printf '{ "include": [{ "test": "%s", "start-block": "%s", "end-block": "%s", "block-dir-src": "%s", "current-state-dir-src": "%s", "config": "%s", "min-wait-time": "%s", "max-wait-time": "%s", "runner": "%s", "timeout-minutes": %s }] }\n' \ | ||
| "${{ github.event.inputs.test }}" \ | ||
| "${{ github.event.inputs.start-block }}" \ | ||
| "${{ github.event.inputs.end-block }}" \ | ||
| "${{ github.event.inputs.block-dir-src }}" \ | ||
| "${{ github.event.inputs.current-state-dir-src }}" \ | ||
| "${{ github.event.inputs.config }}" \ | ||
| "${{ github.event.inputs.min-wait-time }}" \ | ||
| "${{ github.event.inputs.max-wait-time }}" \ | ||
| "${{ github.event.inputs.runner }}" \ | ||
| "${{ github.event.inputs.timeout-minutes }}" | ||
| echo EOF | ||
| } >> "$GITHUB_OUTPUT" | ||
| else | ||
| { | ||
| echo "matrix<<EOF" | ||
| echo '{ "include": [{ "test": "chaos-101-250k" }, { "test": "chaos-archive-101-250k" }] }' | ||
| echo EOF | ||
| } >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| firewood-chaos-test: | ||
| needs: define-matrix | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }} | ||
| timeout-minutes: ${{ matrix.timeout-minutes || 60 }} | ||
| runs-on: ${{ matrix.runner || 'ubuntu-latest' }} | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f #v31 | ||
| with: | ||
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_S3_READ_ONLY_ROLE }} | ||
| aws-region: 'us-east-2' | ||
| role-duration-seconds: '43200' | ||
| - uses: actions/checkout@v4 | ||
| - name: Run chaos test with Firewood | ||
| shell: nix develop --impure --command bash -x {0} | ||
| run: ./scripts/run_task.sh test-cchain-reexecution -- "${{ matrix.test || '' }}" | ||
| env: | ||
| CHAOS_MODE: 'true' | ||
| START_BLOCK: ${{ matrix.start-block }} | ||
| END_BLOCK: ${{ matrix.end-block }} | ||
| BLOCK_DIR_SRC: ${{ matrix.block-dir-src }} | ||
| CURRENT_STATE_DIR_SRC: ${{ matrix.current-state-dir-src }} | ||
| CONFIG: ${{ matrix.config }} | ||
| MIN_WAIT_TIME: ${{ matrix.min-wait-time }} | ||
| MAX_WAIT_TIME: ${{ matrix.max-wait-time }} | ||
|
|
||
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.
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.