Repository navigation
Fix chart version extraction in the OCI publish workflow - #858
Merged
Merged
Conversation
The first real run published both charts correctly but then failed the verification step with: Error: improper constraint: "v1beta1" OPERATOR_VERSION had been extracted as "v1beta1" instead of "0.9.1". The awk expression matched on the first field, and awk strips leading whitespace when splitting fields, so an indented "version:" key matches just as readily as a top-level one. The solr-operator Chart.yaml has four of them before the real chart version: three "version: v1beta1" entries inside the artifacthub.io/crds annotation, and the zookeeper-operator dependency's "version: 0.2.15". Anchor the match to column 0, the same way propagate_version.sh does it, and strip any surrounding quotes. The solr chart was unaffected only by luck: its Chart.yaml carries no CRD annotations, so its first "version:" is already the chart version. The published artifacts were never wrong. 'helm push' reads the tag from Chart.yaml itself, so both charts went to ghcr.io tagged 0.9.1 as intended; only the post-push verification used the bad value. Also assert that each extracted version agrees with its chart filename. The byte-comparison later in the same step already assumes 'helm pull' writes <chart>-<version>.tgz, so checking it up front turns a confusing downstream failure into an explicit one. Part of apache#813
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first real run published both charts correctly but then failed the verification step with:
Error: improper constraint: "v1beta1"
OPERATOR_VERSION had been extracted as "v1beta1" instead of "0.9.1". The awk expression matched on the first field, and awk strips leading whitespace when splitting fields, so an indented "version:" key matches just as readily as a top-level one.
Part of #813