Skip to content

Tie chart releases to app releases#43

Open
emsearcy wants to merge 1 commit intolinuxfoundation:mainfrom
emsearcy:LFXV2-872-tie-chart-releases-to-app-releases
Open

Tie chart releases to app releases#43
emsearcy wants to merge 1 commit intolinuxfoundation:mainfrom
emsearcy:LFXV2-872-tie-chart-releases-to-app-releases

Conversation

@emsearcy
Copy link
Contributor

@emsearcy emsearcy commented Feb 3, 2026

This PR implements the changes needed for LFXV2-872 to tie chart releases to app releases.

Changes Made

Chart.yaml Updates

  • Reset version from 0.5.6 to 0.0.1
  • Added explanatory comment about dynamic version replacement during chart builds

Workflow Updates (.github/workflows/ko-build-tag.yaml)

  • Updated helm-chart-oci-publisher from @c465d6571fa0b8be9d551d902955164ea04a00af to @17e4144d7ba68f7c3e8c16eece5aed15fd7c2dc8
  • Changed CHART_VERSION logic from reading Chart.yaml via yq to using github.ref_name (matching app version)

Impact

  • Chart versions will now match the Git tag/release version instead of being manually maintained in Chart.yaml
  • Consistent versioning across app and chart releases
  • Eliminates need to manually update Chart.yaml versions

Jira: LFXV2-872

- Reset Chart.yaml version to 0.0.1 with explanatory comment
- Update helm-chart-oci-publisher to @17e4144d7ba68f7c3e8c16eece5aed15fd7c2dc8
- Change CHART_VERSION to use github.ref_name instead of reading from Chart.yaml

🤖 Generated with [GitHub Copilot](https://github.com/features/copilot) (via Zed)

Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
@emsearcy emsearcy requested a review from a team as a code owner February 3, 2026 23:38
Copilot AI review requested due to automatic review settings February 3, 2026 23:38
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Walkthrough

These changes modify how the Helm chart version is handled during tagged releases. The workflow now extracts the version from the git tag name instead of reading from Chart.yaml, and updates the publishing action reference. The Chart.yaml version is reset with comments noting dynamic replacement at build time.

Changes

Cohort / File(s) Summary
CI/CD Workflow
.github/workflows/ko-build-tag.yaml
Updated CHART_VERSION extraction to use git tag name (via sed on github.ref_name) instead of yq reading from Chart.yaml. Updated helm-chart-oci-publisher action reference from commit c465d6... to 17e4144...
Helm Chart Configuration
charts/lfx-v2-project-service/Chart.yaml
Changed version from 0.5.6 to 0.0.1 with added comments indicating version should not be manually incremented and will be dynamically replaced at build time.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely captures the main objective of the PR—tying chart releases to app releases through version synchronization.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, clearly explaining the Chart.yaml updates, workflow changes, and the impact of the modifications.
Linked Issues check ✅ Passed The PR fully implements LFXV2-872 objectives: CHART_VERSION now derives from github.ref_name using sed to strip the leading 'v', and Chart.yaml version is reset with dynamic replacement comments.
Out of Scope Changes check ✅ Passed All changes are directly aligned with LFXV2-872 objectives. The helm-chart-oci-publisher action update and Chart.yaml modifications serve the core purpose of tying chart releases to app releases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/ko-build-tag.yaml:
- Around line 36-40: The workflow currently strips all "v" characters when
computing APP_VERSION and CHART_VERSION (using sed 's/v//g'), which corrupts
tags like "v1.2.3+rev"; change the logic so APP_VERSION is computed by removing
only a single leading "v" from github.ref_name (e.g., strip '^v' or use shell
parameter expansion) and then set CHART_VERSION to reuse APP_VERSION (remove the
duplicate sed call), updating the references to APP_VERSION and CHART_VERSION in
the block accordingly.

Comment on lines 36 to 40
set -euo pipefail
APP_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
CHART_NAME="$(yq '.name' charts/*/Chart.yaml)"
CHART_VERSION="$(yq '.version' charts/*/Chart.yaml)"
CHART_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
{
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Strip only a leading v to avoid corrupting versions.

sed 's/v//g' removes every v, so tags like v1.2.3+rev become 1.2.3+re. This will publish the wrong app/chart version. Strip only a leading v once and reuse APP_VERSION for CHART_VERSION.

✅ Suggested fix
-          APP_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
+          APP_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
           CHART_NAME="$(yq '.name' charts/*/Chart.yaml)"
-          CHART_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
+          CHART_VERSION="$APP_VERSION"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set -euo pipefail
APP_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
CHART_NAME="$(yq '.name' charts/*/Chart.yaml)"
CHART_VERSION="$(yq '.version' charts/*/Chart.yaml)"
CHART_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')
{
set -euo pipefail
APP_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
CHART_NAME="$(yq '.name' charts/*/Chart.yaml)"
CHART_VERSION="$APP_VERSION"
{
🤖 Prompt for AI Agents
In @.github/workflows/ko-build-tag.yaml around lines 36 - 40, The workflow
currently strips all "v" characters when computing APP_VERSION and CHART_VERSION
(using sed 's/v//g'), which corrupts tags like "v1.2.3+rev"; change the logic so
APP_VERSION is computed by removing only a single leading "v" from
github.ref_name (e.g., strip '^v' or use shell parameter expansion) and then set
CHART_VERSION to reuse APP_VERSION (remove the duplicate sed call), updating the
references to APP_VERSION and CHART_VERSION in the block accordingly.

Copy link

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 implements a change to tie Helm chart releases to application releases by making chart versions dynamic and based on git tags instead of manually maintained in Chart.yaml.

Changes:

  • Chart version reset from 0.5.6 to 0.0.1 with explanatory comments about dynamic replacement
  • Workflow updated to derive CHART_VERSION from git tags (github.ref_name) instead of reading from Chart.yaml
  • Updated helm-chart-oci-publisher action to newer commit that supports dynamic version replacement

Reviewed changes

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

File Description
charts/lfx-v2-project-service/Chart.yaml Reset version to 0.0.1 and added comment explaining dynamic version replacement during chart build process
.github/workflows/ko-build-tag.yaml Changed CHART_VERSION logic to use github.ref_name (matching APP_VERSION) and updated helm-chart-oci-publisher action commit hash

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

version: 0.5.6
# This version should not be incremented, as it is dynamically replaced with the release version during the chart build
# job.
version: 0.0.1
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Resetting the chart version from 0.5.6 to 0.0.1 could cause semantic versioning issues. When the next release is tagged (e.g., v0.2.0), the chart version will be 0.2.0, which is lower than the previous 0.5.6. This could cause problems with Helm deployments that expect monotonically increasing versions. Consider whether the next release tag should be at least v0.5.7 or v0.6.0 to maintain semantic versioning compatibility, or document this as a breaking change that may require users to use the --force flag or uninstall/reinstall the chart.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
# This version should not be incremented, as it is dynamically replaced with the release version during the chart build
# job.
version: 0.0.1
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The PR description states that this change "eliminates need to manually update Chart.yaml versions", but the README.md file (lines 260-261, 272-278, and 297) still contains outdated documentation instructing users to manually update the chart version in Chart.yaml. This creates a significant discrepancy between the documented process and the actual implementation. The documentation should be updated in the same PR to avoid confusion for contributors and maintainers.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@bramwelt bramwelt left a comment

Choose a reason for hiding this comment

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

Can you update the README to remove the details around bumping the chart version?

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.

2 participants