ci: clean stale .out files after checkout#1308
Conversation
When a multi-step CI job (like case-optimization) fails at an early step, the 'Print Logs' step (if: always) would cat output files from a previous successful run, making it appear the current run succeeded. Delete stale .out files after checkout so logs only show output from the current workflow run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Code ReviewHead SHA: b71418a Files changed: 1
Summary:
Findings: No correctness or logic issues found. Improvement opportunities:
Overall: Clean, minimal, and well-motivated fix. The PR description accurately describes the intent and the implementation matches it. LGTM with the working-directory consideration worth a quick sanity check. |
Claude Code ReviewHead SHA: b71418a Files changed: 1
Summary:
Findings: No correctness issues found. A couple of observations:
Overall: The change is minimal, targeted, and well-motivated. Logic is sound — |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change adds a new cleanup step to the test workflow that removes stale output files before running tests. Specifically, a "Clean stale output files" step has been introduced to two workflow jobs, executing 📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
There was a problem hiding this comment.
Pull request overview
This PR updates the CI workflow to remove stale .out log files after checkout (while keeping .slurm_job_id files) so that unconditional log-printing steps don’t accidentally show output from a previous run when the current run fails early.
Changes:
- Add a “Clean stale output files” step after
actions/checkoutin the main test-suite job. - Add the same cleanup step after
actions/checkoutin the case-optimization job.
| - name: Clean stale output files | ||
| run: rm -f *.out | ||
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1308 +/- ##
=======================================
Coverage 45.34% 45.34%
=======================================
Files 70 70
Lines 20514 20514
Branches 1954 1954
=======================================
Hits 9303 9303
Misses 10084 10084
Partials 1127 1127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
.outfiles after checkout in both the test suite and case-optimization jobsPrint Logsstep (if: always()) from showing output from a previous workflow run when the current run fails early.slurm_job_idfiles intact sosubmit-slurm-job.shcan still detect and cancel stale SLURM jobsContext
When a multi-step CI job (like case-optimization) fails at the prebuild step, the "Run Case-Optimization Tests" step is skipped. But the
Print Logsstep runs unconditionally and cats whatever.outfiles exist — which may be from a previous successful run, making it look like the current run succeeded.Test plan
.slurm_job_idfiles preserved)🤖 Generated with Claude Code