Skip to content

prepend a g to the github has in package version to avoid semver issues#272

Merged
gflarity merged 1 commit into
ai-dynamo:mainfrom
gflarity:fix_semver
Nov 21, 2025
Merged

prepend a g to the github has in package version to avoid semver issues#272
gflarity merged 1 commit into
ai-dynamo:mainfrom
gflarity:fix_semver

Conversation

@gflarity

@gflarity gflarity commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this?

Bug

What this PR does / why we need it:

During the github build and push workflow we embed the short git SHA in the version after the version with a - in front. Semver rules require that this not start with a zero, otherwise it's invalid and helm will reject it for it's --version parameter. See:

Run sed -i "s#repository: grove-operator#repository: $DOCKER_REGISTRY/grove-operator#" operator/charts/values.yaml
  sed -i "s#repository: grove-operator#repository: $DOCKER_REGISTRY/grove-operator#" operator/charts/values.yaml
  sed -i "s#tag:.*#tag: $PACKAGE_VERSION#" operator/charts/values.yaml
  sed -i "s#value: grove-initc#value: $DOCKER_REGISTRY/grove-initc#" operator/charts/values.yaml
  helm package ./operator/charts --app-version $PACKAGE_VERSION --version $PACKAGE_VERSION
  shell: /usr/bin/bash -e {0}
  env:
    PACKAGE_VERSION: v0.0.0-0617444
    DOCKER_REGISTRY: ghcr.io/ai-dynamo/grove
Error: version segment starts with 0
Error: Process completed with exit code 1.

See semver.org:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92, 1.0.0-x-y-z.--.

Just add a 'g' in front of the SHA, and this will never happen again.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a API change?

NONE

Additional documentation e.g., enhancement proposals, usage docs, etc.:


@gflarity gflarity merged commit a9716b8 into ai-dynamo:main Nov 21, 2025
3 checks passed
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