-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC: Generate query spec #291
base: main
Are you sure you want to change the base?
Conversation
hi @ryantxu , sorry are you looking for feedback in this PR? (i assume you're not, but want to be sure 😄 ) |
@gabor Only in the context of https://docs.google.com/document/d/1la4XW9BZ5XXyU91ZjbzEPE4jvPAyusE0dfJdsrCbbPI/edit#heading=h.5sybau7waq2q. -- trying to get a feeling if this is a reasonable approach or not. Github is interesting because "options" means something different for each query type |
src/static/schema/query.schema.json
Outdated
@@ -0,0 +1,891 @@ | |||
{ | |||
"kind": "QueryTypeDefinitionList", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trying to understand this better. How this kind:QueryTypeDefinitionList
maps to queryType:Issues
in the actual payload? Am I missing any other contract here? Even if we argue queryType is not owned by the plugin but by the grafana(??), at least plugins should pass if they really use queryType and if it use, the schema should have details of all the possible query types.
"kind": "QueryTypeDefinitionList", | ||
"apiVersion": "query.grafana.app/v0alpha1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not understand everything here, but this feels a bit limited if all plugins share the same apiVersion and colliding kinds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the apiVersion defines how to read this JSON file. The apiVersion for each datasource is independent.
This is the equivalent to the apiVersion on a CRD file, not the custom resource (where the apiVersion is defined inside the CRD!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the schema for this file is the same across all data sources. If/when we need to make breaking changes to the QueryTypeDefinitionList
then the apiVersion would update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it 👍
Using grafana/grafana-plugin-sdk-go#897 to generate a query spec