grafana/pkg/tests/api/alerting/test-data
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
..
hysteresis_rule.json
rule-notification-settings-1-post.json Alerting: Fix simplified routes '...' groupBy creating invalid routes (#86006) 2024-04-16 12:14:39 -04:00
rulegroup-1-export.json
rulegroup-1-get.json
rulegroup-1-post.json
rulegroup-2-export.json
rulegroup-2-get.json
rulegroup-2-post.json
rulegroup-3-export.json Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
rulegroup-3-get.json Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00
rulegroup-3-post.json Alerting: Update rule API to address folders by UID (#74600) 2024-01-17 11:07:39 +02:00