grafana/pkg/tests/api
Matthew Jacobson 533bed6d94
Alerting: Fix simplified routes '...' groupBy creating invalid routes (#86006)
* Alerting: Fix simplified routes '...' groupBy creating invalid routes

There were a few ways to go about this fix:
1. Modifying our copy of upstream validation to allow this
2. Modify our notification settings validation to prevent this
3. Normalize group by on save
4. Normalized group by on generate

Option 4. was chosen as the others have a mix of the following cons:
- Generated routes risk being incompatible with upstream/remote AM
- Awkward FE UX when using '...'
- Rule definition changing after save and potential pitfalls with TF

With option 4. generated routes stay compatible with external/remote AMs, FE
doesn't need to change as we allow mixed '...' and custom label groupBys, and
settings we save to db are the same ones requested.

In addition, it has the slight benefit of allowing us to hide the internal
implementation details of `alertname, grafana_folder` from the user in the
future, since we don't need to send them with every FE or TF request.

* Safer use of DefaultNotificationSettingsGroupBy

* Fix missed API tests
2024-04-16 12:14:39 -04:00
..
alerting Alerting: Fix simplified routes '...' groupBy creating invalid routes (#86006) 2024-04-16 12:14:39 -04:00
azuremonitor Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
correlations Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
dashboards Storage: Watch tests (#85496) 2024-04-08 11:42:12 -04:00
elasticsearch Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
folders Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
graphite Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
influxdb Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
loki Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
metrics remove flaky cloudwatch test (#45800) 2022-02-23 13:59:53 -06:00
opentdsb Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
plugins mysql additional decoupling steps (#86168) 2024-04-16 11:50:41 +02:00
prometheus Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
stats Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00