ci: add per-script timing to script-test target#2530
Conversation
Wrap each script-test invocation in a run-timed macro that emits ::debug:: annotations with elapsed seconds. Hidden by default; visible when re-running a job with "Enable debug logging" checked. Local run shows post-prioritize-test.sh dominates at ~213s of ~225s total. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
PR Summary by QodoAdd per-script timing debug logs to Description
Diagram
High-Level Assessment
Files changed (1)
|
Site previewPreview: https://83f075da-site.fullsend-ai.workers.dev Commit: |
Code Review by Qodo
1.
|
|
🤖 Finished Review · ✅ Success · Started 7:23 PM UTC · Completed 7:31 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runReviewFindingsCritical
Labels: PR modifies the Makefile CI test target (script-test) |
| lint-md-links: | ||
| lychee --offline --no-progress --include-fragments --exclude-path node_modules --exclude-path experiments '**/*.md' | ||
|
|
||
| define run-timed |
There was a problem hiding this comment.
[critical] error handling gap
The run-timed macro silently swallows test failures. The expanded shell command joins the test invocation ($(1)) and the timing bookkeeping with ; (semicolons), so the exit code of the entire recipe line is that of the last command (printf), which always succeeds. If a test script exits non-zero, Make will not see the failure, will not abort, and CI will pass green. In the original code, each test was its own recipe line whose exit code Make checked directly.
Suggested fix: Capture the exit code and re-exit with it after printing timing. For example: $(1); rc=$$?; elapsed=...; printf ...; exit $$rc
The run-timed macro swallowed non-zero exit codes from wrapped test commands because the recipe exit status was that of the trailing printf (always 0). Capture the command exit code and re-exit with it after printing the timing line. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 11:47 AM UTC · Completed 11:55 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 12:19 PM UTC · Completed 12:24 PM UTC |
Retro: PR #2530 —
|
Summary
make script-testinvocation in arun-timedmacro that emits::debug::GitHub Actions annotations with elapsed secondspost-prioritize-test.shdominates at ~213s of ~225s total — everything else is ≤8sTest plan
make script-testpasses locally🤖 Generated with Claude Code