Skip to content

ci: use valid chart version for latest releases#416

Open
ranxi2001 wants to merge 1 commit into
volcano-sh:mainfrom
ranxi2001:ci/fix-release-chart-version
Open

ci: use valid chart version for latest releases#416
ranxi2001 wants to merge 1 commit into
volcano-sh:mainfrom
ranxi2001:ci/fix-release-chart-version

Conversation

@ranxi2001

@ranxi2001 ranxi2001 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it

This PR fixes the release workflow failure on main pushes while keeping latest image publishing enabled.

The release workflow uses TAG=latest for main branch pushes. That value is valid for Docker image tags, but the workflow also reused it as the Helm chart version. Helm chart versions must be valid SemVer values, so helm package --version latest fails with chart.metadata.version "latest" is invalid.

This PR separates Docker image tags from Helm chart metadata:

  • On main pushes, Docker images still use TAG=latest, while the Helm chart uses CHART_VERSION=0.0.0 and APP_VERSION=latest.
  • On release tag pushes, Docker images, Helm chart version, Helm chart appVersion, the chart package filename, and the Helm OCI tag continue to use the existing Git tag value such as v1.2.3.

Which issue(s) this PR fixes

Fixes #417

Special notes for your reviewer

This intentionally keeps latest image publishing on main pushes and only fixes the invalid Helm chart version used for latest chart publishing.

Validation data:

  • main push metadata: TAG=latest, CHART_VERSION=0.0.0, APP_VERSION=latest
  • Fork main push validation run: https://github.com/ranxi2001/agentcube/actions/runs/28633043101
  • Fork validation result: latest images were published, agentcube-0.0.0.tgz was packaged successfully, and ghcr.io/ranxi2001/charts/agentcube:0.0.0 was pushed successfully.

AI assistance was used to inspect the workflow behavior, validate the fork run result, and prepare this PR text. I reviewed and validated the final change.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., usage docs, etc.

None.

What test reports have been run

  • git diff upstream/main --check
  • actionlint -ignore 'too old to run on GitHub Actions' .github/workflows/build-push-release.yml
  • helm lint manifests/charts/base
  • Helm package simulation for main push: agentcube-0.0.0.tgz
  • Helm package simulation for release tag v1.2.3: agentcube-v1.2.3.tgz
  • Helm package simulation for prerelease tag v1.2.3-alpha: agentcube-v1.2.3-alpha.tgz
  • Fork main push validation run: https://github.com/ranxi2001/agentcube/actions/runs/28633043101

Copilot AI review requested due to automatic review settings July 2, 2026 12:29
@volcano-sh-bot volcano-sh-bot added the kind/bug Something isn't working label Jul 2, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@volcano-sh-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 publishing GitHub Actions workflow so it only runs on version tag pushes, preventing main branch merges from attempting to publish release artifacts and failing Helm packaging due to non-SemVer chart versions.

Changes:

  • Restricts the Build and Push Release Images workflow trigger to tag pushes only (removes main branch push trigger).
  • Separates Docker image tagging (TAG=vX.Y.Z...) from Helm chart packaging version (CHART_VERSION=X.Y.Z...) by stripping the leading v.
  • Updates Helm chart packaging/push steps to use CHART_VERSION for chart version and .tgz name, while keeping TAG for appVersion and image tags.

@codecov-commenter

codecov-commenter commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.47%. Comparing base (524e55e) to head (427e618).
⚠️ Report is 156 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #416       +/-   ##
===========================================
+ Coverage   47.57%   58.47%   +10.90%     
===========================================
  Files          30       36        +6     
  Lines        2819     3463      +644     
===========================================
+ Hits         1341     2025      +684     
+ Misses       1338     1230      -108     
- Partials      140      208       +68     
Flag Coverage Δ
unittests 58.47% <ø> (+10.90%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@ranxi2001 ranxi2001 force-pushed the ci/fix-release-chart-version branch from bfbcab9 to a6c4a82 Compare July 2, 2026 14:59
Comment on lines -5 to -6
branches:
- main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should not remove this trigger condition, because the latest image still needs to be uploaded.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, agreed. I updated the approach to keep the main push trigger and continue publishing latest images.

The fix now separates the Docker image tag from the Helm chart metadata. On main pushes, images still use TAG=latest, while the chart uses CHART_VERSION=0.0.0 and APP_VERSION=latest. On release tags, the workflow keeps the existing vX.Y.Z values for image tags, chart version, appVersion, package filename, and OCI chart tag.

I also validated the updated workflow with a fork main push: latest images were published, agentcube-0.0.0.tgz was packaged successfully, and ghcr.io/ranxi2001/charts/agentcube:0.0.0 was pushed successfully.

Signed-off-by: ranxi2001 <ranxi169@163.com>
@ranxi2001 ranxi2001 changed the title ci: publish release artifacts only for tags ci: use valid chart version for latest releases Jul 3, 2026
Copilot AI review requested due to automatic review settings July 3, 2026 02:20
@ranxi2001 ranxi2001 force-pushed the ci/fix-release-chart-version branch from a6c4a82 to 427e618 Compare July 3, 2026 02:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 46 to +48
echo "TAG=latest" >> "$GITHUB_ENV"
echo "CHART_VERSION=0.0.0" >> "$GITHUB_ENV"
echo "APP_VERSION=latest" >> "$GITHUB_ENV"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. The fixed 0.0.0 version is intentional here: the main branch chart is meant to behave as a stable latest/development chart entry rather than a unique snapshot chart for every run. This avoids accumulating temporary chart versions such as 0.0.0-main.<run_number> in GHCR.

I validated that GHCR accepted the fork main push with agentcube-0.0.0.tgz and ghcr.io/ranxi2001/charts/agentcube:0.0.0. If maintainers prefer immutable per-run snapshot charts for main, I can switch the branch path to a valid prerelease version such as 0.0.0-main.${{ github.run_number }}, while keeping Docker images tagged as latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: publish release artifacts only for tags

5 participants