Repository navigation
Conversation
helm pull does not create its -d directory, so the presence check always failed and a published version was pushed over. Any pull failure other than an absent version now stops the script; the fake helm of the tests refuses a missing directory like helm does.
This branch has not been deployed
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.
publish-chart.shpromises that a version already in the registry is never overwritten. It was overwritten every time.Cause
The presence check runs
helm pull "$repository" --version "$version" -d "$work/existing", and nothing creates$work/existing.helm pulldoes not create its destination directory: it prints the digest, then fails withopen …/existing/<chart>-<version>.tgz…: no such file or directory. Every failure of that pull was taken for "absent", so the script went on and pushed. The same code is in v0.1.0, ondev, onfeat/wpb-29305-publish-extra-chartand onfeat/wpb-29305-retry-safe-publication(#6, which also pulls into$work/readback).The tests did not see it: the fake helm ran
mkdir -pon the destination itself.Evidence
quay.io/wire/charts/stable/step-certificates:1.29.3-alpha.2(wireapp/helm-charts, run 43257391868), tag history on Quay:d308cdf…b66b72f…status=pushed)0d92ab5…The digests differ because
helm dependency updatewrites a newgenerated:date inChart.lockat every run. Reproduced locally with Helm: the pull fails without the directory and succeeds with it.Change
mkdir -p "$work/existing"before the first pull.not found,manifest unknown,name unknown, 401/403/404,unauthorized,denied). Any other failure (a local error, the network, a 5xx) stops the script with the pull output instead of pushing. A missing repository answers 401 to the pull, and a push without access fails the same way, so it overwrites nothing.FAKE_PULL_ERRORmakes the pull fail with a given message.Checks
tests/test_publish_chart.pypasses (40, 6 new: 3 pull errors that stop the script in both modes, 3 answers that mean absent).already published, not overwritten,status=present, digest of the current tag.shellcheck,actionlint,zizmor --offlineclean.Follow-ups
feat/wpb-29305-publish-extra-chart, which wireapp/helm-charts calls by branch, and on feat: retry-safe publication, wire-builds-bump, repair template - WPB-29305 #6 ($work/readback).1.29.3-alpha.2has to be restored tod308cdf…on Quay.