Repository navigation
chore(registrar)!: the deprecated aether.registrar.snapshot.content gauge is removed - #1667
Merged
Merged
Conversation
…auge is removed
The labelled info gauge aether.registrar.snapshot.content{content_hash}
(Prometheus aether_registrar_snapshot_content) was deprecated in chart 2.4.12
(#1329, #1346) in favour of aether.registrar.snapshot.content_hash, which
carries the hash as its value and is what the shipped rule
AetherRegistrarSnapshotDiverged reads. Deprecated in 2.4.x means removable from
2.5.0 on; the "chart 2.6.0 at the earliest" written beside it by #1658 was one
minor too cautious and is corrected here.
- registrar: the instrument, its content_hash attribute key and the helper
that observed both gauges are gone; the value gauge and the revision gauges
are untouched. A test asserts the exported metric set does not contain the
name, and that no gauge data point carries a content_hash attribute.
- docs: the runbook's transitional `or` arm and its order of work, the
"Deprecated" sections of the runbook and docs/observability/README.md, and
the upgrade comment in registrar-alerts.yml are replaced by a short account
in the past tense. The shipped rule and its promtool tests never read the
metric and are unchanged.
- chart 2.5.9: a runbook section says what an operator sees (a rule or a
dashboard still reading the metric returns no data, silently), the query to
use instead, and closes the row of the "Chart 2.5.7" deprecation table.
The upgrade rolls the registrar Deployment (new image); no template changed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
What
Removes the registrar's deprecated info gauge
aether.registrar.snapshot.content{content_hash}(Prometheusaether_registrar_snapshot_content).It was deprecated in chart 2.4.12 (#1329, #1346) in favour of
aether.registrar.snapshot.content_hash, which carries the hash as its value on one label-free series per replica and is what the shipped ruleAetherRegistrarSnapshotDivergedreads. Under the compatibility window (AGENTS.md,charts/README.md: deprecated in 2.4.x, removable from 2.5.0 on) it may go now. #1658 wrote "chart 2.6.0 at the earliest" beside it in four places; that dating was one minor too cautious and is corrected here.Operator-visible. Chart 2.5.9 (was 2.5.8 on
main).What an operator sees
aether_registrar_snapshot_content_hash(exported by every registrar since chart 2.4.12). The runbook's new "Chart 2.5.9" section has the full divergence expression, agrepto find what still reads the old name, and the checks for after the upgrade.orarm keeps working (an arm that returns nothing leaves the first arm); the arm can be deleted.What rolls: the registrar Deployment (its image changed). No template changed.
helm templateof the chart package built atmainand at this branch (stub kubeconfig,--set controller.webhook.spire=true), 2,366 lines each, 60 changed lines:The
helm.sh/chartlabel is on object metadata only (not on a pod template), so the one pod-template change is the registrar's image.Changes
Code (
registrar/internal/server/metrics.go, 30 lines out, 12 in): the instrument, theattrContentHashLabelattribute key, andobserveContent(the helper that observed both gauges; the value half is now inline in the callback). The value gauge,store_revisionandsnapshot_revisionare untouched.Nothing else referenced the removed identifiers. Both are unexported, so the package and its tests are the whole reference set;
make go-build-plain(go build ./...andgo vet ./...over all 138 packages of the module, tests included, none excluded) is clean andgit grep 'observeContent\|attrContentHashLabel'is empty.Tests (
metrics_test.go):TestMetrics_ObserveSnapshotasserted the revision gauges and then the labelled gauge. The revision assertions stay, and it now also checks thatsnapshot_revisionfollows three more listings.TestMetrics_ContentHashGaugeandTestMetrics_ObserveSnapshotWithoutRevisionseach lose their one assertion on the labelled gauge and keep every assertion on the value gauge.New
TestMetrics_RemovedContentGaugeIsNotExported(with and without a revisioned backend): the exported metric set does not contain the name, no gauge data point carries acontent_hashattribute, and the value gauge is exported. Seen red against the unchanged code first:Docs:
docs/runbook.md: new "Chart 2.5.9" section; the row of the "Chart 2.5.7" deprecation table is closed ("any chart from 2.5.0 on; removed in chart 2.5.9"); in "Stored vs in place vs applied", the "Deprecated" passage with the two-arm expression and the order of work (62 lines) is replaced by one paragraph in the past tense.docs/observability/README.md: "Deprecated" becomes "Removed", in the past tense; the sentence about tests of the transitional arm kept elsewhere is gone.docs/observability/registrar-alerts.yml: theUPGRADINGcomment (10 lines) is replaced by five lines saying the labelled gauge is no longer exported. The file carried the arm only as a comment, never inexpr.docs/observability/metric-labels.mddid not list the old metric: no change.test/harnesscontract/external-harness.yamland its lock do not name any registrar snapshot metric: the contract is unchanged.What is left
git grep -n 'snapshot_content\|snapshot\.content', without the replacement…content_hash, now returns only:docs/runbook.md: the "Chart 2.5.9" section (title, the removal text, thegreppattern, the "must be empty" query), the closed row of the "Chart 2.5.7" table, and the past-tense paragraph in "Stored vs in place vs applied";docs/observability/README.md("Removed: …") anddocs/observability/registrar-alerts.yml(the comment above), both in the past tense;registrar/internal/server/metrics.go: nothing by name (a past-tense comment says why the hash is not a label);registrar/internal/server/metrics_test.go: the constant the absence test checks for.None presents the metric as current.
Verification
bazel test //registrar/... //:observability_rules_test //charts/... //website:site_test //test/harnesscontract:checks: 283 passbazel test --config=raceon the sixgo_testtargets under//registrar/...: passmake go-build-plain:go build ./...andgo vet ./...ok, none excludedbazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...: okmake format-check: okNot run on a cluster.
Written by an AI coding agent.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr