Repository navigation
fix(release): publish Docker semver tags - #24
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Reviewer's GuideConfigurationGenerate full, major, and minor Docker semver tags from the release tag and use them when publishing the image.
DocumentationDocument the full-version, major, minor, and latest tags available for release images.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/release-please.yaml" line_range="56-57" />
<code_context>
+ images: ${{ steps.image.outputs.name }}
+ tags: |
+ type=semver,pattern={{raw}},value=${{ needs.release_please.outputs.tag_name }}
+ type=semver,pattern=v{{major}},value=${{ needs.release_please.outputs.tag_name }}
+ type=semver,pattern=v{{major}}.{{minor}},value=${{ needs.release_please.outputs.tag_name }}
+
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
</code_context>
<issue_to_address>
**Older releases replace newer aliases**
When publishing runs for releases sharing a major or minor version overlap, or an older run is rerun after a newer release, the older build can finish last and push its image to shared `v<major>`, `v<major>.<minor>`, and `latest` tags, replacing the newer image; consumers pulling those aliases receive an outdated release.
Only let the newest release publish the shared aliases, including `latest`.
</issue_to_address>
### Comment 2
<location path=".github/workflows/release-please.yaml" line_range="77" />
<code_context>
- tags: |
- ${{ steps.image.outputs.name }}:${{ needs.release_please.outputs.tag_name }}
- ${{ steps.image.outputs.name }}:latest
+ tags: ${{ steps.meta.outputs.tags }}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
</code_context>
<issue_to_address>
**Interrupted push leaves tags inconsistent**
When the registry push fails after accepting only some of the requested tags, buildx can push some tags before a registry or network error interrupts the remaining pushes, leaving the full version, aliases, and `latest` pointing at different images; the failed run does not roll back or retry the tags already pushed.
Add a retry or reconciliation step that republishes all tags for the release after a partial push.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and the release workflow stops updating latest, so consumers of that tag can keep pulling an older image, while the new version aliases are published to the registry. Reverting the workflow does not undo tags already published, but they can be retagged or removed.
Blocking findings: .github/workflows/release-please.yaml:57, .github/workflows/release-please.yaml:77
| type=semver,pattern=v{{major}},value=${{ needs.release_please.outputs.tag_name }} | ||
| type=semver,pattern=v{{major}}.{{minor}},value=${{ needs.release_please.outputs.tag_name }} |
There was a problem hiding this comment.
🟡 Medium · Older releases replace newer aliases
When publishing runs for releases sharing a major or minor version overlap, or an older run is rerun after a newer release, the older build can finish last and push its image to shared v<major>, v<major>.<minor>, and latest tags, replacing the newer image; consumers pulling those aliases receive an outdated release.
Only let the newest release publish the shared aliases, including latest.
Prompt for AI agents
In `.github/workflows/release-please.yaml` at lines 56-57:
**Older releases replace newer aliases**
When publishing runs for releases sharing a major or minor version overlap, or an older run is rerun after a newer release, the older build can finish last and push its image to shared `v<major>`, `v<major>.<minor>`, and `latest` tags, replacing the newer image; consumers pulling those aliases receive an outdated release.
Only let the newest release publish the shared aliases, including `latest`.| tags: | | ||
| ${{ steps.image.outputs.name }}:${{ needs.release_please.outputs.tag_name }} | ||
| ${{ steps.image.outputs.name }}:latest | ||
| tags: ${{ steps.meta.outputs.tags }} |
There was a problem hiding this comment.
🟡 Medium · Interrupted push leaves tags inconsistent
When the registry push fails after accepting only some of the requested tags, buildx can push some tags before a registry or network error interrupts the remaining pushes, leaving the full version, aliases, and latest pointing at different images; the failed run does not roll back or retry the tags already pushed.
Add a retry or reconciliation step that republishes all tags for the release after a partial push.
Prompt for AI agents
In `.github/workflows/release-please.yaml` at line 77:
**Interrupted push leaves tags inconsistent**
When the registry push fails after accepting only some of the requested tags, buildx can push some tags before a registry or network error interrupts the remaining pushes, leaving the full version, aliases, and `latest` pointing at different images; the failed run does not roll back or retry the tags already pushed.
Add a retry or reconciliation step that republishes all tags for the release after a partial push.
Summary
latestfor semver tags.Validation
git -c core.whitespace=cr-at-eol diff --checkSummary by Sourcery
Publish Docker release images with consistent semantic-version aliases and document the supported tags.
New Features:
Enhancements:
Summary by CodeRabbit
vX.Y.Z) and version aliases for the major (vX) and major/minor (vX.Y) releases.latestimage tag is no longer published.