Live test: show the scheduler's state when no scheduled run starts (#69)
When the Scheduled workflow step finds no run, it prints the site admin scheduler status (tick_minutes, last_tick_at, covered_until, next_tick_at) and the time, so a red step says whether the scheduler stopped ticking or ticked without starting the run. Claude-Session: https://claude.ai/code/session_01Ruyx3Qr4jYrZEpPi466deb Co-authored-by: Claude <noreply@anthropic.com>
Canberk Demirci authored · GitHub committed signed1 parent db8ba35commit 01bc028bc27f77367d856c06475f0850676f03cdBrowse files
1 file changed+6−1
modified.github/workflows/live-test.yml+6−1View file
| @@ -589,7 +589,12 @@ | ||
| 589 | 589 | [ -n "$run" ] && [ "$(jq -r .status <<<"$run")" = completed ] && break |
| 590 | 590 | sleep 10 |
| 591 | 591 | done |
| 592 | - [ -n "$run" ] || { echo "::error::no scheduled run started"; exit 1; } | |
| 592 | + if [ -z "$run" ]; then | |
| 593 | + # Whether the scheduler stopped ticking (last_tick_at is old) or ticked without starting the run. | |
| 594 | + echo "scheduler: $(curl -sS "$DIFFINERY/api/v3/diffinery/admin/scheduler" -H "Authorization: Bearer $TOKEN") (now $(date -u +%FT%TZ))" | |
| 595 | + echo "::error::no scheduled run started" | |
| 596 | + exit 1 | |
| 597 | + fi | |
| 593 | 598 | echo "$run" | jq '{id, event, status, conclusion}' |
| 594 | 599 | [ "$(jq -r .conclusion <<<"$run")" = success ] || { echo "::error::the scheduled run did not succeed"; exit 1; } |
| 595 | 600 |