refactor(ci): isolate SPUR runner sessions - #138
Conversation
Scope remote worktrees by GitHub run and attempt, while retaining the SHA-scoped image tarball used to hand artifacts between hardware-test stages. Make worktree and tarball cleanup best-effort so NFS .nfs files cannot replace a successful test result with a cleanup failure. Record each active Slurm job and isolated remote process group in per-stage control files. On interruption, reconnect as the CI user to cancel the exact job and terminate its poller; use a cancellation sentinel to cover startup races. Add a numeric cleanup-only workflow dispatch for recovering jobs orphaned before automatic cancellation tracking was available.
Point ShellCheck's source annotations at the repository-relative path for spur-ci-common.sh in all three SPUR test wrappers. Keep runtime sourcing based on SCRIPT_DIR so installed CI scripts remain location-independent.
sbates130272
left a comment
There was a problem hiding this comment.
@amd-ivaganev I would like to move any scripts that need to be installed on the github self-hosted runner in ./github/scripts/runners and keep other scripts used by workflows in .github/scripts/workflows please!
@sbates130272 does this look reasonable: |
Move scripts installed under /usr/local/lib/aic-ci into .github/scripts/runners and limit install-ci-scripts to that directory. Move checkout-invoked helpers into .github/scripts/workflows, update their workflow call sites, and keep ShellCheck source annotations aligned with the new runner path.
|
/run-ci-fast |
1 similar comment
|
@amd-ivaganev csn you work with @john00003 on this? Thanks! |
|
@john00003 are you working on this or an alternative? Let me know if I can help. |
|
@amd-ivaganev Not right now. My docker isolation work is separate from the work you are doing in this PR. Your changes look really good. I know Stephen tagged me on this, was there anything you wanted me to finish or add onto this? If not, I can just give this a more thorough review. |
Nothing to add, just making sure it won't conflict with your plans. Have a look-see whenever you have time and if there's no changes needed I can merge it. This was all originally driven by issues with re-running failed CI runs that I experienced with an unrelated PR. Stephen asked to decouple them so this became a separate thing. |
|
/run-ci-fast |
1 similar comment
|
@amd-ivaganev Still need to review the changes, but I see the failures look along the lines of: I believe this is being caused by the Docker container using GPUs that it is not supposed to (the reserved GPUs in SPUR mess up when being passed to a Docker container). This is exactly the issue I am trying to solve. I have a hacky workaround ready, I will submit that PR soon. |
Yes, I've seen this happen before, but eventually lucked into a node with enough free VRAM to pass. Are batch jobs also not getting |
|
@amd-ivaganev Ah, is this the Tuesday maintenance period? I was not aware of |
I thought that's why you had posted the I had codex whip me up a python script to decode & spit out the assigned GPUs from the spur job id. We can add that in the workflows on the runner so it sets them by itself, but I wanted to double check first. |
|
@amd-ivaganev Sorry, poor wording on my end. I meant I wasn't aware that it could be missing from batch jobs, I knew it was missing in --pty jobs. I checked this again, |
|
@amd-ivaganev I can install that on my runner once it is ready. My work was doing something similar but I can rework it on top of your changes. Or I'll ping you if I finish my changes soon enough. |
1 similar comment
|
/run-ci-fast |
|
✅ Fast hardware CI passed for 0027f51 (dist-build-fast + smoke-test-fast + tiny-test). This is a single-arch dev check — run |
…sync Upstream ROCm#138 landed the same runner/workflow script split under .github/scripts/, so drop this branch's competing top-level scripts/ move and keep only the README version check. The sync script and its tests move to .github/scripts/workflows/ to match.
Summary
Root cause
A canceled GitHub job terminated its local SSH client but left the remote poller and Slurm job alive. A later attempt reused the same SHA-only worktree. NFS preserved the open script as a
.nfs*file, so tiny-test passed but terminalrm -rffailed and changed the job result to failure.Scope
This PR contains the self-hosted runner lifecycle refactor and its Slurm job-marker hook. It is intentionally separate from #137, which only fixes GPU reservation and device propagation for SPUR hardware tests.
Validation
bash -nfor the changed runner and Slurm scriptsgit diff --checkgit range-diffconfirms the split commits are patch-identical to the changes removed from fix(ci): reserve GPUs for SPUR hardware tests #137