Skip to content

Fix release image tag#1365

Merged
mmat11 merged 1 commit into
open-telemetry:mainfrom
MrAlias:release-img-tag
Feb 26, 2026
Merged

Fix release image tag#1365
mmat11 merged 1 commit into
open-telemetry:mainfrom
MrAlias:release-img-tag

Conversation

@MrAlias
Copy link
Copy Markdown
Contributor

@MrAlias MrAlias commented Feb 25, 2026

  • Update the docker metadata step to find manually set tags.
  • Add support to additionally tag the released image as latest.
  • Detect if the pushed tag that triggered the release is the latest and tag the docker images accordingly.

Related Documentation

@MrAlias MrAlias added this to the v0.6.0 milestone Feb 25, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.60%. Comparing base (4793b9b) to head (83a01c0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1365      +/-   ##
==========================================
+ Coverage   43.76%   44.60%   +0.84%     
==========================================
  Files         308      307       -1     
  Lines       33495    28318    -5177     
==========================================
- Hits        14658    12632    -2026     
+ Misses      17894    14930    -2964     
+ Partials      943      756     -187     
Flag Coverage Δ
integration-test ?
integration-test-arm ?
integration-test-vm-x86_64-5.15.152 ?
integration-test-vm-x86_64-6.10.6 ?
k8s-integration-test ?
oats-test ?
unittests 44.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Update the docker metadata step to find manually set tags.

Add support to additionally tag the released image as latest.

Detect if the pushed tag that triggered the release is the latest and
tag the docker images accordingly.
@MrAlias MrAlias marked this pull request as ready for review February 25, 2026 20:17
@MrAlias MrAlias requested a review from a team as a code owner February 25, 2026 20:17
Copilot AI review requested due to automatic review settings February 25, 2026 20:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release and Docker publish workflows to correctly derive image tags when releases are triggered with a manually provided tag, and to optionally/applicably publish a latest tag for the most recent stable release.

Changes:

  • Add a latest boolean input to the release workflow for manual (workflow_dispatch) releases.
  • Introduce a determine-latest job to decide whether a given tag should also publish as latest.
  • Update Docker metadata configuration in reusable publish workflows to emit semver-derived tags and conditionally add a latest tag.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Adds latest input + a job that determines whether the release tag should also publish latest, wiring that into downstream docker publish jobs.
.github/workflows/publish_dockerhub_main.yml Adjusts docker/metadata-action configuration to use semver parsing from inputs.ref and optionally emit a latest tag.
.github/workflows/publish_dockerhub_k8s_cache_main.yml Mirrors the main publish workflow tagging changes for the k8s cache image.
Comments suppressed due to low confidence (4)

.github/workflows/publish_dockerhub_main.yml:80

  • The tags configuration likely generates duplicate tags on release/tag runs: type=semver,pattern=v{{version}},value=${{ inputs.ref }} will produce the same tag as type=ref,event=tag for refs like v1.2.3. This redundancy can lead to duplicated -t arguments later when creating the manifest (and makes the tagging logic harder to reason about). Consider dropping the type=ref,event=tag entry (or otherwise ensuring tags are deduplicated).
          tags: |
            type=semver,pattern=v{{version}},value=${{ inputs.ref }}
            type=raw,value=latest,enable=${{ inputs.latest == true }}
            type=ref,event=branch
            type=ref,event=tag

.github/workflows/publish_dockerhub_main.yml:156

  • Same as earlier tags block: type=ref,event=tag is redundant with the semver rule based on inputs.ref and can cause duplicate tags to be emitted. Consider removing the tag-ref rule here as well to keep the manifest tagging deterministic.
          tags: |
            type=semver,pattern=v{{version}},value=${{ inputs.ref }}
            type=raw,value=latest,enable=${{ inputs.latest == true }}
            type=ref,event=branch
            type=ref,event=tag

.github/workflows/publish_dockerhub_k8s_cache_main.yml:80

  • The tags list likely produces duplicates for release/tag runs because the semver rule based on inputs.ref will emit the same tag as type=ref,event=tag (e.g., both generate v1.2.3). Redundant tags can make downstream manifest creation/signing less deterministic; consider removing type=ref,event=tag or ensuring tags are deduplicated.
          tags: |
            type=semver,pattern=v{{version}},value=${{ inputs.ref }}
            type=raw,value=latest,enable=${{ inputs.latest == true }}
            type=ref,event=branch
            type=ref,event=tag

.github/workflows/publish_dockerhub_k8s_cache_main.yml:156

  • Same duplication concern as the earlier metadata step: type=ref,event=tag is redundant with the semver tag generated from inputs.ref and may emit duplicate tags. Consider removing it here too.
          tags: |
            type=semver,pattern=v{{version}},value=${{ inputs.ref }}
            type=raw,value=latest,enable=${{ inputs.latest == true }}
            type=ref,event=branch
            type=ref,event=tag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@NimrodAvni78 NimrodAvni78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmat11 mmat11 merged commit 4910fc8 into open-telemetry:main Feb 26, 2026
19 checks passed
@MrAlias MrAlias deleted the release-img-tag branch February 26, 2026 15:25
@MrAlias MrAlias mentioned this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants