mirror of
https://github.com/grafana/grafana.git
synced 2026-06-08 16:13:03 -04:00
* Provisioning: Generalize the job admission validator (P0.9)
validateExportResourceRefs (shared by push and migrate job options)
hard-rejected anything that wasn't a Dashboard, so job-driven flows for
any newly-supported kind failed at admission.
Validate each resource ref's kind/group against the configured
supported-resource set instead of the dashboard constants. The set is
injected into the job AdmissionValidator and threaded through ValidateJob.
When no set is configured it falls back to the dashboard-only default,
preserving legacy behavior. Disabled resources are not accepted.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Provisioning: Integration tests for config-driven job admission validation
Update the existing job-validation integration assertions for the
generalized validator: the default active set is {Folder, Dashboard}, so
Folder is now accepted for export — switch the rejection cases to kinds
that are genuinely outside the active set (declared-but-disabled Playlist
and LibraryPanel, case-mismatched "dashboard") and to the new error
messages.
Add a config-driven integration test that boots Grafana with a custom
[provisioning] resources set and asserts the validator honors it: a kind
added purely through config is accepted for push/migrate, while unknown,
disabled, and wrong-group refs are rejected at admission.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Provisioning: Drop repo dependency from config-driven job validation test
The test created a local repository whose initial sync failed under the
postgres CI runner (the worker's repo status update hit the permitted-path
check), making setup flaky. Job admission only requires a non-empty
repository name and does not check repository existence, so creating Job
objects directly through the resource client exercises the validator in
isolation without a real repository.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| advisor | ||
| alerting | ||
| annotation | ||
| collections | ||
| correlations | ||
| dashboard | ||
| dashvalidator | ||
| example | ||
| folder | ||
| iam | ||
| live | ||
| logsdrilldown | ||
| playlist | ||
| plugins | ||
| preferences | ||
| provisioning | ||
| quotas | ||
| scope | ||
| secret | ||
| shorturl | ||
| sdk.mk | ||