Repository navigation
Description
What happened?
When we are in changeset pre mode (rc tag), merging the Versioning Packages (rc) PR will version the trueforge package correctly but the helm chart always gets a non rc bump
For e.g. when we released 0.1.4-rc.0 it resulted in chart 0.1.4
#347
We would have liked to release chart version 0.1.4-rc.0
Note: Our goal is not to keep the npm package version and chart version in sync, chart version can independently be ahead. Our goal is to only respect the rc mode
So for e.g.
package: 0.1.5-rc.X
chart: 0.1.6-rc.Y
is valid
Code changes will be mostly limited to
trueforge/.github/workflows/build-and-prepare-chart-release.yml
Lines 151 to 186 in b27e4fc
| set -euo pipefail | |
| SEMVER='^([0-9]+)\.([0-9]+)\.([0-9]+)(-[0-9A-Za-z.-]+)?$' | |
| CURRENT=$(yq -r '.version' charts/trueforge/Chart.yaml) | |
| if [[ ! "$CURRENT" =~ $SEMVER ]]; then | |
| echo "Chart.yaml version '$CURRENT' on $GITHUB_REF_NAME is not semver" >&2 | |
| exit 1 | |
| fi | |
| MAJOR="${BASH_REMATCH[1]}" | |
| MINOR="${BASH_REMATCH[2]}" | |
| PATCH="${BASH_REMATCH[3]}" | |
| VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))" | |
| # create-pull-request rebuilds the PR branch from base plus this | |
| # workspace, so a reviewer's major/minor bump on the open PR is dropped | |
| # unless it is re-applied here. Only outrank the patch bump: a PR | |
| # version at or below it means base already absorbed that release. | |
| if git ls-remote --exit-code --heads origin "$PR_BRANCH" >/dev/null 2>&1; then | |
| git fetch --depth=1 origin "$PR_BRANCH" | |
| PR_VERSION=$(git show FETCH_HEAD:charts/trueforge/Chart.yaml | yq -r '.version') | |
| if [[ "$PR_VERSION" =~ $SEMVER ]] && | |
| (( BASH_REMATCH[1] > MAJOR || | |
| (BASH_REMATCH[1] == MAJOR && BASH_REMATCH[2] > MINOR) || | |
| (BASH_REMATCH[1] == MAJOR && BASH_REMATCH[2] == MINOR && BASH_REMATCH[3] > PATCH + 1) )); then | |
| echo "Keeping chart version $PR_VERSION from $PR_BRANCH (over $VERSION)" | |
| VERSION="$PR_VERSION" | |
| fi | |
| fi | |
| export VERSION IMAGE_TAG APP_VERSION | |
| yq -i '.version = strenv(VERSION)' charts/trueforge/Chart.yaml | |
| yq -i '.image.tag = strenv(IMAGE_TAG)' charts/trueforge/values.yaml | |
| if [[ "$UPDATE_APP_VERSION" == "true" ]]; then | |
| yq -i '.appVersion = strenv(APP_VERSION)' charts/trueforge/Chart.yaml | |
| fi | |
| APP_VERSION=$(yq -r '.appVersion' charts/trueforge/Chart.yaml) | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT" |
Steps to reproduce
This is tricky to reproduce for community without modifying the workflow to skip the build and push image step
Once that step is skipped with dummy image tag output - trigger the workflow with something like app_version 0.1.5-rc.0.
How are you running TrueForge?
N/A
Version
N/A
Relevant logs or screenshots
Environment
No response
Activity
[-]Helm chart version bump should take into account rc releases[/-][+]Helm chart version bump should honor `pre` release mode[/+]jayesh9747 commentedon Aug 21, 2026
@chiragjn i want to pickup this issue also. can i start to work on that ?
jayesh9747 commentedon Aug 21, 2026
RCA for the above bug is : Changesets correctly passes the RC version (for example, 0.1.4-rc.0) to the chart-release workflow. The issue is in the chart version calculation—it only uses the current chart’s major/minor/patch and always generates the next stable patch, so the RC suffix is ignored.
The fix should preserve the chart’s independent numeric versioning while carrying over the prerelease mode from app_version. For example, chart 0.1.5 with app 0.1.5-rc.2 should produce chart 0.1.6-rc.2. We should also update the open chart-PR comparison to consider prerelease suffixes when the numeric versions are equal. Tests should cover stable, first RC, and existing RC PR cases.
chiragjn commentedon Aug 21, 2026
@jayesh9747 I see you have already begun work, so assigning it you. Just one comment in the approach
Hmm, workable, but I would expect algorithm to be like
0.1.5 --> pre mode --> 0.1.6-rc.N --> 0.1.6-rc.(N + 1) --> exit pre --> 0.1.6 --> 0.1.7
basically the chart's rc move linearly without caring about app version's rc part
jayesh9747 commentedon Aug 23, 2026
@chiragjn Thanks for the suggestion. I’ve updated PR #394 accordingly.
The chart RC version now moves independently of the app’s RC number:
0.1.5 → 0.1.6-rc.0 → 0.1.6-rc.1 → 0.1.6 → 0.1.7The app version is now only used to determine whether we are in prerelease mode. I’ve also added tests for this flow. Please take a look when you have time.