Skip to content

Clean up cancelled GPU image prewarm pods - #964

Merged
bradhilton merged 2 commits into
mainfrom
joshua/prewarm-cancel-cleanup-20260925
Sep 26, 2026
Merged

bradhilton merged 2 commits into
mainfrom
joshua/prewarm-cancel-cleanup-20260925

Conversation

@bradhilton

Copy link
Copy Markdown
Collaborator

Cancelling the GPU image workflow during node prewarming can leave ownerless one-shot pull pods behind. They have fixed node-derived names but no run identity, so workflow cleanup cannot safely distinguish them from another run.

This change labels tag-check and node-prewarm one-shots with the GitHub run ID/attempt, then deletes only pods matching both that run identity and the prewarm name. The build script performs the cleanup from its existing exit trap, and the workflow repeats it from the existing always() cleanup step. Persistent prewarm DaemonSets and peer-run pods do not match the selector.

Validation:

  • bash -n scripts/build-gpu-image.sh
  • uv run --no-project --python /home/brad/github/openpipe/caladan/.venv/bin/python --with pytest python -m pytest -q -o addopts='' tests/unit/test_gpu_image_build_context.py (2 passed)
  • focused Ruff lint/format hooks
  • git diff --check

Source only. This does not cancel or modify the currently running image build, persistent prewarm DaemonSets, shared caches, or GPU workloads.

@bradhilton
bradhilton force-pushed the joshua/prewarm-cancel-cleanup-20260925 branch from adfdb69 to 141774f Compare September 25, 2026 07:03
@bradhilton
bradhilton marked this pull request as ready for review September 26, 2026 16:00
@bradhilton
bradhilton merged commit 80015fa into main Sep 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant