Repository navigation
fix(grafana): name grafana_slo's required destination_datasource in the pattern (#165) - #200
Merged
Merged
Conversation
…he pattern (#165) grafana/grafana requires at least one destination_datasource block on grafana_slo; without it terraform validate fails with "Insufficient destination_datasource blocks". The golden snapshot has always carried it, so CI's validate was green, but neither terraform-patterns nor terraform-gen mentioned it, so whether a generated module validated depended on the model going beyond its instructions (the reporter saw it add the block in one run and omit it in another). - terraform-patterns: a "SLO resource" pattern with the three required blocks (query, objectives, at least one destination_datasource) and the shared prometheus_datasource_uid variable the dashboard and alert rules already use, plus the real error text. - terraform-gen: names the blocks in its Grafana instructions. - tests/hooks/grafana-slo-pattern.test.sh derives the block names from the validated golden and asserts the skill's SLO pattern contains each, so the guidance cannot fall behind the snapshot again. Wired into lint-hooks; 6 of its 7 checks fail against the previous text. Bumps to 0.8.19. Not changed: self-hosted Grafana, where grafana_slo is not available, is #167.
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
The Grafana guidance never named
grafana_slo's requireddestination_datasourceblock, so whether a generated module passedterraform validatedepended on the model going beyond its instructions. Closes #165.What changed
terraform-patterns: new "SLO resource" pattern with the three required blocks (query,objectives, at least onedestination_datasource), the sharedprometheus_datasource_uidvariable, and the real error textterraform-gen: names the blocks in its Grafana instructionstests/hooks/grafana-slo-pattern.test.shderives the block names from the validated golden and asserts the skill's SLO pattern contains each. Bumps to 0.8.19Test plan
All hook, snapshot, drift and e2e unit tests pass locally;
claude plugin validate . --strictpassesTeeth: 6 of the 7
grafana-slo-patternchecks fail against the previous textThe golden snapshot already carries
destination_datasourceand isterraform validated in CI;terraformis not installed where this was written, so I did not runvalidatemyself, and the missing-block error text is taken from the issue's reproductionSelf-hosted Grafana (no
grafana_slo) is out of scope; that is [coverage] grafana backend assumes Grafana Cloud; no self-hosted Grafana mode (grafana_slo is emitted unconditionally) #167Vendor, SDK and semantic-convention facts were verified against the source, not recalled — linked where it isn't obvious.
Nothing hardcoded that has a single source of truth (
SEMCONV_VERSION,backends.txt,hooks/otel-paths.sh).