grafana/pkg/services/ngalert/api
Alexander Weaver cc8c1380e2
Alerting: Persist annotations from multidimensional rules in batches (#56575)
* Reduce piecemeal state fields

* Read data directly off state instead of rule

* Unify state and context into single struct

* Expose contextual information to layer above setNextState

* Work in terms of ContextualState and call historian in batches

* Call annotations service in batches

* Export format state and reason and remove workaround in unrelated test package

* Add new method to annotation service for batch inserting

* Fix loop variable aliasing bug caught by linter, didn't change behavior

* Incl timerange on annotation tests

* Insert one at a time if tags are present

* Point to rule from ContextualState rather than copy fields

* Build annotations and copy data prior to starting goroutine

* Rename to StateTransition

* Use new bulk-insert utility

* Remove rule from StateTransition and pass in directly to historian

* Simplify annotations logic since we have only one rule

* Fix logs and context, nilcheck, simplify method name

* Regenerate mock
2022-11-04 10:39:26 -05:00
..
test-data Alerting: Modify endpoint for testing a datasource rule using the UID (#48070) 2022-05-17 14:10:20 +03:00
tooling Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
api_alertmanager_guards_test.go Alerting: Add provenance guard to config api (#50147) 2022-06-04 14:55:46 +02:00
api_alertmanager_guards.go Alerting: Add provenance guard to config api (#50147) 2022-06-04 14:55:46 +02:00
api_alertmanager_test.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
api_alertmanager.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
api_configuration_test.go Move SignedInUser to user service and RoleType and Roles to org (#53445) 2022-08-10 11:56:48 +02:00
api_configuration.go Find-and-replace 'err' logs to 'error' to match log search conventions (#57309) 2022-10-19 17:36:54 -04:00
api_prometheus_test_fixtures.go Alerting: Display query from grafana-managed alert rules on /api/v1/rules (#45969) 2022-03-14 10:39:20 +00:00
api_prometheus_test.go Alerting: Move fake rule store to the test utilities package (#56062) 2022-09-30 14:36:51 -05:00
api_prometheus.go Alerting: Persist annotations from multidimensional rules in batches (#56575) 2022-11-04 10:39:26 -05:00
api_provisioning_test.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
api_provisioning.go Alerting: Fix response is not returned for invalid Duration in Provisioning API (#58046) 2022-11-02 08:21:23 -04:00
api_ruler_test.go Alerting: Move fake rule store to the test utilities package (#56062) 2022-09-30 14:36:51 -05:00
api_ruler_validation_test.go Rename Acl to ACL (#52342) 2022-07-18 15:14:58 +02:00
api_ruler_validation.go Alerting: Refactor rule interval validation to be reusable (#57792) 2022-10-28 14:40:11 +00:00
api_ruler.go Alerting: Add traceability headers for alert queries (#57127) 2022-10-19 14:19:43 -05:00
api_testing_test.go Alerting: Condition evaluator with cached pipeline (#57479) 2022-11-02 10:13:39 -04:00
api_testing.go Alerting: Condition evaluator with cached pipeline (#57479) 2022-11-02 10:13:39 -04:00
api.go Alerting: Condition evaluator with cached pipeline (#57479) 2022-11-02 10:13:39 -04:00
authorization_test.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
authorization.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
configuration.go Alerting: New API endpoint GET /api/v1/ngalert (#55134) 2022-09-14 14:03:10 -04:00
errors.go Alerting: Update forking request handlers to use the same errors (#52965) 2022-08-02 09:33:59 -04:00
forking_alertmanager.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
forking_prometheus.go Alerting: Update forking request handlers to use the same errors (#52965) 2022-08-02 09:33:59 -04:00
forking_ruler.go Alerting: Update forking request handlers to use the same errors (#52965) 2022-08-02 09:33:59 -04:00
generated_base_api_alertmanager.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
generated_base_api_configuration.go Alerting: New API endpoint GET /api/v1/ngalert (#55134) 2022-09-14 14:03:10 -04:00
generated_base_api_prometheus.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_provisioning.go Alerting: Extend PUT rule-group route to write the entire rule group rather than top-level fields only (#53078) 2022-08-10 12:33:41 -05:00
generated_base_api_ruler.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_testing.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
lotex_am.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00
lotex_prom.go Alerting: modify prometheus endpoints for proxying using the datasource UID (#48052) 2022-05-06 15:05:02 -04:00
lotex_ruler_test.go Move SignedInUser to user service and RoleType and Roles to org (#53445) 2022-08-10 11:56:48 +02:00
lotex_ruler.go Alerting: Fix feedback (#57922) 2022-11-02 22:36:14 +00:00
persist.go Alerting: Move stray model structs in store package to model package (#55968) 2022-09-29 15:47:56 -05:00
promql_compat_test.go Alerting/testing promql extraction (#34665) 2021-05-25 11:54:50 -04:00
promql_compat.go Alerting: check upstream response content type in lotex proxy (#34760) 2021-05-27 14:12:29 +03:00
provisioning.go Alerting: Extend PUT rule-group route to write the entire rule group rather than top-level fields only (#53078) 2022-08-10 12:33:41 -05:00
testing_api.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
testing.go Alerting: Remove mis-behaving fake and fix masked test failure in AM config API (#47747) 2022-04-13 19:31:57 -05:00
util_test.go Alerting: Update rules delete endpoint to handle rules in group (#53790) 2022-08-24 15:33:33 -04:00
util.go Alerting: Fix "Not Implemented" responses (#57710) 2022-10-26 23:35:52 -03:00