fix: check the copies that charts can move out from under us #94

Merged
ivuorinen merged 1 commit from ivuorinen/fix/check-derived-copies into main 2026-10-07 21:37:44 +00:00 AGit
Owner

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).

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).
fix: check the copies that charts can move out from under us
All checks were successful
validate / render (pull_request) Successful in 2m4s
validate / hooks (pull_request) Successful in 3m41s
0abdb43e56
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).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ivuorinen/turingpi-cluster!94
No description provided.