Skip to content

Commit e653695

Browse files
committed
ci(actions): enforce downstream budget with command timeouts
1 parent a9e7c13 commit e653695

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

scripts/performance-tests-kevm.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,17 @@ read -r feature_exit feature_duration < <(
162162
downstream_perf_run_and_log \
163163
"$FEATURE_LOG" \
164164
feature_shell \
165-
"make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv $BUG_REPORT --kompiled-targets-dir $PREKOMPILED_DIR'"
165+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv $BUG_REPORT --kompiled-targets-dir $PREKOMPILED_DIR'"
166166
)
167167
FEATURE_DURATION_SECONDS=$feature_duration
168168
killall kore-rpc-booster || echo "No zombie processes found"
169169

170170
if [[ $feature_exit -ne 0 ]]; then
171+
if [[ $feature_exit -eq 124 ]]; then
172+
FEATURE_STATUS=budget-exceeded
173+
SKIP_REASON='feature-run-exceeded-budget'
174+
exit 1
175+
fi
171176
FEATURE_STATUS=failure
172177
if [[ $BASELINE_COMMIT == $HEAD_COMMIT ]]; then
173178
BASELINE_STATUS=skipped
@@ -180,7 +185,7 @@ if [[ $feature_exit -ne 0 ]]; then
180185
downstream_perf_run_and_log \
181186
"$BASELINE_LOG" \
182187
master_shell \
183-
"make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv --kompiled-targets-dir $PREKOMPILED_DIR'"
188+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv --kompiled-targets-dir $PREKOMPILED_DIR'"
184189
)
185190
BASELINE_DURATION_SECONDS=$baseline_duration
186191
killall kore-rpc-booster || echo "No zombie processes found"
@@ -221,7 +226,7 @@ if [ -z "$BUG_REPORT" ]; then
221226
downstream_perf_run_and_log \
222227
"$BASELINE_LOG" \
223228
master_shell \
224-
"make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv --kompiled-targets-dir $PREKOMPILED_DIR'"
229+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-prove-rules PYTEST_PARALLEL=$PYTEST_PARALLEL PYTEST_ARGS='--maxfail=0 -vv --kompiled-targets-dir $PREKOMPILED_DIR'"
225230
)
226231
BASELINE_DURATION_SECONDS=$baseline_duration
227232
killall kore-rpc-booster || echo "No zombie processes found"

scripts/performance-tests-kontrol.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,17 @@ read -r feature_exit feature_duration < <(
176176
downstream_perf_run_and_log \
177177
"$FEATURE_LOG" \
178178
feature_shell \
179-
"make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
179+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
180180
)
181181
FEATURE_DURATION_SECONDS=$feature_duration
182182
killall kore-rpc-booster || echo "no zombie processes found"
183183

184184
if [[ $feature_exit -ne 0 ]]; then
185+
if [[ $feature_exit -eq 124 ]]; then
186+
FEATURE_STATUS=budget-exceeded
187+
SKIP_REASON='feature-run-exceeded-budget'
188+
exit 1
189+
fi
185190
FEATURE_STATUS=failure
186191
if [[ $BASELINE_COMMIT == $HEAD_COMMIT ]]; then
187192
BASELINE_STATUS=skipped
@@ -195,7 +200,7 @@ if [[ $feature_exit -ne 0 ]]; then
195200
downstream_perf_run_and_log \
196201
"$BASELINE_LOG" \
197202
master_shell \
198-
"make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
203+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
199204
)
200205
BASELINE_DURATION_SECONDS=$baseline_duration
201206
killall kore-rpc-booster || echo "no zombie processes found"
@@ -237,7 +242,7 @@ if [ -z "$BUG_REPORT" ]; then
237242
downstream_perf_run_and_log \
238243
"$BASELINE_LOG" \
239244
master_shell \
240-
"make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
245+
"timeout ${FEATURE_BUDGET_SECONDS}s make test-integration TEST_ARGS=$QUOTE$TEST_ARGS$QUOTE"
241246
)
242247
BASELINE_DURATION_SECONDS=$baseline_duration
243248
killall kore-rpc-booster || echo "no zombie processes found"

0 commit comments

Comments
 (0)