feat(ci): self-test json-schema-validation against a fixture chart - #262
Conversation
Renovate bumped `verify-helm-schema` to v2.6.2 (#258) and broke JSON schema validation in every cluster app repo. schemalint's release pipeline had moved to architect 9.x, which publishes raw binaries instead of tarballs, while its action still relied on install-binary-action's default tarball URL - so the install 404'd. This repo is consumed at `@main`, so the breakage was live org-wide about a minute after merge. None of the existing checks could have caught it: yamllint, action-validator and zizmor are all static and never execute the pinned actions. Add a check that calls the real reusable workflow against a fixture chart, so the pins under test are exactly the ones that ship. The fixture schema comes from schemalint's own cluster-app testdata, normalized as `verify` requires, with values.yaml generated by helm-values-gen so the `generate` job's diff passes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Proves the self-test actually catches the 404. Reverted in the next commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… v2.6.2" Negative test done: run 31001492199 failed with the same "Unexpected HTTP response: 404" on schemalint-v2.6.2-linux-amd64.tar.gz that cluster-aks hit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Negative test done, as promised in the description. Pinned Run 31001492199 — reverted in Two things came out of the investigation behind this PR:
Also worth correcting the record: my initial reading blamed the |
Part of giantswarm/giantswarm#37347 — Lack of schema testing in github-workflows lets bugs pass
Why
verify-helm-schemawas bumped to v2.6.2 in #258 and JSON schema validation broke in every cluster app repo (example).The cause was not the
install-binary-actionv3.0.0 → v4.1.0 bump in the same commit — that action's defaultdownload_urlis unchanged, and unarchived binaries have been supported since v3.1.0.It was schemalint's release assets changing under a
download_urlthat still asked for the old name. The<repo>-v<version>-<platform>.tar.gzassets are built by this repo, increate-release.yaml'screate_and_upload_build_artifactsjob, which only runs when the caller passesbuild-release-artifacts: true. schemalint#319 (chore: align files according to platform standards) removed that input, so from v2.6.2 on the tarball was simply never built — whileaction.ymlwas still requesting it viainstall-binary-action's default URL →Unexpected HTTP response: 404.It was live org-wide about a minute after merge, because this repo is consumed at
@main. schemalint v2.6.3 fixed it with an explicitdownload_urland #261 pinned it, so the outage window was 14:39–16:05 UTC on 2026-08-04.Nothing here could have caught it.
Validate GitHub workflowsruns yamllint, action-validator and zizmor — all static, none of which ever executes a pinned action.What
A check that calls the real reusable workflow against a fixture chart, so the pins under test are exactly the ones that ship — there is no second copy of the pins to drift out of sync.
helm/selftest-cluster-app/values.schema.json— schemalint's ownpkg/lint/rulesets/testdata/cluster_azure.json(itsrulesets_test.goasserts zero errors undercluster-app), passed throughschemalint normalize, whichverifyalso checks.helm/selftest-cluster-app/values.yaml— exact stdout ofhelm-values-gen, so thegeneratejob's diff passes.find ./helm -maxdepth 2 -name values.schema.json, and aworkflow_calljob cannot be given a working directory.renovate.json5—ignorePaths: ['helm/**']so thehelm-valuesmanager leaves the fixture alone.The
pathsfilter means upstream rule-set churn can only redden PRs touching this workflow or the fixture, never unrelated ones — and a renovate pin bump does touchjson-schema-validation.yaml, which is exactly the case that broke.Drive-by: both
actions/checkoutsteps now setpersist-credentials: falseper the repo's action rules. Neither job uses git.Verification
Locally, with schemalint 2.6.3 and helm-values-gen 1.0.4:
schemalint verify helm/selftest-cluster-app/values.schema.json --rule-set cluster-app→ valid JSON Schema, normalized, valid againstcluster-app(the ~90 recommendations are advisory and do not fail).diff helm/selftest-cluster-app/values.yaml <(helm-values-gen …)→ empty.truthywarning that every workflow here already has.A negative test is pushed to this branch and then reverted, to show the check actually fails when the pin is broken.
🤖 Generated with Claude Code