fix(ci): use unique docker container names - #9852
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
89fc7c1 to
cc68731
Compare
Include the GitHub workflow run, attempt, and GPU slot in self-hosted CI container names to avoid collisions across concurrent or stale runs. Test: python -m unittest tests.general.test_dockerci
cc68731 to
6bca60d
Compare
|
CI note: the failing CUDA unittest is unrelated to this PR. |
|
Closing this to reduce the active review queue to the agreed maintenance capacity. The CI container-name fix is preserved, but it changes self-hosted runner infrastructure without maintainer feedback, so I am deferring it behind user-facing correctness fixes. The implementation and regression test remain at |
PR type
PR information
Background
The GPU CI launcher always names its Docker container
swift-ci-0orswift-ci-1. On a self-hosted runner, another active or stale workflowcan already own that global Docker name even after the GPU lock for the
current job is available.
This caused run 30896752033
to fail before tests started:
Changes
GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT, and the selected GPUslot in each CI container name.
local-<pid>and attempt0as deterministic local fallbacks.dockerandflockcommands and verifies the completedocker runinvocation.
Verification
PYTHONPATH=. .venv/bin/python -m unittest tests.general.test_dockerciPYTHONPATH=. .venv/bin/python tests/run.py --pattern test_dockerci.pybash -n .dev_scripts/dockerci.sh.venv/bin/pre-commit run --all-filesgit diff --checkImpact
GPU selection and lock files are unchanged. Only the Docker container
name changes, preventing unrelated workflow runs from colliding in the
daemon-wide name namespace.
Experiment results
Before the fix, the stubbed launcher emitted:
With
GITHUB_RUN_ID=12345andGITHUB_RUN_ATTEMPT=2, it now emits: