Repository navigation
Conversation
Every release rewrote image digests, the registry, and the chart version in the chart READMEs, so the release worker had to regenerate them with a copy of helm-docs. When that copy drifted from scripts/helm-docs.sh, the release branch failed the helm-docs check (v8.1.0, PLAT-876). Annotate the release-managed values in values.yaml with `# @default --`, and use a `<chart-version>` placeholder in the migrator README. The generated READMEs no longer depend on anything the release changes, so the release worker can stop regenerating them. A new CI step fails if a README renders a pinned digest or the public registry again. Amp-Thread-ID: https://ampcode.com/threads/T-01a13c8e-c52e-7584-ab27-1a7fb05bc3b7
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.
Every release rewrites the image digests and registry in
values.yamland the chart version inChart.yaml, and all three show up in the generated READMEs. That forced the release worker to regenerate the READMEs with its own copy of helm-docs. When that copy drifted fromscripts/helm-docs.sh,internal/release-v8.1.0failed ":book: Verify helm-docs is up-to-date" and had to be fixed by hand. The regeneration also doesn't reach customers. The publish Action packages the chart from the first push topromote/release-*, before the docs commit lands, so the publishedsourcegraph-8.0.0.tgzREADME lists the internal registry as the default.This PR makes the READMEs independent of everything a release changes, so the release worker can drop its helm-docs step entirely (sourcegraph/sourcegraph#17056):
defaultTaggets# @default -- `<appVersion>@sha256:<digest>`, pinned by each release, andsourcegraph.image.repositorygets# @default -- Sourcegraph's public Docker Hub registry, in the four charts the release updates. The two executor images also get the# --description helm-docs needs before it honors@default. The registry annotation deliberately avoids the literal registry string, because the release replaces that string everywhere invalues.yaml, comments included.<chart-version>placeholder instead of{{ template "chart.version" . }}.index.docker.io/sourcegraph. A new image added without an annotation then fails on its own PR rather than on the next release branch. It is a separate step so it doesn't conflict with CI: Make helm-docs.sh portable #954, which rewrites the existing helm-docs step.The tradeoff is that the values tables no longer list the exact digests;
values.yamlandhelm show valuesstill do.I simulated both release phases with the release worker's own
values.yamlrewrite (dev/images.UpdateHelmManifestContent) plus theChart.yamlbump, then ran./scripts/helm-docs.sh. Onmainthat produces 68 changed README lines after the internal phase and 60 after promote. On this branch it produces none for either phase.Merge this, and backport it to every
X.Y.xbranch that still gets patch releases (at least8.0.xand8.1.x), before the release worker change deploys. Patch releases branch fromX.Y.x, and a branch without these annotations would fail the helm-docs check once the worker stops regenerating READMEs.Part of PLAT-876.