Skip to content

promlib: remove experimental schema/SQL-abstraction integration - #224

Draft
kylebrandt wants to merge 1 commit into
mainfrom
kb/revert-dsabstraction
Draft

promlib: remove experimental schema/SQL-abstraction integration#224
kylebrandt wants to merge 1 commit into
mainfrom
kb/revert-dsabstraction

Conversation

@kylebrandt

@kylebrandt kylebrandt commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Winds down the experimental, feature-gated schemads-based schema discovery and SQL→PromQL transpilation/pushdown in promlib (added under the dsAbstractionApp experiment). It was never enabled by default and has no user-facing effect.

Effectively reverts

(Incidental touches to the removed files from non-abstraction PRs are also trimmed but those PRs are not reverted: #93 "decoding compressed responses" keeps its general resource.go/utils work — only its SchemaProvider additions + that one test go away; dependency bumps #69/#198 are superseded by removing the schemads dep.)

Removed

  • pkg/promlib/sql.gonormalizeGrafanaSQLRequest, FOR-clause → PromQL, wrapAggregation
  • pkg/promlib/resource/schema.goSchemaProvider (incl. per-metric metadata)
  • pkg/promlib/flatten.go — multi-frame → tabular flattening
  • schemads wiring in library.go and the TestSchemaProvider case in resource_test.go
  • github.com/grafana/schemads dependency (and its transitive deps) from both go.mod modules

Verification

  • go build ./... + go test ./... pass in both pkg/promlib and the root module
  • No residual references to any abstraction symbol; gofmt/goimports clean

Note: downstream consumers (e.g. grafana/grafana, which pins pkg/promlib) pick this up on the next promlib version bump.

Winds down the feature-gated schemads-based schema discovery and SQL->PromQL
transpilation/pushdown added under the dsAbstractionApp experiment. The code
was never enabled by default and had no user-facing effect.

Removed:
- pkg/promlib/sql.go (normalizeGrafanaSQLRequest, FOR-clause -> PromQL, wrapAggregation)
- pkg/promlib/resource/schema.go (SchemaProvider, incl. per-metric metadata)
- pkg/promlib/flatten.go (multi-frame -> tabular flattening)
- schemads wiring in library.go and the TestSchemaProvider case in resource_test.go
- github.com/grafana/schemads dependency (and its transitive deps) from both go.mod modules

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update or ping for review. Thank you for your contributions!

@github-actions github-actions Bot added the stale Issue with no recent activity label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issue with no recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants