Skip to content

fix(release): bump Helm Chart.yaml version during release branch setup - #4003

Open
pujitha24 wants to merge 1 commit into
tektoncd:mainfrom
pujitha24:auto/issue-4002
Open

fix(release): bump Helm Chart.yaml version during release branch setup#4003
pujitha24 wants to merge 1 commit into
tektoncd:mainfrom
pujitha24:auto/issue-4002

Conversation

@pujitha24

Copy link
Copy Markdown
Contributor

Changes

charts/tekton-operator/Chart.yaml has shipped with version: "devel" /
appVersion: "devel" committed in the git tree for every release since
v0.80.0 (confirmed by fetching the raw Chart.yaml at the v0.80.0,
v0.81.0 and v0.81.1 tags), and with a stale v0.79.1 for v0.79.2.
Helm rejects "devel" as an invalid chart version, so consumers that read
the chart straight from a git tag/branch (e.g. ArgoCD via the helm-git
plugin, or a plain git clone) fail to deploy.

Root cause: the actual release-branch preparation script,
hack/release-setup-branch.sh (invoked per tekton/release-cheat-sheet.md
for every minor and patch release), never touched charts/tekton-operator/Chart.yaml.
The only place this file got bumped was:

  • a manual, easy-to-forget sed step documented in the cheat sheet (only ever
    run once, for v0.79.1), and
  • .github/workflows/helm-release.yaml, which seds the file in the CI
    runner's ephemeral checkout to build the packaged chart, but never commits
    that change back to git - so the git tag itself keeps "devel" forever.

