20 Commits

Author SHA1 Message Date
cc869e7668 Alerting: Fix active time intervals when time interval is renamed (#108534) 2025-07-23 13:08:11 -04:00
c4d3eb1cd0 Remove support for Google Spanner database. (#105846)
* Remove support for Google Spanner database.
2025-05-23 11:35:59 +02:00
c78ae5cb76 Alerting: Move alerting codegen to --grouping=group (#105068) 2025-05-08 12:59:33 +00:00
85344e30c0 Alerting: Migrate notifications API to app-platform SDK application (#104424)
* introduce alerting notification app
* move code as is and remove from old registry
* update api server registration
* update make file and remove unnecessary args, copy some useful make commands from dashboards
* update codeowners

* move constants inside module and remove dependency from grafana
* add support for selectors to the app builder
2025-04-30 10:23:56 -04:00
c174c855c3 Alerting: Update alerting cue definitions (#104053)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-04-18 15:14:52 +01:00
a5288db624 Alerting: Remove the POST endpoint for the internal Grafana Alertmanager config (#103819)
* Remove POST config for Grafana Alertmanager

* Delete auth + test for removed path

* Alerting: Remove check for `alertingApiServer` toggle in UI (#103805)

* Remove check for alertingApiServer in UI

* Update tests to no longer care about alertingApiServer

* Add contact points handlers now that we use alertingApiServer all the time

* Fix test broken from removing camelCase for UIDs

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-04-11 17:38:53 -04:00
5b5f433a26 spanner: Disable running alerting integration tests when using spanner. (#102730)
* Disable running alerting integration tests when using spanner.

* Disable tests for templategroup.
2025-03-26 10:57:55 +01:00
309a2eb4e9 Alerting: Allow administrators delete rules permanently via UI (#101974)
* add query parameter to existing APIs to control the permanent deletion of rules
* add GUID to gettable rule
* add new endpoint /ruler/grafana/api/v1/trash/rule/guid/{RuleGUID} to delete rules from trash permanently

---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-03-14 22:14:06 +02:00
7ae8058c8b Alerting: Return 404 when /api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname} does not exist (#100264)
* Return a 404 when rule group doesn't exist

* Update tests

* Update swagger doc and tests
2025-02-07 16:24:28 +00:00
cbb688e910 Zanzana: Remove usage from legacy access control (#98883)
* Zanzana: Remove usage from legacy access control

* remove unused

* remove zanzana client from services where it's not used

* remove unused metrics

* fix linter
2025-01-14 10:26:15 +01:00
3e68731600 Alerting: Enable flag alertingApiServer by default (#98282)
* enable flag alertingApiServer by default
* remove feature flag toggle in integration tests
* disable flag for old API tests
2025-01-08 14:31:35 -05:00
2d386e6704 Alerting: Migrate notification models to generated by grafnaa-app-sdk (#95430)
* create notifications module and generate models

* switch template group to app models

* switch time intervals to use app models

* switch receiver to use app models

* switch routing tree to use app models

* move schema registration to resource packages

* fix package names to match app

* fix codeowners

* fix UI to use metadata.name instead of uid

* update dockerfile

* move generated models to pkg

* remove provenance from field selector

* move client factories to test files

* rename GenericClient to TypedClient
2024-12-09 10:29:05 -05:00
00bb3215cb Alerting: Fix time-interval conversion to return bad request if payload is incorrect (#94995) 2024-10-18 13:16:03 -04:00
19a9a79467 Alerting: Publish event when one or more rules are created or changed (#93637)
* Publish event when one or more rules are changed

* Publish affected rules

* Use a fake bus to test publish event without listening

* Wire alerting store into provisioning service
2024-10-11 12:19:52 -04:00
1ea873950b Alerting: Reject receiver update in config API when FlagAlertingApiServer enabled (#93300)
* Reject receiver update in config API when FlagAlertingApiServer enabled
2024-09-17 16:49:17 +03:00
135f6571a9 Alerting: Update Time Interval service to support renaming of resources (#91856)
* add RenameTimeIntervalInNotificationSettings to storage
* update dependencies when the time interval is renamed
---------

Co-authored-by: William Wernert <william.wernert@grafana.com>
2024-08-16 20:55:03 +03:00
970cafa20f Alerting: Time interval Delete API to check for usages in alert rules (#90500)
* Check if a time interval is used in alert rules before deleting it
* Add time interval to parameters of ListAlertRulesQuery and ListNotificationSettings of DbStore

== Refacorings == 
* refactor isMuteTimeInUse to accept a single route
* update getMuteTiming to not return err
* update delete to get the mute timing from config first
2024-07-17 10:53:54 -04:00
5ae5fa3a7a Alerting: Support field selectors in time interval API (#90022)
* fix kind of TimeInterval
* register custom fields for selectors
* support field selectors in legacy storage
* support selectors in storage

===== Misc
* refactor conversions to build in one place
* hide implementation of provenance status behind accessors to use the key in selectors
* fix provenance error
2024-07-08 22:45:30 +03:00
87d86e81ce Zanzana: Evaluate permissions alongside with RBAC engine (#90064)
* Zanzana: Evaluate permissions if feature flag enabled

* Fix tests

* adjust logs

* fix spelling

* remove unused

* only evaluate implemented resources

* refactor
2024-07-05 11:31:23 +02:00
b075926202 Alerting: Time Intervals API (#88201)
* expose ngalert API to public
* add delete action to time-intervals
* introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model
* implement api server
* add feature flag alertingApiServer
---- Test Infra
* update helper to support creating custom users with enterprise permissions
* add generator for Interval model
2024-06-20 16:52:03 -04:00