Skip to content

Add config validation#1769

Open
alyssajoyner wants to merge 14 commits intomainfrom
alyssa/config-validation
Open

Add config validation#1769
alyssajoyner wants to merge 14 commits intomainfrom
alyssa/config-validation

Conversation

@alyssajoyner
Copy link
Copy Markdown
Contributor

@alyssajoyner alyssajoyner commented Apr 10, 2026

Merge after: grafana/grafana#122302

Adds inline field validation to the ClickHouse v2 config editor behind the clickHouseConfigValidation feature toggle. When enabled, the following fields are validated on save and display inline errors:

  • Server address (ServerAndEncryptionSection)
  • Port (ServerAndEncryptionSection)
  • Username (DatabaseCredentialsSection)

When validation fails, Grafana's native datasource testing status banner surfaces the errors — no save reaches the backend until all required fields are filled.
Without this, an empty host/port would reach the ClickHouse backend and return a generic connection error. Inline errors give users immediate, field-level feedback before any network request is made.

Notes

  • Test this feature by setting clickHouseConfigValidation= true and newClickhouseConfigPageDesign = true
  • When clickHouseConfigValidation = false (default), behaviour is unchanged — validation is undefined, no validators register, save proceeds as before.
  • Validation only applies to the v2 config editor (newClickhouseConfigPageDesign = true).
  • Requires the companion grafana/grafana PR that wires DataSourceConfigValidationAPI into EditDataSource and passes the validation prop to plugin config editors.

@alyssajoyner alyssajoyner force-pushed the alyssa/config-validation branch from 2f1cb40 to 0204b42 Compare April 10, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

1 participant