feat(grafana): add Kubernetes 3831 and 1471 curated packs - #437
Merged
Conversation
Cluster Autoscaler and App Metrics need pack-level ES|QL, Heapster label bridges, and layout so they render in Kibana instead of empty native PROMQL LAST steps and cartesian HTTP legends.
Remove the redundant integer cast so the required Ruff check passes, and isolate the pod-count regression case so failures identify the affected behavior.
giorgi-imerlishvili-elastic
approved these changes
Sep 3, 2026
giorgi-imerlishvili-elastic
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: fixed, then approved. No Critical or Important findings remain.
What I verified
- Contract/diff: both canonical dashboards (Grafana 1471 rev 1 and 3831 rev 1) resolve through the new registry entries; both provenance pins verify. I generated and inspected IR plus native artifacts from the canonical sources: 23/23 panels mapped (1471: 10 clean + 3 explicitly approximate; 3831: 10 clean), 0 manual, 0 not-feasible, canonical namespace/container controls, single Lens breakdowns, guarded ratios, cumulative LAST_OVER_TIME semantics, DATE_DIFF activity tiles, and non-overlapping 3831 layout.
- Boundaries/regressions: reviewed empty/duplicate Lens labels, zero-denominator guards, optional HTTP-series behavior, canonical/legacy label rewriting, flattened-row positions, and the metric/gauge native payload shapes. The label change remains limited to empty or duplicate inner labels when chrome titles are shown. Five-profile portability passed without canonical-name leakage. No supported panel type or fidelity baseline was added/changed.
- Tests: the new targeted tests fail on the unmodified merge base at the first missing 3831 registry assertion, so they are not vacuous. The split 1471 pod-count test retains every original assertion.
- Docs/conventions: operator-visible behavior is documented in docs/sources/grafana.md; fidelity manifests contain no UNKNOWN entries and explicitly disclose the three 1471 approximations and three 3831 presentation approximations. The PERCENTILE concern was probed: it is not claimed as exact histogram_quantile parity; the manifest and emitted warning explicitly identify the duration-gauge approximation.
Fixes in b0c50e3
- Critical
<parity-rig/curated/grafana_763_redis_exporter/k8s_exporter.py:257>: removed an unnecessary int() around an already-integer memory-limit expression. It mattered because Ruff RUF046 made the required CI gate fail. The emitted value remains byte-for-byte536870912. - Minor
<tests/test_curated_packs.py:5714>: separated the Number-of-pods scenario from the response-time test so failures identify the behavior they cover. - Minor
<tests/test_curated_packs.py:5880>: removed the extra blank line at EOF so git diff --check is clean.
Gates
- Targeted: 19 passed, 204 deselected.
- Full unit suite: 6,219 passed, 53 skipped, 473 subtests passed.
- Lint: 498 source headers checked; skill mirror/structure checks passed; Ruff 0 errors.
- Typecheck: 0 issues in 10 source files.
- Provenance: 2/2 pins verified.
- Cross-profile corpus: 5 profiles passed; each produced 23 panels, 20 green / 3 yellow / 0 red.
- Post-push GitHub CI: 14/14 checks passed.
Visual verification did not apply to the review fix: it changes no migration/render/layout/control code. The only runtime edit is a lint-equivalent integer expression whose exporter output was verified identical; the other edits are tests/whitespace. No pre-existing base failures remain, and there are no optional Minor follow-ups from this review.
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.
Summary
LAST(value, step)is empty in Lens on prometheus_native ingest. Grafana's baresum()on*_totalstaysLAST_OVER_TIME(notRATE);time()-last_activityisDATE_DIFFseconds; Nodes available isready/total * 100so the number+% tile shows 100%, not 1%. Flattened"New row"panels sit aty: 2. KPI chrome titles are shortened for Kibana tiles.container_name/pod_name/kubernetes_io_hostnameand HTTPkubernetes_namespacerewrite to canonical labels.$containerbinds both cAdvisor container and HTTPapp. Request rate restores nginx (engine dropped it for status vs code grouping) as Grafana-stylenative | 200/nginx | 500/haproxy | 2xxseries. Plugin rewrites$namespace/$containerpopulate offcontainer_name. Per-pod graphs group bypod; response time usesPERCENTILEof the duration gauge.value/computed_value) so flattened metric tiles do not show the raw field name.k8s_exporternow emitscluster_autoscaler_*plus cAdvisor spec/user/system and native/nginx/haproxy HTTP series so both packs validate on the curated rig.Test plan
pytest tests/test_curated_packs.py -k "3831 or 1471"(18 passed)tests/test_curated_packs.py+ ruff + pin verifierscripts/run_cross_profile_corpus.py) — OKmetrics-k8s.prometheus-default,prometheus_native)live_validate --fail-on-bug: 3831 10/10 ok, 1471 13/13 ok, 0 data_gap, 0 bugsdashboards_api --fail-on-error: 10 and 13 mapped, 0 errorsgrafana-validate-uploaded: 0 runtime errors, 0 empty, 0 overlapsnative | 200/nginx | 500/haproxy | 2xx;$container=web→web-0/web-1, switch to redis →cache-0Fixes #402
Fixes #403