Skip to content

feat: gate main on a real Grafana Cloud consistency check#25

Merged
terchris merged 1 commit into
mainfrom
feat/grafana-cloud-consistency-ci
Jul 14, 2026
Merged

feat: gate main on a real Grafana Cloud consistency check#25
terchris merged 1 commit into
mainfrom
feat/grafana-cloud-consistency-ci

Conversation

@terchris

Copy link
Copy Markdown
Contributor

Summary

  • New grafana-cloud-consistency CI job: write to a local file (ground truth), validate it, read back from Loki/Prometheus/Tempo, diff each response against the file field-by-field. This is what would have caught the recent uuid ESM-crash regression before it shipped — a build/lint pass alone didn't.
  • Two-stage: sovdev-selftest first (fail fast, same tool a real customer runs), then the full E2E consistency check only if that passes.
  • Uses dedicated sovdev-ci-ingest/sovdev-ci-verify credentials, LBAC-scoped to sovdev-ci-company-lookup* only — separate from personal dev keys or any customer's.
  • New tools/validation/grafana-cloud/full-consistency-check.sh orchestrates the existing (but never unified) query-*.ts --compare-with tooling into one command, usable both locally and in CI via --env-file.
  • Adds tools/validation/grafana-cloud/README.md (didn't exist before) and documents the CI key setup in contributor/testing/grafana-cloud.md.

Test plan

  • Verified full-consistency-check.sh locally end-to-end against real Grafana Cloud data, using the actual CI credentials (not just personal dev keys) — Loki 17/17, Prometheus 5/5, Tempo 4/4 (after Tempo's expected indexing delay)
  • Verified sovdev-selftest --backend grafana-cloud locally with the same CI credentials — all 4 checks pass
  • YAML syntax validated
  • This PR itself is the first real test of the actual GitHub Actions wiring — watching the grafana-cloud-consistency job run for real before merging

🤖 Generated with Claude Code

…uild/lint

Adds the exact verification flow this project's maintainer used by hand:
write to a local file first (ground truth), validate the file, then read
back from Loki/Prometheus/Tempo and diff each response against that file
field-by-field. A tool's own "found it" report was never sufficient proof
by itself -- this is what would have caught the recent uuid ESM-crash
regression before it shipped.

- tools/validation/grafana-cloud/full-consistency-check.sh: orchestrates
  the existing (but never unified) query-*.ts --compare-with tooling into
  one command. Accepts --env-file so it works identically for local dev
  and CI. Includes retry/backoff around the Tempo check specifically --
  its search index measurably lags Loki/Prometheus, confirmed empirically.
- .github/workflows/ci.yml: new grafana-cloud-consistency job, required
  for the CI summary to pass. Two-stage: sovdev-selftest first (the exact
  tool a real customer runs, fails fast before the slower full E2E test),
  then the full consistency check. Uses dedicated sovdev-ci-ingest/
  sovdev-ci-verify credentials (LBAC-scoped to sovdev-ci-company-lookup*
  only) -- entirely separate from personal dev keys or any customer's.
- tools/validation/grafana-cloud/README.md: didn't exist before, documents
  the whole tools/validation/grafana-cloud/ directory.
- contributor/testing/grafana-cloud.md: documents the CI key setup,
  including a real gotcha hit while creating them -- the Label selectors
  section is collapsed by default and doesn't appear until scopes are
  checked, and label selectors only apply to logs/metrics reads, never
  traces.

Verified locally end-to-end with the actual CI credentials before trusting
them in the workflow -- both sovdev-selftest and the full consistency
check pass cleanly against real Grafana Cloud data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@terchris
terchris merged commit 5b7d432 into main Jul 14, 2026
5 checks passed
@terchris
terchris deleted the feat/grafana-cloud-consistency-ci branch July 14, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant