fix(ci): use unique docker container names - #9852
Open
RerankerGuo wants to merge 1 commit into
Open
Conversation
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
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: