grafana/pkg/services
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
..
accesscontrol Alerting: Update fixed roles to include silences permissions (#85826) 2024-04-12 12:37:34 -04:00
annotations Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
anonymous Auth: Add IsClientEnabled and IsEnabled for the authn.Service and authn.Client interfaces (#86034) 2024-04-15 10:54:50 +02:00
apikey Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
apiserver Storage Api: Adds traces (#85391) 2024-04-16 08:30:51 -06:00
auth Session: set authID and authenticatedBy (#85806) 2024-04-11 10:25:29 +02:00
authn AuthZ: Further protect admin endpoints (#86285) 2024-04-16 15:48:12 +01:00
caching Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
cleanup Auth: Fix email verification bypass when using basic authentication (#82914) 2024-02-16 18:54:59 +01:00
cloudmigration Fixes CMS url for dev environment (#86056) 2024-04-12 14:19:38 +00:00
contexthandler Tracing: Improve HTTP request/middleware spans and standalone apiserver (#85715) 2024-04-11 13:28:23 +02:00
correlations Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
dashboardimport Add FolderUID for library elements (#83819) 2024-04-09 12:27:43 +02:00
dashboards Dashboard: Allow auto refresh option when saving a dashboard (#85581) 2024-04-11 12:31:47 +03:00
dashboardsnapshots Snapshots: Viewers can not create a Snapshot (#84952) 2024-03-22 14:31:01 -03:00
dashboardversion Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
datasourceproxy Errors: Make errors the same in dev as prod (#77366) 2023-10-30 14:06:26 -04:00
datasources Provisioning: datasources auto deletion (#83034) 2024-04-08 11:45:39 +02:00
encryption Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
extsvcauth Better tracing during extSvcAcc registration (#84719) 2024-03-21 16:41:10 +01:00
featuremgmt Expressions: sort numeric metrics behind feature toggle (#85911) 2024-04-16 10:52:47 -04:00
folder Add FolderUID for library elements (#83819) 2024-04-09 12:27:43 +02:00
gcom Cloud migrations: create endpoint to create an access token (#84690) 2024-03-25 12:43:28 -03:00
grpcserver Storage Api: Adds traces (#85391) 2024-04-16 08:30:51 -06:00
guardian Folders: Allow listing folders with write permission (#83527) 2024-03-15 14:05:27 +02:00
hooks Hooks: Remove AddLoginHook and RunLogin hooks (#73227) 2023-08-17 09:51:45 +02:00
kmsproviders Secrets: Make the Migrator extensible (#67307) 2023-06-19 23:44:01 +02:00
ldap User: Clean up update functions (#86341) 2024-04-16 16:33:50 +02:00
libraryelements Add FolderUID for library elements (#83819) 2024-04-09 12:27:43 +02:00
librarypanels Add FolderUID for library elements (#83819) 2024-04-09 12:27:43 +02:00
licensing Chore: Clean up old navigation (#66287) 2023-04-14 09:43:11 +01:00
live Grafana: Replace magic number with a constant variable in response status (#80132) 2024-02-27 18:39:51 +02:00
login User: Fix GetByID (#86282) 2024-04-16 15:24:34 +02:00
loginattempt Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
navtree Access control: Use ResolveIdentity() for authorizing in org (#85549) 2024-04-10 12:42:13 +02:00
ngalert Alerting: Fix simplified routes '...' groupBy creating invalid routes (#86006) 2024-04-16 12:14:39 -04:00
notifications Refactor: Email verification (#84393) 2024-03-14 13:25:28 +01:00
oauthtoken Fix: Refresh token when id_token is expired (#79569) 2024-02-05 16:44:25 +01:00
org Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
playlist Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
plugindashboards Chore: removing folderId from plugindashboard service (#80570) 2024-01-16 11:08:39 +01:00
pluginsintegration Plugins: Removed feature toggle pluginsDynamicAngularDetectionPatterns (#85956) 2024-04-15 10:37:28 +02:00
preference Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
provisioning Provisioning: datasources auto deletion (#83034) 2024-04-08 11:45:39 +02:00
publicdashboards Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
query Feature Flags: use FeatureToggles interface where possible (#85131) 2024-04-04 12:22:31 -04:00
queryhistory Query History: Count using SQL, not post query (#82208) 2024-02-20 07:32:40 -06:00
quota Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
rendering Feature Flags: use FeatureToggles interface where possible (#85131) 2024-04-04 12:22:31 -04:00
screenshot Remove extra defers in screenshot sevice (#84697) 2024-03-20 07:13:16 +00:00
search Add MFolderIDsServiceCount to count folderIDs in services pkg (#81237) 2024-01-25 11:10:35 +01:00
searchusers Grafana: Replace magic number with a constant variable in response status (#80132) 2024-02-27 18:39:51 +02:00
searchV2 Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
secrets Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
serviceaccounts Feature Flags: use FeatureToggles interface where possible (#85131) 2024-04-04 12:22:31 -04:00
shorturls Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
signingkeys SigningKeys: Add added_at when creating new signing key (#85060) 2024-03-25 09:58:40 +01:00
sqlstore Alerting: Update fixed roles to include silences permissions (#85826) 2024-04-12 12:37:34 -04:00
ssosettings Feature Flags: use FeatureToggles interface where possible (#85131) 2024-04-04 12:22:31 -04:00
star Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
stats Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
store Storage Api: Adds traces (#85391) 2024-04-16 08:30:51 -06:00
supportbundles Feature Flags: use FeatureToggles interface where possible (#85131) 2024-04-04 12:22:31 -04:00
tag Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
team Chore: Replace sqlstore with db interface (#85366) 2024-04-04 15:04:47 +02:00
temp_user User: email verification completion (#85259) 2024-03-28 16:05:33 +01:00
updatechecker Chore: Making versioncheck url rely on config instead of being hardcoded (#85855) 2024-04-11 12:04:53 +02:00
user User: Clean up update functions (#86341) 2024-04-16 16:33:50 +02:00
validations chore: move validations model into the validations service (#61953) 2023-01-23 15:10:14 -05:00