Skip to content
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

Remove redundant prefixes from fields in PanelCfg schema interface #6

Closed
2 of 3 tasks
sdboyer opened this issue Mar 23, 2023 · 2 comments · Fixed by #7
Closed
2 of 3 tasks

Remove redundant prefixes from fields in PanelCfg schema interface #6

sdboyer opened this issue Mar 23, 2023 · 2 comments · Fixed by #7
Assignees
Labels
enhancement New feature or request

Comments

@sdboyer
Copy link
Contributor

sdboyer commented Mar 23, 2023

This is the current PanelCfg schema interface contract that all PanelCfg composable kinds must follow:

interface: {
// Defines plugin-specific options for a panel that should be persisted. Required,
// though a panel without any options may specify an empty struct.
//
// Currently mapped to #Panel.options within the dashboard schema.
PanelOptions: {}
// Plugin-specific custom field properties. Optional.
//
// Currently mapped to #Panel.fieldConfig.defaults.custom within the dashboard schema.
PanelFieldConfig?: {}
}

Having the Panel prefix is redundant. Options and FieldConfig would be perfectly sufficient.

The change here is simple enough while we're effectively in pre-launch mode:

  • All panel implementations in grafana/grafana will need to be updated
  • Names of generated types within panel plugins will need to be updated as well
  • Grok will need to be regenerated.

Sooner we do this one, the better, because it's a wildly breaking change 😄

@sdboyer sdboyer added the enhancement New feature or request label Mar 23, 2023
@sdboyer sdboyer changed the title Remove redundant prefixes from PanelCfg schema interface Remove redundant prefixes from fields in PanelCfg schema interface Mar 23, 2023
@sdboyer sdboyer assigned undef1nd and unassigned sdboyer May 9, 2023
@undef1nd
Copy link
Contributor

Requires the following PRs to be merged:

@sdboyer
Copy link
Contributor Author

sdboyer commented May 16, 2023

Whoops, in skirting around the lineage flattening PR, i had to modify ordering of these merges. grafana is now on an off-main commit for kindsys, and will have to stay there until we fix grafana/grafana#68034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants