fix(test): stop reusing the reserved "percentage" axis-label alias as incidental sample data - #368
Merged
shmsr merged 1 commit intoAug 19, 2026
Conversation
… incidental sample data A same-day commit (4cb7726) reserved the literal axis-label text "percentage" as an opaque Grafana-unit-id alias whose title is intentionally suppressed (so unit-inferred titles like "%" can take over instead) and added a correct, dedicated test for that behavior. It didn't touch this unrelated, pre-existing test, which happened to reuse the same literal string purely as incidental sample text for testing something else entirely (that bar charts keep axis config while omitting line/area-only appearance keys) -- breaking it on main and therefore on every open PR whose CI merges against main. Swap the incidental fixture text for an ordinary, non-reserved label so the test again exercises its own actual intent without colliding with the new opaque-alias behavior.
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
main's Pytest CI is currently red (see e.g. #362 and #363, both failingPytest (3.11/3.12/3.13)even though their own diffs are unrelated) because of a test-data collision from an already-merged same-day commit, not a new bug in any open PR.4cb7726 (merged as part of #361) reserved the literal axis-label text
"percentage"as an opaque Grafana-unit-id alias in_OPAQUE_AXIS_TITLE_ALIASES(observability_migration/targets/kibana/emit/display.py) — its title is now intentionally suppressed so a unit-inferred title like"%"can take over downstream instead of a redundant literal string. That commit added a correct, dedicated regression test for exactly this (test_extract_axis_label_suppresses_grafana_unit_id_aliases).It did not touch a different, pre-existing, unrelated test —
test_extract_xy_appearance_omits_line_area_style_for_bar— which happened to reuse the same literal string"percentage"purely as incidental sample text for testing something else entirely (that bar charts keep their axis config while correctly omitting line/area-only appearance keys likeline_style/fill_opacity). That test started failing the moment the alias reservation landed, breakingmain's own CI and, transitively, every open PR's CI (since PR checks run against a merge of the PR branch with currentmain).Fix
Swap the incidental fixture text in
test_extract_xy_appearance_omits_line_area_style_for_barfor an ordinary, non-reserved axis label ("CPU usage"), so it again exercises its own actual intent (bar-vs-area appearance keys) without colliding with the new opaque-alias behavior. No production code changes — confirmed viagit grepthat this was the only other test using"percentage"/"percent"as anaxisLabelvalue.Test plan
make test— 5776 passed, 3 skipped (was failing before this fix, confirmed by reproducing the exact CI failure locally onmain)make lint— cleanmake typecheck— clean