fix: check the copies that charts can move out from under us #94
Loading…
Reference in a new issue
No description provided.
Delete branch "ivuorinen/fix/check-derived-copies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three things in the repo derive from a chart version and were kept in step
by hand or by a Renovate task alone, with nothing to notice when they were
not.
The Alloy dashboards had their own pin, separate from the Alloy chart, and
the chart decides which Alloy runs. It had drifted again: the mixin was at
v1.20.1, the cluster runs v1.20.0 (chart 1.13.0). The pin is gone. The
generator reads the chart version from gitops/argocd-apps/alloy.yaml and
takes the mixin from that chart's appVersion, using the release tarball
and tools it already needs (awk, not yq, which Renovate's postUpgradeTask
cannot install). An Alloy chart bump is already grouped with its dashboard
and regenerates them; the github-tags manager no longer sees a tag to move.
The regenerated dashboards differ only in their Source comments.
version-sync.bats drops Alloy from its unpaired list.
schemas/ and the Longhorn chart version were kept in step only by
Renovate's postUpgradeTask. scripts/ci/check-dashboards-regenerated.sh is
now scripts/ci/check-generated.sh and regenerates schemas/ as well, so a
hand bump or a task that did not run fails CI (render job) and the
pre-push hook, renamed generated-files. The catalog still lacks Longhorn's
system-backup task at the pinned commit, so schemas/ itself has to stay.
The Alertmanager inhibit_rules copy the chart's defaults, because Helm
replaces lists. scripts/ci/check-inhibit-rules.sh, run from the render job
beside the promtool check, fails unless every default of the deployed
chart version is declared, keys in any order; this cluster's own rules are
extra and allowed. A chart with no defaults where they used to be fails
rather than comparing nothing. It passes for 88.6.5 and for 91.9.0, the
version #21 moves to.
Each check was made to fail once: check-inhibit-rules.bats (5 cases)
fails when the comparison is skipped or never matches; check-generated.sh
fails on a committed hand edit to schemas/ and on an Alloy chart change
without regenerating; hook-coverage.bats gains a test that generated-files
fires on every generator, input and output, and it failed with alloy.yaml
and schemas/ removed from the pattern.
Tests: prek run --all-files clean, bats 68/68, prek --stage pre-push clean
(render 227 valid, 25 CRDs skipped; generated files match).