grafana/pkg/services/sqlstore/migrations
George Robinson ed7d29f2b9
Alerting: Migrate old alerting templates to Go templates (#62911)
* Migrate old alerting templates to use $labels

* Fix imports

* Add test coverage and separate rewriting to Go templates

* Fix lint

* Check for additional closing braces

* Add logging of invalid message templates

* Fix tests

* Small fixes

* Update comments

* Panic on empty token

* Use logtest.Fake

* Fix lint

* Allow for spaces in variable names by not tokenizing spaces

* Add template function to deduplicate Labels in a Value map

* Fix behavior of mapLookupString

* Reference deduplicated labels in migrated message template

* Fix behavior of deduplicateLabelsFunc

* Don't create variable for parent logger

* Add more tests for deduplicateLabelsFunc

* Remove unused function

* Apply suggestions from code review

Co-authored by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>

* Give label val merge function better name

* Extract template migration and escape literal tokens

* Consolidate + simplify template migration

---------

Co-authored-by: William Wernert <william.wernert@grafana.com>
2023-10-02 11:25:33 -04:00
..
accesscontrol Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
anonservice Anon: Scaffold anon service (#74744) 2023-09-25 16:25:29 +02:00
oauthserver AuthN: Embed an OAuth2 server for external service authentication (#68086) 2023-05-25 15:38:30 +02:00
ualert Alerting: Migrate old alerting templates to Go templates (#62911) 2023-10-02 11:25:33 -04:00
alert_mig.go
annotation_mig.go Chore: Fix goimports grouping in pkg/services (#62420) 2023-01-30 08:21:27 +00:00
apikey_mig.go API Keys: Add revocation for SATs (#53896) 2022-08-18 16:54:39 +02:00
cache_data_mig.go
common.go SQLStore: Add deprecation comments for breaking migrations (#49740) 2022-06-03 17:42:08 +02:00
correlations_mig.go Correlations: Allow creating correlations for provisioned data sources (#73737) 2023-09-13 15:10:09 +02:00
dashboard_acl.go Rename Acl to ACL (#52342) 2022-07-18 15:14:58 +02:00
dashboard_mig.go add isPublic to dashboard (#48012) 2022-05-17 14:11:55 -08:00
dashboard_public_mig.go PublicDashboards: Backfills share column with default value (#63407) 2023-02-27 15:54:16 -06:00
dashboard_snapshot_mig.go
dashboard_version_mig.go
datasource_mig.go SQLStore: Prevent migration_id duplicates (#47774) 2022-06-04 01:59:49 +02:00
db_file_storage.go Storage: increase size of the contents column (#69152) 2023-05-30 21:11:04 +04:00
entity_events_mig.go Search: in-memory index (#47709) 2022-04-27 12:29:39 +04:00
external_alertmanagers.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
folder_mig.go Chore: Add folder data migration, fix unique index (#72602) 2023-08-01 09:36:37 +02:00
heartbeat_mig.go
kv_store_mig.go
libraryelements.go Library elements: Add MySQL migration for increasing the column size (#63856) 2023-03-06 12:13:30 +01:00
login_attempt_mig.go
migrations_test.go Database: Make dialects independent of xorm Engine (#69955) 2023-06-14 16:13:36 -04:00
migrations.go Anon: Scaffold anon service (#74744) 2023-09-25 16:25:29 +02:00
org_mig.go Extract search users functions into a service (#39002) 2021-09-29 12:51:49 +02:00
playlist_mig.go backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609) 2022-06-14 15:32:52 -04:00
plugin_setting.go
preferences_mig.go Preferences: Create indices (#48356) 2022-11-07 15:52:26 +01:00
query_history_mig.go Migrate user_id to BIGINT (#55084) 2022-09-15 13:29:46 +02:00
query_history_star_mig.go Migrate user_id to BIGINT (#55084) 2022-09-15 13:29:46 +02:00
quota_mig.go
secrets_mig.go Encryption: Fix multiple data keys migration (#49848) 2022-06-04 12:55:49 +02:00
serverlock_migrations.go
session_mig.go
short_url_mig.go Migrate user_id to BIGINT (#55084) 2022-09-15 13:29:46 +02:00
stats_mig.go
tag_mig.go Chore: Enable whitespace linter (#25903) 2020-07-06 20:17:28 +02:00
team_mig.go add uid to team table (#66920) 2023-05-09 13:03:28 -04:00
temp_user.go Chore: Fix goimports grouping in pkg/services (#62420) 2023-01-30 08:21:27 +00:00
user_auth_mig.go OAuth: persisting the id token (#42938) 2021-12-14 15:22:10 +01:00
user_auth_token_mig.go Auth: Refactor for revoking user tokens within last hours (#74616) 2023-09-13 10:24:37 +01:00
user_mig.go Chore: Fix goimports grouping in pkg/services (#62420) 2023-01-30 08:21:27 +00:00