Fixes Docker Image Publishing#5379
Conversation
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR fixes the Docker image publishing workflow by replacing the old postmerge-ci.yml with a new publish-images.yaml that uses a simpler branch-based tagging scheme. The core fix addresses illegal @sha256:... characters in Docker tags by no longer embedding the base image version in the output tag names. The new tagging scheme uses short SHA commits as immutable tags plus branch-specific moving tags (latest, latest-develop).
Architecture Impact
Self-contained CI/CD change. No impact on the Isaac Lab codebase itself. The change affects:
- Docker image consumers who may rely on the old tag naming convention (
<repo>-<branch>-<base-version>) - The new tags are simpler but represent a breaking change in tag naming for downstream automation
Implementation Verdict
Minor fixes needed
Test Coverage
CI workflow changes are not unit-testable in the traditional sense. The workflow should be validated by a successful run on the target branches. The PR appropriately cannot include traditional tests.
CI Status
No CI checks available yet — this is expected since the workflow itself is what's being fixed.
Findings
🟡 Warning: publish-images.yaml:94 — Short SHA collision risk without disambiguation
TAGS=("$IMAGE:$SHORT_SHA")Using only a 7-character short SHA as an "immutable" tag creates collision risk at scale. While unlikely, if a collision occurs the tag would be silently overwritten. Consider prefixing with branch or using the full SHA for the immutable tag. The old workflow used $COMBINED_TAG-${GITHUB_SHA::7} which included branch context.
🟡 Warning: publish-images.yaml:106 — Missing VERSION file causes silent fallback, not failure
VERSION="$(tr -d '[:space:]' < VERSION)"
if [ -n "$VERSION" ]; then
TAGS+=("$IMAGE:v$VERSION")
else
echo "🟠 VERSION file is empty; skipping versioned tag"
fiIf the VERSION file doesn't exist, tr will fail but the error is swallowed. On main branch, publishing without a version tag may be unintended. Consider explicit file existence check:
if [ -f VERSION ]; then
VERSION="$(tr -d '[:space:]' < VERSION)"
...
fi🟡 Warning: publish-images.yaml:113-115 — release/ branches get no semantic tag**
*)
# Other tracked branches (release/**, ...) only get the immutable sha tag.
echo "Branch '$BRANCH_NAME' has no moving tag; only $IMAGE:$SHORT_SHA will be published."Release branches (e.g., release/1.2.3) only get a short SHA tag, making it difficult to identify release candidate images. Consider adding a $IMAGE:$BRANCH_NAME tag (sanitized) or $IMAGE:rc-<version> pattern for release branches.
🔵 Improvement: publish-images.yaml:65-70 — NGC login proceeds silently on failure
docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io
echo "🟢 Successfully logged into NGC registry"The login command's exit status isn't checked. If login fails, the workflow continues and will fail later at push time with a confusing error. Add set -e at the script start or explicit error checking:
if ! docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io; then
echo "🔴 Failed to log into NGC registry"
exit 1
fi🔵 Improvement: publish-images.yaml:155-164 — Build failure won't surface which tag failed
The docker buildx build ... --push command pushes all tags atomically, so partial failure isn't an issue. However, if the build fails, there's no explicit error message before the script ends. Consider adding:
if ! docker buildx build ...; then
echo "🔴 Docker build failed"
exit 1
fi🔵 Improvement: publish-images.yaml:27 — Hardcoded internal registry may cause issues
ISAACSIM_BASE_IMAGE: 'nvcr.io/nvidian/isaac-sim' # ${{ vars.ISAACSIM_BASE_IMAGE || 'nvcr.io/nvidia/isaac-sim' }}The commented-out variable reference suggests this should be configurable but is hardcoded to an internal NVIDIA registry (nvidian). This is fine for internal use but the comment is misleading about the actual default behavior.
039952a to
3348c1e
Compare
Greptile SummaryThis PR replaces the broken Confidence Score: 5/5Safe to merge — all logic is correct, the previously flagged stale reference is resolved, and only a minor style nit remains. All P0/P1 concerns from prior review rounds are addressed. The remaining finding (unquoted --build-arg) is P2 style and does not affect runtime behavior for the current image name value. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Push to main / develop / release/**] --> B[config job\nreads config.yaml via yq]
B --> C[build-and-push-images job]
C --> D{Branch?}
D -- develop --> E["$IMAGE:latest-develop\n$IMAGE:<sha>"]
D -- main --> F["$IMAGE:latest\n$IMAGE:v<VERSION>\n$IMAGE:<sha>"]
D -- release/X --> G["$IMAGE:latest-release-X\n$IMAGE:<sha>"]
D -- other --> H["$IMAGE:<sha> only"]
E & F & G & H --> I[docker buildx build --push\nmultiarch if base supports it]
subgraph config.yaml
J[isaacsim_image_name]
K[isaacsim_image_tag]
L[isaaclab_image_name]
end
config.yaml --> B
Reviews (3): Last reviewed commit: "Rename config loading jobs" | Re-trigger Greptile |
e643455 to
2022578
Compare
…TAG to CI_IMAGE_TAG
ecf4d7f to
44c3562
Compare
Fixes the docker image publishing workflow; simplifies tagging on published images; removes hardcoded Isaac Sim base image versions in favor of
config.yaml; removes silent failure on variable non-existence.Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there