This PR extends set_version_label() in hack/release.sh (called by
hack/release-setup-branch.sh) to also bump Chart.yaml's version/appVersion
fields using the same old_version/operator_version variables it already
computes for every other manifest, and includes charts/ in the release
commit. charts/tekton-operator/templates/*.yaml already renders every
version label from .Chart.AppVersion (added in 683e447), so Chart.yaml
is the only file that needed updating. The now-redundant manual step is
removed from tekton/release-cheat-sheet.md.

Note: .github/workflows/helm-release.yaml's own "Update Chart version with
release tag" sed step becomes a silent no-op once Chart.yaml no longer
contains the literal string "devel" at tag time - harmless, since the
values it packages are derived from the git ref rather than from the sed
match, but worth a follow-up cleanup.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Run make test lint before submitting a PR (n/a: only hack/release.sh (bash) and a .md doc changed - no .go/.yaml files touched; ran shellcheck on the shell script instead, see Validation disclosure below)
  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices

See the contribution guide for more details.

Validation disclosure: hack/release.sh is a manual maintainer script
with no unit tests, no shellcheck CI, and no GitHub Actions coverage;
hack/release-setup-branch.sh requires a real upstream git remote to push
branches, so I could not run it end to end. This sandbox only has BSD sed
(no -i-compatible GNU sed) - a pre-existing limitation shared by every
other sed -i -E call already in this file, not something introduced here.
I instead extracted the new sed expressions and ran them (via sed -E,
writing to stdout instead of -i) against a copy of the real Chart.yaml:
old_version=devel, operator_version=v0.80.0 correctly produced
version: 0.80.0 / appVersion: v0.80.0 (matching the format already
committed for v0.79.1), and chaining old_version=v0.80.0, operator_version=v0.80.1 against that output correctly produced
version: 0.80.1 / appVersion: v0.80.1, proving the transform works for
ordinary patch-to-patch transitions too, not just the initial devel case.
Also ran shellcheck on both scripts: only pre-existing info-level SC2086
findings in the same style as surrounding code.

Release Notes

Fix Helm chart `Chart.yaml` shipping `version: "devel"` / `appVersion: "devel"` in release tags, which made `helm-git`/git-based chart consumers (e.g. ArgoCD) fail to deploy.

AI assistance: this change was drafted with Claude Code.

Fixes #4002

Motivation:
charts/tekton-operator/Chart.yaml has shipped as "version: \"devel\"" /
"appVersion: \"devel\"" in the git tree for every release since v0.80.0
(confirmed by fetching the raw Chart.yaml at the v0.80.0, v0.81.0 and
v0.81.1 tags), and as a stale "v0.79.1" for v0.79.2. Helm rejects
"devel" as an invalid chart version, so consumers that read the chart
straight from a git tag or branch (e.g. ArgoCD via the helm-git
plugin, or a plain git clone) fail to deploy. This was reported once
before and the .github/workflows/helm-release.yaml CI job was patched
to sed the version into place at tag-push time, but that sed only
edits the ephemeral CI runner's checkout to produce the packaged
.tgz/OCI artifact - it is never committed back to git, so the tag
itself keeps "devel" forever. tekton/release-cheat-sheet.md separately
documented a manual sed-and-commit step to fix Chart.yaml in git, but
it is easy to forget: it was only ever run once, for v0.79.1.

Approach:
hack/release.sh's set_version_label() (invoked by
hack/release-setup-branch.sh, the script the release cheat sheet has
maintainers run to prepare every release branch) already rewrites
version labels across config/ and cmd/ and gets committed into the
release branch by commit_changes(). Extend the same function to also
bump charts/tekton-operator/Chart.yaml's version/appVersion fields
using the old_version/operator_version variables it already computes,
and include charts/ in the commit. charts/tekton-operator/templates/
already renders every version label from .Chart.AppVersion (see
683e447), so Chart.yaml is the only file that needs updating.
Removed the now-redundant manual "Update Helm charts" step from
tekton/release-cheat-sheet.md since this makes it automatic.

Note: .github/workflows/helm-release.yaml's own "Update Chart version
with release tag" sed step becomes a silent no-op once Chart.yaml no
longer contains the literal string "devel" at tag time - harmless,
since the values it packages (VERSION/TAG) are derived from the git
ref rather than from the sed match, but worth a follow-up cleanup.

Validation:
hack/release.sh is a manual maintainer script with no unit tests, no
shellcheck CI, and no GitHub Actions coverage; hack/release-setup-branch.sh
requires a real upstream git remote to push branches, so I could not
run it end to end. This sandbox only has BSD sed (no -i-compatible
GNU sed), a pre-existing limitation shared by every other "sed -i -E"
call already in this file, not something introduced here. I instead
extracted the new sed expressions and ran them (via "sed -E", writing
to stdout instead of -i) against a copy of the real Chart.yaml:
  - old_version=devel, operator_version=v0.80.0 correctly produced
    "version: 0.80.0" / "appVersion: v0.80.0", matching the format
    already committed for v0.79.1.
  - chaining old_version=v0.80.0, operator_version=v0.80.1 against
    that output correctly produced "version: 0.80.1" /
    "appVersion: v0.80.1", proving the transform also works for
    ordinary patch-to-patch transitions, not just the initial
    "devel" case.
Also ran `shellcheck hack/release.sh hack/release-setup-branch.sh`:
only pre-existing info-level SC2086 (unquoted variable in echo)
findings in the same style as surrounding code, nothing new.

Report: tektoncd#4002

```release-note
Fix Helm chart `Chart.yaml` shipping `version: "devel"` / `appVersion: "devel"` in release tags, which made `helm-git`/git-based chart consumers (e.g. ArgoCD) fail to deploy.
```

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5 (via Claude Code)
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 31, 2026
@tekton-robot
tekton-robot requested review from jkhelil and khrm August 31, 2026 14:11
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.44%. Comparing base (572857b) to head (7dd339b).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4003   +/-   ##
=======================================
  Coverage   26.44%   26.44%           
=======================================
  Files         465      465           
  Lines       24992    24992           
=======================================
  Hits         6610     6610           
  Misses      17661    17661           
  Partials      721      721           
Flag Coverage Δ
unit-tests 26.44% <ø> (ø)

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.

@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2026
@jkhelil

jkhelil commented Sep 1, 2026

Copy link
Copy Markdown
Member

@pujitha24 Can you explain how did you raise this PR ?

@pujitha24

Copy link
Copy Markdown
Contributor Author

I used Claude Code to help investigate and draft this, as noted in the PR description. Starting from issue #4002, I traced the "devel" version through the release scripts and found that hack/release-setup-branch.sh (via set_version_label() in hack/release.sh) never touches charts/tekton-operator/Chart.yaml — the only place it got bumped was a manual cheat-sheet step that was only ever run once, plus a CI sed in helm-release.yaml that never gets committed back to git. I couldn't run hack/release-setup-branch.sh end-to-end since it needs a real upstream remote to push against, so I validated the new sed expressions separately against a copy of the actual Chart.yaml and ran shellcheck on both scripts — that's written up in the Validation disclosure section of the description. Happy to go into more detail on any part of it.

@jkhelil

jkhelil commented Sep 2, 2026

Copy link
Copy Markdown
Member

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 2, 2026
@pujitha24

Copy link
Copy Markdown
Contributor Author

Saw the hold. If there's a specific concern — about the AI-assisted process or anything in the change itself — let me know and I'll address it.

@jkhelil

jkhelil commented Sep 2, 2026

Copy link
Copy Markdown
Member

@pujitha24 thanks for the contributions on operator, I have noticed you've opened several PRs recently and I appreciate that they're solving real issues.
That said, we'd love to get a better sense of the human behind them. Tekton's an open community and we want contributors engaged with the project, not just generating PRs
Could you join one of our community calls sometime?
Also flagging our AI Contribution Policy ,  if any of this work involved AI tooling, we ask that it's disclosed (e.g. an Assisted-by: trailer or a note in the PR description) so reviewers know what they're looking at. Nothing against using AI, we just need a human clearly accountable and in the loop for each submission

@pujitha24

Copy link
Copy Markdown
Contributor Author

Appreciate that, and totally understand wanting a human in the loop here. On disclosure: it's called out in the PR description ("AI assistance: this change was drafted with Claude Code") and the commit carries an Assisted-by: claude-sonnet-5 (via Claude Code) trailer — let me know if the policy expects it presented differently.

I'd be glad to join a community call — could you point me to where the schedule/link is posted? Happy to introduce myself and talk through this PR and the others directly.

sed -i "s/^version: \"devel\"/version: ${TEKTON_RELEASE_VERSION#v}/" charts/tekton-operator/Chart.yaml
sed -i "s/^appVersion: \"devel\"/appVersion: ${TEKTON_RELEASE_VERSION}/" charts/tekton-operator/Chart.yaml
```

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.

@pujitha24 cheatsheet steps are maintained for manual references. Any specific reason why this is removed?

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from pratap0007 after the PR has been reviewed.

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

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[chart] Chart.yaml in 0.80.0 onwards contains "devel" instead of actual versions

5 participants