chore: Add quay.io to release pipeline - #101
Conversation
WalkthroughAdds quay.io authentication and new steps in the release workflow to build/push the Changes
Sequence Diagram(s)sequenceDiagram
participant WF as Release Workflow
participant Quay as Quay.io
participant Hub as Docker Hub
WF->>Quay: Login (docker/login-action@v2)
activate Quay
Quay-->>WF: Auth OK
deactivate Quay
WF->>WF: Build & Push Latest\n(IMAGE_TAG_BASE=wandb/controller, VERSION=latest)
rect rgba(100,200,150,0.12)
note right of WF: Tag latest as versioned tags
WF->>Hub: Tag & Push\n(new_release_version, major.minor, major)
Hub-->>WF: Push OK
end
rect rgba(150,180,220,0.12)
note right of WF: Mirror tags to Quay.io
WF->>Quay: Tag & Push\n(new_release_version, major.minor, major)
Quay-->>WF: Push OK
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yaml (1)
67-77: <!-- [scratchpad]
[task verify_semantic_release_output_behavior_complete][observations]
- cycjimmy/semantic-release-action outputs: when no release detected, new_release_* outputs are empty/undefined, new_release_published="false"
- GitHub Actions conditionals: undefined/null/empty string all evaluate as falsy
- The proposed condition
if: steps.release.outputs.new_release_versioncorrectly handles this case (will skip when empty)- Current workflow has TWO tagging steps without the condition: Docker Hub (lines 67-77) AND Quay.io (lines 79-88)
[analysis]
- Review comment correctly identifies the risk: semantic-release outputs will be empty/undefined when no version bump
- The condition syntax is valid and appropriate
- Both tagging steps are vulnerable; the comment focuses on Docker Hub but Quay.io has the same issue
- Without the condition, docker commands will run with empty variables, creating malformed tags
[done]
- Verified semantic-release behavior: outputs are empty/undefined when no release
- Verified GitHub Actions conditional coercion: treats empty/undefined as falsy
- Confirmed both tagging steps lack the necessary condition
- The issue is real and the fix is appropriate
Add condition to both Docker tagging steps to prevent failures when semantic-release doesn't produce a new version.
The review comment is accurate. When semantic-release detects no version bump (e.g., non-conventional commit messages),
new_release_*outputs remain empty/undefined. GitHub Actions treats these as falsy, so without a conditional, thedocker taganddocker pushcommands will execute with empty variables, creating invalid tags.The proposed condition
if: steps.release.outputs.new_release_versionis sound—it will correctly skip the step when the output is empty. However, this fix must be applied to both the "Tag and Push to Docker Hub" step (lines 67–77) and the "Tag and Push to Quay.io" step (lines 79–88), as they both reference the same undefined outputs.- name: Tag and Push to Docker Hub + if: steps.release.outputs.new_release_version run: | docker tag wandb/controller:latest wandb/controller:${{ steps.release.outputs.new_release_version }} docker push wandb/controller:${{ steps.release.outputs.new_release_version }} ... - name: Tag and Push to Quay.io + if: steps.release.outputs.new_release_version run: | docker tag wandb/controller:latest quay.io/wandb_tools/wandb-k8s-operator:${{ steps.release.outputs.new_release_version }} docker push quay.io/wandb_tools/wandb-k8s-operator:${{ steps.release.outputs.new_release_version }} ...
🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)
33-38: Update docker/login-action@v2 to @V3 for both Docker Hub and Quay.io logins.The latest version of docker/login-action is v3.5.0, which offers Node.js 20 runtime support, dependency updates, and improved maintenance. Update both login steps to align with the currently maintained version:
- Line 28 (Docker Hub):
uses: docker/login-action@v3- Line 33 (Quay.io):
uses: docker/login-action@v3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yaml(3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/release.yaml
34-34: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-and-scan
- GitHub Check: Build
- GitHub Check: Test
🔇 Additional comments (2)
.github/workflows/release.yaml (2)
59-65: Confirm the Build and Push step sets correct variables.The renamed step now uses
IMAGE_TAG_BASEandVERSIONenvironment variables. Verify that the underlyingmake docker-build docker-pushtarget correctly uses these variables to build the image with the right tag and registry endpoint.
79-88: The review comment's premise is factually incorrect.The review claims the Docker Hub step already has the conditional guard, but examination of
.github/workflows/release.yamlshows that the "Tag and Push to Docker Hub" step (lines 52–62) does NOT have anifcondition. Both the Docker Hub and Quay.io steps currently execute unconditionally using semantic-release outputs.While adding a defensive condition to either or both steps might be a reasonable improvement, the justification in the review comment—"apply the same guard condition" that already exists—is based on a false premise. The guard does not exist in the Docker Hub step.
Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)
33-38: Updatedocker/login-actionfrom v2 to v3 for actively maintained version.Both login steps (lines 28 and 34) use
docker/login-action@v2, which is superseded by v3. While v2 remains functional, v3 is the actively maintained version and is referenced in all official documentation. The upgrade is straightforward: change both instances to@v3. Verify your GitHub Actions runners meet the minimum requirement (v2.308.0+) for the Node 20 runtime used by v3. The quay.io registry parameter is fully supported in v3.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yaml(3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/release.yaml
34-34: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build
- GitHub Check: Test
🔇 Additional comments (3)
.github/workflows/release.yaml (3)
59-66: Approved: Build and Push Latest step with proper conditions and environment variables.The conditional guard on
steps.release.outputs.new_release_versionensures this step only runs on actual releases. The environment variablesIMAGE_TAG_BASEandVERSIONare correctly set to buildwandb/controller:latest. The make targets should consume these to produce the correct image tag.
68-78: Approved: Docker Hub tagging and push strategy.The step correctly tags the built
wandb/controller:latestimage with three semantic version tags (full version, major.minor, and major) and pushes them to Docker Hub. The conditional ensures this only runs on releases with a new version.
81-91: Approved: Quay.io tagging and push strategy.The step mirrors the Docker Hub tagging strategy but pushes to
quay.io/wandb_tools/wandb-k8s-operatorwith the same semantic version tags. This ensures consistency across registries. The conditional and tag naming are correct.
|
This PR is included in version 1.21.3 🎉 |
Summary by CodeRabbit