Commit Graph

16 Commits

Author SHA1 Message Date
Yuriy Tseretyan
5fb778814c
Alerting: Update rules version when folder title is updated (#53013)
* remove support for bus from scheduler
* rename event to FolderTitleUpdated and fire only if title has changed
* add method to increase version of all rules that belong to a folder
* update ngalert service to subscribe to folder title change event call data store and update scheduler
* add tests
2022-08-01 19:28:38 -04:00
Guilherme Caulada
2d8a91a846
Secrets: Improve unified secrets migration and implement compatibility flag (#50463)
* Implement disableSecretsCompatibility flag

* Allow secret deletion right after migration

* Use dialect.Quote for secure_json_data on secret deletion

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Set secure_json_data to NULL instead of empty json

* Run toggles_gen_test and use generated flag variable

* Add ID to delete data source secrets command on function call

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Remove extra query to get datasource on secret deletion

* Fix linting issues with CHANGELOG.md

* Use empty json string when deleting secure json data

* Implement secret migration as a background process

* Refactor secret migration as a background service

* Refactor migration to be inside secret store

* Re-add secret deletion function removed on merge

* Try using transaction to fix db lock during tests

* Disable migration for pipeline debugging

* Try adding sleep to fix database lock

* Remove unecessary time sleep from migration

* Fix merge issue, replace models with datasources

* Try event listener approach

* Fix merge issue, replace models with datasources

* Fix linting issues with unchecked error

* Remove unecessary trainling new line

* Increase wait interval on background secret migration

* Rename secret store migration folder for consistency

* Convert background migration to blocking

* Fix number of arguments on server tests

* Check error value of secret migration provider

* Fix linting issue with method varaible

* Revert unintended change on background services

* Move secret migration service provider to wire.go

* Remove unecessary else from datasource service

* Move transaction inside loop on secret migration

* Remove unecessary GetServices function

* Remove unecessary interface after method removal

* Rename Run to Migrate on secret migration interface

* Rename secret migrations service variable on server

* Use MustBool on datasource secret migration

* Revert changes to GetDataSources

* Implement GetAllDataSources function

* Remove DeleteDataSourceSecrets function

* Move datasource secret migration to datasource service

* Remove unecessary properties from datasource secret migration

* Make DecryptLegacySecrets a private method

* Remove context canceled check on secret migrator

* Log error when fail to unmarshal datasource secret

* Add necessary fields to update command on migration

* Handle high availability on secret migration

* Use kvstore for datasource secret migration status

* Add error check for migration status set on kvstore

* Remove NewSecretMigrationService from server tests

* Use const for strings on datasource secrets migration

* Test all cases for datasources secret migrations

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-12 17:27:37 -03:00
Matthew Jacobson
5dee2ed24c
Alerting: Add first Grafana reserved label grafana_folder (#50262)
* Alerting: Add first Grafana reserved label g_label

g_label holds the title of the folder container the alert. The intention of this label
is to use it as part of the new default notification policy groupBy.

* Add nil check on updateRule labels map

* Disable gocyclo lint on schedule.ruleRoutine

will remove later in a separate refactoring PR to reduce complexity.

* Address doc suggestions

* Update g_folder for rules in folder when folder title changes

* Remove global bus in FolderService

* Modify tests to fit new common g_folder label

* Add changelog entry

* Fix merge conflicts

* Switch GrafanaReservedLabelPrefix from `g_` to `grafana_`
2022-06-17 13:10:49 -04:00
Stephanie Hingtgen
785072086c
Add event after datasource create (#38467)
* Add event after datasource create
2021-08-26 08:50:05 -05:00
Travis Patterson
32e11434da
Fire event after datasource delete (#38090) 2021-08-20 14:51:31 -06:00
Arve Knudsen
4dd7b7a82d
Chore: Remove unused Go code (#28852)
* Chore: Remove more unused Go code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-17 11:51:31 +01:00
Torkel Ödegaard
de0f04ec3c feat(signup): progress on new sign up and email verification flow, #2353 2015-08-28 15:14:24 +02:00
Torkel Ödegaard
24dfa55465 feat(signup): progress on new sign up and email verification flow, #2353 2015-08-28 09:24:30 +02:00
Torkel Ödegaard
d25624a8ad feat(signup): began work on new / alternate signup flow that includes email verification, #2353 2015-08-27 13:59:58 +02:00
Torkel Ödegaard
b5418c40ba fixed AMPQ -> AMQP typo 2015-06-10 14:44:42 +02:00
Torkel Ödegaard
db0c442eaf Added configuration options for smtp 2015-06-08 17:56:56 +02:00
Torkel Ödegaard
26e4809e2e Big Backend Refatoring: Renamed Account -> Org 2015-02-23 20:07:49 +01:00
woodsaj
c4fe9d50bf correctly handle event being a ptr
Events are passed in as PTRs, so we need to de-reference when getting the type and value.
2015-02-08 18:13:32 +08:00
Torkel Ödegaard
d8db5189c1 More work on events, still have to convert pascal case event type name to rabbitmq dot notation, but after that should be done 2015-02-04 17:15:05 +01:00
Torkel Ödegaard
525179eb85 Added on wire event format 2015-02-04 16:57:20 +01:00
Torkel Ödegaard
3752379106 Worked on event system, needs a little more work 2015-02-04 15:37:26 +01:00