Skip to content

feat(ci): tie chart releases to app releases#31

Merged
andrest50 merged 2 commits intomainfrom
feat/LFXV2-872
Mar 2, 2026
Merged

feat(ci): tie chart releases to app releases#31
andrest50 merged 2 commits intomainfrom
feat/LFXV2-872

Conversation

@emsearcy
Copy link
Contributor

@emsearcy emsearcy commented Feb 4, 2026

Implements standardized chart release versioning for LFXV2-872.

Changes Applied

Chart.yaml Updates:

  • Reset version from 0.4.10 to 0.0.1
  • Added explanatory comment with 120-char line breaks:
    # This version should not be incremented, as it is dynamically replaced with the release version during the chart build
    # job.

Workflow Updates (ko-build-tag.yaml):

  • Updated helm-chart-oci-publisher to @17e4144d7ba68f7c3e8c16eece5aed15fd7c2dc8
  • Changed CHART_VERSION to use github.ref_name instead of reading from Chart.yaml:
    # Before:
    CHART_VERSION="$(yq '.version' charts/*/Chart.yaml)"
    
    # After: 
    CHART_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//g')

Benefits

  • Simplified Versioning: Chart version automatically matches app release version
  • Reduced Maintenance: No need to manually bump Chart.yaml versions
  • Consistency: Standardized approach across all LFX v2 repositories
  • Updated Tooling: Latest helm-chart-oci-publisher with bug fixes and improvements

Tracking

  • JIRA: LFXV2-872
  • Pattern: Consistent with 9 other repositories already updated
  • Testing: Workflow changes validated against established pattern

Related to LFXV2-872

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

🤖 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 4, 2026 00:26
Copilot AI review requested due to automatic review settings February 4, 2026 00:26
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 81f3f8c and 2d2a130.

📒 Files selected for processing (1)
  • .github/workflows/ko-build-tag.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ko-build-tag.yaml

Walkthrough

Workflow now derives chart version from the Git tag (stripping a leading v) and exposes it as chart_version output; Chart.yaml version in the lfx-v2-query-service chart set to 0.0.1 with a comment stating it is replaced during the build. Action pins were updated.

Changes

Cohort / File(s) Summary
Chart Versioning Pipeline
.github/workflows/ko-build-tag.yaml
Replaced yq-based Chart.yaml version extraction with Git tag-based derivation (`echo ${GITHUB_REF_NAME}
Helm Chart Metadata
charts/lfx-v2-query-service/Chart.yaml
Chart version changed to 0.0.1 and annotated with a comment that the version will be dynamically replaced during the chart build job.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: tying chart releases to app releases by deriving chart version from Git tags instead of Chart.yaml.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, providing clear before/after comparisons, benefits, and tracking information.
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
  • Commit unit tests in branch feat/LFXV2-872

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

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

Standardizes Helm chart release versioning so chart versions are derived from the Git tag (app release), reducing the need to manually bump Chart.yaml per release.

Changes:

  • Resets the Helm chart version to a placeholder (0.0.1) with an explanatory comment.
  • Updates the tagged-release workflow to derive CHART_VERSION from github.ref_name instead of reading Chart.yaml.
  • Bumps the pinned helm-chart-oci-publisher action commit used to publish the chart.

Reviewed changes

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

File Description
charts/lfx-v2-query-service/Chart.yaml Sets a placeholder chart version and documents that CI replaces it during release builds.
.github/workflows/ko-build-tag.yaml Derives chart/app versions from the tag and updates the chart publisher action reference.

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

Comment on lines 37 to +39
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

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Using sed 's/v//g' removes every "v" in the tag (e.g., v1.2.3-dev becomes 1.2.3-de), which can produce incorrect/invalid versions. Strip only a leading v (e.g., s/^v// or bash ${ref#v}) and consider reusing APP_VERSION for CHART_VERSION to avoid divergence.

Copilot uses AI. Check for mistakes.
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inline comment spacing here is ... # v4 with only one space before #. With .yamllint extending the default rules, this typically violates the comments rule (min 2 spaces before an inline comment). Use two spaces before # (see .github/workflows/mega-linter.yml:28 for the existing style).

Copilot uses AI. Check for mistakes.
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inline comment spacing here is ... # v4 with only one space before #. With .yamllint extending the default rules, this typically violates the comments rule (min 2 spaces before an inline comment). Use two spaces before # (consistent with other workflows like .github/workflows/mega-linter.yml:28).

Copilot uses AI. Check for mistakes.
id: publish-ghcr
# yamllint disable-line rule:line-length
uses: linuxfoundation/lfx-public-workflows/.github/actions/helm-chart-oci-publisher@c465d6571fa0b8be9d551d902955164ea04a00af # main
uses: linuxfoundation/lfx-public-workflows/.github/actions/helm-chart-oci-publisher@17e4144d7ba68f7c3e8c16eece5aed15fd7c2dc8 # main
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inline comment spacing here is ... # main with only one space before #. With .yamllint extending the default rules, this typically violates the comments rule (min 2 spaces before an inline comment). Adjust to two spaces before # to match repo style and avoid linter findings.

Copilot uses AI. Check for mistakes.

- name: Install Cosign
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inline comment spacing here is ... # v3.9.2 with only one space before #. With .yamllint extending the default rules, this typically violates the comments rule (min 2 spaces before an inline comment). Use two spaces before # to avoid yamllint warnings/errors.

Copilot uses AI. Check for mistakes.

- name: Login to GitHub
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Inline comment spacing here is ... # v3.4.0 with only one space before #. With .yamllint extending the default rules, this typically violates the comments rule (min 2 spaces before an inline comment). Use two spaces before # to match the linting configuration.

Copilot uses AI. Check for mistakes.
Comment on lines 36 to +39
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

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

In the run script, ${{ github.ref_name }} is interpolated directly into the shell command without quotes. If a tag name contains shell metacharacters (e.g., $()), it could be interpreted by bash. Prefer using the runner-provided env var ($GITHUB_REF_NAME) and quote it (or assign it once) before processing, so it’s treated strictly as data.

Copilot uses AI. Check for mistakes.
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 37-39: The pipeline currently strips all "v" characters using sed
's/v//g' which can mangle version strings; update the APP_VERSION assignment to
only remove a leading "v" (e.g., use a leading-anchor sed like s/^v//) and set
CHART_VERSION by reusing APP_VERSION instead of re-running sed, keeping
CHART_NAME logic unchanged.

Comment on lines 37 to +39
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 | 🟡 Minor

Strip only a leading “v” to avoid mangling version strings.

sed 's/v//g' removes every “v”, not just the prefix. Use a leading-only strip and reuse APP_VERSION for CHART_VERSION to avoid accidental changes.

🔧 Proposed 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"
🤖 Prompt for AI Agents
In @.github/workflows/ko-build-tag.yaml around lines 37 - 39, The pipeline
currently strips all "v" characters using sed 's/v//g' which can mangle version
strings; update the APP_VERSION assignment to only remove a leading "v" (e.g.,
use a leading-anchor sed like s/^v//) and set CHART_VERSION by reusing
APP_VERSION instead of re-running sed, keeping CHART_NAME logic unchanged.

@andrest50 andrest50 merged commit 93c50c6 into main Mar 2, 2026
5 checks passed
@andrest50 andrest50 deleted the feat/LFXV2-872 branch March 2, 2026 17:06
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.

3 participants