Skip to content

[do not merge] dsconfig: base - #213

Open
jcolladokuri wants to merge 26 commits into
mainfrom
jck/schema
Open

[do not merge] dsconfig: base#213
jcolladokuri wants to merge 26 commits into
mainfrom
jck/schema

Conversation

@jcolladokuri

@jcolladokuri jcolladokuri commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds the datasource configuration schema for the datasource. With the schema consumers such as llm agents, provisioning agents, etc will understand the shape and meta data about the datasource configuration.

Read more at

@jcolladokuri
jcolladokuri marked this pull request as ready for review June 24, 2026 14:16
@jcolladokuri
jcolladokuri requested a review from a team as a code owner June 24, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dsconfig.json schema for the Prometheus data source and adds supporting generated schema artifacts, enabling downstream consumers (including agents) to understand/configure the datasource fields in a consistent way.

Changes:

  • Added pkg/schema/dsconfig.json plus generated schema artifacts (schema.gen.json, settings.gen.json, settings.examples.gen.json).
  • Added a Go settings model and a conformance test using github.com/grafana/dsconfig/schema.
  • Updated the frontend build to copy schema artifacts into the built plugin output, and bumped version/changelog.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
webpack.config.ts Copies dsconfig/schema artifacts into the built plugin dist/ output.
pkg/schema/dsconfig.json Adds the Prometheus dsconfig schema definition (fields/groups/relationships/instructions).
pkg/schema/schema.gen.json Adds generated “combined” schema artifact (v0alpha1).
pkg/schema/settings.gen.json Adds generated settings JSON schema artifact.
pkg/schema/settings.examples.gen.json Adds generated settings examples artifact.
pkg/schema/models/settings.go Adds Go model representing dsconfig settings fields (json tags used for conformance).
pkg/schema/dsconfig_test.go Adds dsconfig conformance test wiring + artifact generation hook.
go.mod Adds dsconfig schema dependencies and updates kube-openapi + sigs.k8s.io/yaml.
go.sum Updates sums for newly introduced/updated Go dependencies.
package.json Bumps root package version to 13.2.0.
packages/grafana-prometheus-datasource/package.json Bumps workspace package version to 13.2.0.
CHANGELOG.md Adds 13.2.0 entry describing the dsconfig schema/artifacts addition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread webpack.config.ts Outdated
Comment thread go.mod Outdated
Comment thread pkg/schema/models/settings.go Outdated
@jcolladokuri
jcolladokuri marked this pull request as draft June 24, 2026 15:07
@jcolladokuri
jcolladokuri marked this pull request as ready for review June 24, 2026 19:31
@jcolladokuri
jcolladokuri marked this pull request as draft June 24, 2026 19:34
jcolladokuri and others added 3 commits June 25, 2026 08:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yesoreyeram
yesoreyeram force-pushed the jck/schema branch 2 times, most recently from b146513 to 3af9be2 Compare July 7, 2026 04:56
@yesoreyeram yesoreyeram changed the title adds dsconfig schema dsconfig: base Jul 7, 2026
yesoreyeram
yesoreyeram previously approved these changes Jul 7, 2026
@yesoreyeram
yesoreyeram marked this pull request as ready for review July 7, 2026 05:00
yesoreyeram
yesoreyeram previously approved these changes Jul 7, 2026

@jcolladokuri jcolladokuri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few nits, I think it would be nice if we could keep consistently either _ or . for target naming.

Since most of what we have in place works with . I'd lean towards keeping it that way, but open to other ideas!

Comment thread .changeset/brave-items-scream.md
Comment thread pkg/schema/dsconfig.json
Comment thread pkg/schema/dsconfig.json Outdated
Comment thread pkg/schema/dsconfig.json Outdated
Comment thread CHANGELOG.md
Comment thread pkg/promlib/models/settings.go

@itsmylife itsmylife left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. But I asked one question. I can approve once I got the answer. Also conflicts has to be resolved.

itsmylife
itsmylife previously approved these changes Aug 6, 2026
Comment thread CHANGELOG.md
Comment thread pkg/promlib/models/settings.go Outdated
Comment thread pkg/promlib/models/settings.go Outdated
@itsmylife

Copy link
Copy Markdown
Collaborator

Also, could you please add documentation around schema, dsconfig etc? If I'd add a new settings option how I'd add that to schema, which command to run?

jcolladokuri and others added 4 commits August 6, 2026 14:40
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Signed-off-by: Jocelyn Collado-Kuri <jcolladokuri@icloud.com>
@jcolladokuri jcolladokuri changed the title dsconfig: base [do not merge] dsconfig: base Aug 10, 2026
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.

5 participants