Repository navigation
fix(observability): pin the Grafana datasource uid - #54
Merged
PhilippTheServer merged 1 commit intoAug 26, 2026
Merged
PhilippTheServer merged 1 commit into
PhilippTheServer merged 1 commit into
Conversation
Every panel on the provisioned dashboard rendered "No data" while Grafana logged nothing wrong. The datasource file declared no uid, so Grafana generated a random one on first provision. Every panel references the fixed string "prometheus", which therefore resolved to a datasource that does not exist. The dashboard and the datasource come from separate files and that string is the only thing tying them together. The failure mode is the problem: both files provision successfully, the log says so, and eleven empty panels look exactly like a shop with no traffic. It slipped through verification because that verification ran each panel's PromQL against Prometheus directly. Querying the datastore cannot see a broken datasource reference — only a query through Grafana can, and re-checking that way now shows all eleven panels returning data. Adds static checks over the provisioning files: that a datasource declares a uid, that every panel points at one that is actually provisioned, and that no panel ships without a query. They need no running stack, and both fail against the state that shipped. Closes #53 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY1ekLLeFLkAU2kvdQ8Ey4
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.
Closes #53
Every panel on the dashboard rendered "No data" while Grafana logged nothing wrong.
The datasource file declared no
uid, so Grafana generated a random one(
PBFA97CFB590B2093here). Every panel references the fixed string"prometheus", whichresolved to a datasource that does not exist.
The dashboard and the datasource are provisioned from separate files, and that string is the
only thing tying them together. Nothing checked they agree.
Why this one is nasty
Both files provision successfully. The log says
finished to provision dashboards. Theresult — eleven empty panels — looks exactly like a shop with no traffic. Nothing anywhere
says "that datasource doesn't exist".
Why my verification missed it
I ran each panel's PromQL against Prometheus directly and reported 11/11 returning data.
That was true and irrelevant: querying the datastore cannot see a broken datasource
reference. Only a query through Grafana can.
Re-checked properly, through
/api/ds/query— the request a panel actually makes:The check
tests/test_grafana_provisioning.py— static, no running stack needed. Asserts a datasourcedeclares a uid, that every panel points at one that is actually provisioned, that dashboards
carry a stable uid and title, and that no panel ships without a query.
Against the state that shipped:
After the fix:
5 passed.