Skip to content

Commit 99d5a36

Browse files
authored
fix(track-performance): stale cron expression in daily bench (#1667)
## Why this should be merged Today's scheduled daily benchmark run [failed](https://github.com/ava-labs/firewood/actions/runs/21894045008) because `github.event.schedule` returned `0 5 * * *` a cron expression that was updated to `0 5 * * 1-5`: #1659 https://github.com/ava-labs/firewood/actions/runs/21894045008/job/63219300944#step:2:121 Opened bug report actions/runner#4241 ## How this works - Matches the stale `0 5 * * *` cron alongside `0 5 * * 1-5` in the case statement so the run doesn't hard-fail - Adds a weekend guard if the stale cron fires on Saturday or Sunday, the run exits early since those days aren't meant for the daily benchmark ## How this was tested Hard to test cron scheduling without trial and error approach unfortunately.
1 parent 49b6ae6 commit 99d5a36

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/track-performance.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,17 @@ jobs:
6767
6868
# Cron strings must match exactly from schedule definitions above
6969
case "${{ github.event.schedule }}" in
70-
"0 5 * * 1-5") # Weekdays at 05:00 UTC: 1M blocks (40M → 41M)
70+
# TODO(elvis339): Remove '0 5 * * *' match and weekend guard once resolved:
71+
# https://github.com/actions/runner/issues/4241
72+
# GitHub's scheduler fires a stale cron ('0 5 * * *') from a previous
73+
# workflow version instead of the current '0 5 * * 1-5'. When that happens
74+
# on a weekend, skip the run to avoid wasting runner time.
75+
"0 5 * * 1-5"|"0 5 * * *") # Weekdays at 05:00 UTC: 1M blocks (40M → 41M)
76+
DOW=$(date -u +%u) # 1=Mon ... 6=Sat, 7=Sun
77+
if [[ "$DOW" -ge 6 ]]; then
78+
echo "::notice::Weekend (DOW=$DOW) skipping"
79+
exit 0
80+
fi
7181
echo "::notice::Schedule: daily-40m-41m (blocks 40000001-41000000)"
7282
echo "name=daily-40m-41m" >> "$GITHUB_OUTPUT"
7383
echo "start-block=40000001" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)