Skip to content

Commit e03af84

Browse files
Add timeout parameter to C-Chain re-execution jobs (#4223)
1 parent 0e20485 commit e03af84

File tree

5 files changed

+36
-15
lines changed

5 files changed

+36
-15
lines changed

.github/workflows/c-chain-reexecution-benchmark-container.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
"start-block": 101,
88
"end-block": 250000,
99
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
10-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**"
10+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**",
11+
"timeout-minutes": 30
1112
},
1213
{
1314
"runner": "avalanche-avalanchego-runner-2ti",
1415
"config": "default",
1516
"start-block": 101,
1617
"end-block": 250000,
1718
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
18-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**"
19+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**",
20+
"timeout-minutes": 30
1921
}
2022
]
2123
},

.github/workflows/c-chain-reexecution-benchmark-container.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
push-post-state:
3232
description: 'S3 location to push post-execution state directory. Skips this step if left unpopulated.'
3333
default: ''
34+
timeout-minutes:
35+
description: 'Timeout in minutes for the job.'
36+
required: false
37+
default: 30
3438

3539
# Disabled because scheduled trigger is empty. To enable, uncomment and add at least one vector to the schedule
3640
# entry in the corresponding JSON file.
@@ -51,13 +55,14 @@ jobs:
5155
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
5256
{
5357
echo "matrix<<EOF"
54-
printf '{ "include": [{ "start-block": "%s", "end-block": "%s", "block-dir-src": "%s", "current-state-dir-src": "%s", "config": "%s", "runner": "%s" }] }\n' \
58+
printf '{ "include": [{ "start-block": "%s", "end-block": "%s", "block-dir-src": "%s", "current-state-dir-src": "%s", "config": "%s", "runner": "%s", "timeout-minutes": "%s" }] }\n' \
5559
"${{ github.event.inputs.start-block }}" \
5660
"${{ github.event.inputs.end-block }}" \
5761
"${{ github.event.inputs.block-dir-src }}" \
5862
"${{ github.event.inputs.current-state-dir-src }}" \
5963
"${{ github.event.inputs.config }}" \
60-
"${{ github.event.inputs.runner }}"
64+
"${{ github.event.inputs.runner }}" \
65+
"${{ github.event.inputs.timeout-minutes }}"
6166
echo EOF
6267
} >> "$GITHUB_OUTPUT"
6368
else
@@ -74,7 +79,7 @@ jobs:
7479
strategy:
7580
fail-fast: false
7681
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
77-
82+
timeout-minutes: ${{ matrix.timeout-minutes }}
7883
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ava-labs/avalanchego' }}
7984
permissions:
8085
id-token: write

.github/workflows/c-chain-reexecution-benchmark-gh-native.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@
77
"start-block": 101,
88
"end-block": 250000,
99
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
10-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**"
10+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**",
11+
"timeout-minutes": 30
1112
},
1213
{
1314
"runner": "blacksmith-4vcpu-ubuntu-2404",
1415
"config": "default",
1516
"start-block": 101,
1617
"end-block": 250000,
1718
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
18-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**"
19+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**",
20+
"timeout-minutes": 30
1921
},
2022
{
2123
"runner": "blacksmith-4vcpu-ubuntu-2404",
2224
"config": "archive",
2325
"start-block": 101,
2426
"end-block": 250000,
2527
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
26-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-archive-100/**"
28+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-archive-100/**",
29+
"timeout-minutes": 30
2730
}
2831
]
2932
},
@@ -35,23 +38,26 @@
3538
"start-block": 101,
3639
"end-block": 250000,
3740
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
38-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**"
41+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-full-100/**",
42+
"timeout-minutes": 30
3943
},
4044
{
4145
"runner": "blacksmith-4vcpu-ubuntu-2404",
4246
"config": "archive",
4347
"start-block": 101,
4448
"end-block": 250000,
4549
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
46-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-archive-100/**"
50+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-hashdb-archive-100/**",
51+
"timeout-minutes": 30
4752
},
4853
{
4954
"runner": "blacksmith-4vcpu-ubuntu-2404",
5055
"config": "firewood",
5156
"start-block": 101,
5257
"end-block": 250000,
5358
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-1m-ldb/**",
54-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-100/**"
59+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-100/**",
60+
"timeout-minutes": 30
5561
}
5662
]
5763
}

.github/workflows/c-chain-reexecution-benchmark-gh-native.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
push-post-state:
3232
description: 'S3 location to push post-execution state directory. Skips this step if left unpopulated.'
3333
default: ''
34+
timeout-minutes:
35+
description: 'Timeout in minutes for the job.'
36+
required: false
37+
default: 30
3438

3539
jobs:
3640
define-matrix:
@@ -46,13 +50,14 @@ jobs:
4650
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
4751
{
4852
echo "matrix<<EOF"
49-
printf '{ "include": [{ "start-block": "%s", "end-block": "%s", "block-dir-src": "%s", "current-state-dir-src": "%s", "config": "%s", "runner": "%s" }] }\n' \
53+
printf '{ "include": [{ "start-block": "%s", "end-block": "%s", "block-dir-src": "%s", "current-state-dir-src": "%s", "config": "%s", "runner": "%s", "timeout-minutes": "%s" }] }\n' \
5054
"${{ github.event.inputs.start-block }}" \
5155
"${{ github.event.inputs.end-block }}" \
5256
"${{ github.event.inputs.block-dir-src }}" \
5357
"${{ github.event.inputs.current-state-dir-src }}" \
5458
"${{ github.event.inputs.config }}" \
55-
"${{ github.event.inputs.runner }}"
59+
"${{ github.event.inputs.runner }}" \
60+
"${{ github.event.inputs.timeout-minutes }}"
5661
echo EOF
5762
} >> "$GITHUB_OUTPUT"
5863
else
@@ -69,6 +74,7 @@ jobs:
6974
strategy:
7075
fail-fast: false
7176
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
77+
timeout-minutes: ${{ matrix.timeout-minutes }}
7278
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'ava-labs/avalanchego' }}
7379
permissions:
7480
id-token: write

tests/reexecute/c/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ For example, to add a new Firewood benchmark to execute the block range [30m, 40
144144
"start-block": 30000001,
145145
"end-block": 40000000,
146146
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-50m-ldb/**",
147-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-30m/**"
147+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-30m/**",
148+
"timeout-minutes": 1440
148149
}
149150
```
150151

@@ -169,7 +170,8 @@ Copy your desired parameters as JSON into a file or write it out on the command
169170
"start-block": "101",
170171
"end-block": "200",
171172
"block-dir-src": "s3://avalanchego-bootstrap-testing/cchain-mainnet-blocks-10k-ldb/**",
172-
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-100/**"
173+
"current-state-dir-src": "s3://avalanchego-bootstrap-testing/cchain-current-state-firewood-100/**",
174+
"timeout-minutes": "5"
173175
}
174176
```
175177

0 commit comments

Comments
 (0)