Skip to content

ci: add one-off workflow to repair missing helm index entries - #29794

Merged
f0ssel merged 1 commit into
mainfrom
f0ssel/helm-index-repair-workflow
Sep 23, 2026
Merged

f0ssel merged 1 commit into
mainfrom
f0ssel/helm-index-repair-workflow

Conversation

@f0ssel

@f0ssel f0ssel commented Sep 23, 2026

Copy link
Copy Markdown
Member

Adds a manually dispatched Helm index repair workflow to re-add chart entries that were dropped from https://helm.coder.com/v2/index.yaml by the release race described in #29793. The 2.36.6 tarballs (and likely 2.36.2) are already in the bucket, on ghcr.io, and attached to the GitHub release; only the index entry is missing, so the repair is a merge and upload of index.yaml.

Inputs

  • version: chart version to re-add, for example 2.36.6 (a leading v is stripped).
  • dry_run (default true): do everything except the upload, and print the exact gsutil command that would run.

What it does

  1. Copies whichever of coder_helm_<v>.tgz, provisioner_helm_<v>.tgz, ai-gateway_helm_<v>.tgz exist in the bucket. Missing ones are warned about (older versions predate the AI gateway chart); if none exist it fails. Tarballs are taken from the bucket, never rebuilt, so the digests written to the index match what is served.
  2. Downloads index.yaml, pinned to a GCS generation (fails if the object changes during the download, which means a release is mid-publish).
  3. Runs helm repo index --merge, then diffs the chart version list before and after. Refuses to continue if any existing entry would be removed. Exits cleanly if the entries are already present.
  4. Prints the entries being added and a unified diff of index.yaml.
  5. Dry run: prints the upload command and stops. Otherwise uploads with x-goog-if-generation-match so it cannot clobber a concurrent write.

Gated behind the same maintainer/admin check as release.yaml, uses the same GCP workload identity, permissions: {} at the top level with only id-token: write on the repair job, and a workflow-level concurrency group so two repairs cannot race each other.

Verification

  • actionlint, shellcheck, and zizmor pass.
  • Ran the step script locally against a fake gsutil backed by a directory: dry run leaves the bucket untouched and prints the command; real run adds coder 2.36.6 and provisioner 2.36.6 while keeping the existing entry and bumping the generation; re-running is a no-op; a version with no tarballs fails.
  • Not run against the real bucket. First real use should be a dry_run: true dispatch for 2.36.6 to confirm the tarballs are found and the diff looks right.

Generated by Coder Agents on behalf of @f0ssel.

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants