Mustafa Sencer Özcan
4c5d9cb95f
feat: add unified storage data migration step for playlists ( #114582 )
...
* fix: add type
* feat: register step
* feat: add playlist support
* test: add test case
* fix: gen mock
* fix: go gen
* fix: lint
* fix: lint
* fix: tests
* fix: add resource
* fix: readd
* fix: address comments
* fix: independent playlist query for migrations
* fix: remove lock logic for sqlite
* fix: handle creation and update datetimes
* fix: query templating
* fix: simply resources and address comments
2025-12-04 15:15:00 +00:00
Mustafa Sencer Özcan
2f6836e78a
fix: make graceful handle default for the malformed dashboard jsons during unified migration ( #114295 )
...
* fix: graceful handling by default
* fix: make fallback the default behavior
2025-11-24 14:12:52 +01:00
Mustafa Sencer Özcan
30c04ab3fc
feat: inject unified data migrations in dual writer ( #114138 )
...
* feat: draft changes for on-prem unified migration
* feat: further draft changes for on-prem unified migration
* fix: remove some tbis
* refactor: rename
* fix: another approach
* fix: background service related issues
* fix: address comments
* fix: make gen-go
* fix: background service related issues
* feat: refactor dual writer and legacy migrator
* fix: minor issues
* feat: working version in oss
* fix: wire
* fix: revert test data override
* fix: enterprise related issues
* chore: add todo
* fix: revert dual writer method
* fix: lint
* chore: logger format
* fix: reduce log level
* fix: log change
* fix: disable
* fix: address comments
* fix: return error on dual writer service
* fix: merge conflict
---------
Co-authored-by: Rafael Paulovic <rafael.paulovic@grafana.com >
2025-11-20 16:40:20 +01:00
Peter Štibraný
7fd9ab9481
Replace check for integration tests. ( #110707 )
...
* Replace check for integration tests.
* Revert changes in pkg/tsdb/mysql packages.
* Fix formatting of few tests.
2025-09-08 15:49:49 +02:00
maicon
5270d8e53f
fix(unified-storage): remove permissions after executing on both stores ( #109722 )
...
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
Co-authored-by: Jean-Philippe Quéméner <jeanphilippe.quemener@grafana.com >
2025-08-15 15:57:42 +00:00
Mustafa Sencer Özcan
98e37f2ca9
fix: special handling of unmarshalling for invalid json dashboards ( #108519 )
...
* implement special dashboard fallback logic when dashboard data has invalid json behind feature flag
---------
Co-authored-by: Will Assis <william@williamassis.com >
2025-07-30 10:18:38 -04:00
Serge Zaitsev
a95fb3a37c
Chore: Omit integration tests if short test flag is passed ( #108777 )
...
* omit integration tests if short test flag is passed
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
* fix the rest
* false positive
---------
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com >
2025-07-28 13:38:54 +02:00
Bruno Abrantes
e5b6ab1b11
fix: do not migrate library panels to unified storage ( #108380 )
...
Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com >
2025-07-21 14:34:23 +02:00
Stephanie Hingtgen
b1d3155b60
K8s: Library Panels: Add rerouting for get ( #107362 )
2025-06-30 13:26:24 -05:00
Serge Zaitsev
f66a693438
Chore: Rename integration tests to follow the common convention ( #105987 )
...
* automatically rename integration tests to follow the common convention
* name tests differently
* alter column type to bigint
* update another column to bigint
* add another alter
* fix subquery for mysql
2025-06-29 16:56:24 +02:00
Mustafa Sencer Özcan
c47fc53eee
fix: set withHistory flag to true for non-interactive mode ( #107263 )
2025-06-26 16:08:30 +00:00
Mustafa Sencer Özcan
e7af803906
fix: migration cli exit on grpc errors when on non-interactive ( #107163 )
2025-06-25 08:50:53 +02:00
Mustafa Sencer Özcan
74ce09011e
fix: migration cli pass in feature toggle management into unified client ( #107141 )
2025-06-24 21:43:43 +02:00
Mustafa Sencer Özcan
3a13c2db64
chore: add logging around migration cli ( #107046 )
2025-06-20 15:20:06 +00:00
maicon
fcb369e9a3
Unistore/datamigration: Take namespace from command line flag ( #106724 )
...
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
2025-06-15 19:45:42 +00:00
Stephanie Hingtgen
feeced9618
K8s: Dashboards /apis: Fix library element connections ( #106734 )
2025-06-13 21:40:39 +02:00
Jean-Philippe Quéméner
002f46736a
refactor(unified-storage): move generated protos to own pkg ( #105356 )
2025-05-15 21:36:52 +02:00
Ryan McKinley
b09d79b21c
K8s/Dashboard: Promote from alpha1 to beta1 ( #104009 )
2025-04-23 20:54:35 +03:00
Ryan McKinley
0283c98e30
K8s/Folders: Use v1beta1 and app-sdk based spec ( #103975 )
2025-04-14 23:20:10 +03:00
Stephanie Hingtgen
f5ad1ef69b
K8s: Folders: Add v1 api ( #103842 )
2025-04-11 13:09:52 +01:00
maicon
fa7ea6ee00
UniStore: Add non interactive mode for CLI migration ( #103407 )
...
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
2025-04-07 17:23:47 -03:00
Stephanie Hingtgen
4918d8720c
Dashboard Restore: Remove experimental functionality under feature flag dashboardRestore for now - this will be reworked ( #103204 )
2025-04-03 02:52:54 -05:00
Stephanie Hingtgen
7c2890384a
K8s: Dashboards: Set v1alpha1 as priority ( #102729 )
2025-03-25 10:32:49 -06:00
Will Assis
31a371e385
fix(unified-storage): remove bleve index metric from global scope ( #101825 )
...
* refactor grafana_index_server_index_size to calculate in a goroutine instead of at scrape time and remove grafana_index_server_indexed_docs metric
* use wire to inject bleve index metrics
* remove sprinkles metrics from bleve index metrics
* log error when trying to calculate file index size and bump interval to 1m instead of 5s
2025-03-13 10:09:38 -04:00
Igor Suleymanov
5d2ba10113
K8s/Dashboards: Extract Dashboard APIs to an app submodule ( #102029 )
...
* Move dashboard k8s APIs to a separate app
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com >
* Copy dashboard code in Dockerfile
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com >
* Fix conversion generation
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com >
* Update OpenAPI snapshot for dashboard/v0alpha1
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com >
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com >
2025-03-13 11:05:01 +02:00
Ryan McKinley
c1b48cc488
Dashboards: Add apiVersion to dashboard table ( #100845 )
2025-03-04 07:47:45 +03:00
Will Assis
f5e5824bab
fix (unified-storage): stop registering unified storage metrics in global state ( #101322 )
...
* move prometheus.register for unified storage metrics into metrics.go and do most of the plumbing to get it to work
* convert StorageApiMetrics to pointer and check for nil before using it
* rename type and variables to something more sensible
---------
Co-authored-by: Jean-Philippe Quéméner <jeanphilippe.quemener@grafana.com >
2025-02-28 07:39:39 -05:00
Ryan McKinley
806c043e45
UnifiedStorage: Rename Batch processing to Bulk ( #101413 )
2025-02-28 08:41:08 +03:00
Stephanie Hingtgen
67be9aeed6
K8s: Search fallback: Support all sort by methods ( #100776 )
2025-02-18 12:30:11 -06:00
Georges Chaudy
9d68c4f665
unified: allow customising the ProvideUnifiedStorageClient ( #100704 )
...
* unified: allow customising the ProvideUnifiedStorageClient
* fix go mod
2025-02-14 11:26:51 +01:00
Ryan McKinley
a5355fd66c
Storage: Add command line tool to migrate legacy dashboards (and folders) to unified storage ( #99199 )
2025-02-11 19:57:46 +02:00
Dan Cech
790e1feb93
Chore: Update test database initialization ( #81673 )
...
* streamline initialization of test databases, support on-disk sqlite test db
* clean up test databases
* introduce testsuite helper
* use testsuite everywhere we use a test db
* update documentation
* improve error handling
* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Marcus Efraimsson
6768c6c059
Chore: Remove public vars in setting package ( #81018 )
...
Removes the public variable setting.SecretKey plus some other ones.
Introduces some new functions for creating setting.Cfg.
2024-01-23 12:36:22 +01:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
idafurjes
23c27cffb3
Chore: Rename Id to ID in alerting models ( #62777 )
...
* Chore: Rename Id to ID in alerting models
* Add xorm tags for datasource
* Add xorm tag for uid
2023-02-02 17:22:43 +01:00
Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )
...
* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
Sofia Papagiannaki
8b77ee2734
SQLStore: Ensure that sessions are always closed ( #55864 )
...
* SQLStore: Ensure that sessions are always closed
Delete `NewSession()` in favour of `WithDbSession()`
* Add WithDbSessionForceNewSession to the interface
* Apply suggestions from code review
2022-09-29 15:55:47 +03:00
Kristin Laemmert
945f015770
backend/datasources: move datasources models into the datasources service package ( #51267 )
...
* backend/datasources: move datasources models into the datasources service pkg
2022-06-27 12:23:15 -04:00
Kat Yang
31630edf0c
Chore: Remove Wrapf ( #50128 )
...
* Chore: Remove Wrapf
* Remove all Wrapf refs
* Remove last Wrapf ref
* Fix lint errors
* Remove Wrap and Wrapf definitions
* Remove unnecessary colon
2022-06-06 22:30:31 +02:00
Kat Yang
3c3039f5b3
Chore: Remove Wrap ( #50048 )
...
* Chore: Remove Wrap and Wrapf
* Fix: Add error check
2022-06-03 09:24:24 +02:00
Joan López de la Franca Beltran
722c414fef
Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions ( #38865 )
...
* Encryption: Add support to encrypt/decrypt sjd
* Add datasources.Service as a proxy to datasources db operations
* Encrypt ds.SecureJsonData before calling SQLStore
* Move ds cache code into ds service
* Fix tlsmanager tests
* Fix pluginproxy tests
* Remove some securejsondata.GetEncryptedJsonData usages
* Add pluginsettings.Service as a proxy for plugin settings db operations
* Add AlertNotificationService as a proxy for alert notification db operations
* Remove some securejsondata.GetEncryptedJsonData usages
* Remove more securejsondata.GetEncryptedJsonData usages
* Fix lint errors
* Minor fixes
* Remove encryption global functions usages from ngalert
* Fix lint errors
* Minor fixes
* Minor fixes
* Remove securejsondata.DecryptedValue usage
* Refactor the refactor
* Remove securejsondata.DecryptedValue usage
* Move securejsondata to migrations package
* Move securejsondata to migrations package
* Minor fix
* Fix integration test
* Fix integration tests
* Undo undesired changes
* Fix tests
* Add context.Context into encryption methods
* Fix tests
* Fix tests
* Fix tests
* Trigger CI
* Fix test
* Add names to params of encryption service interface
* Remove bus from CacheServiceImpl
* Add logging
* Add keys to logger
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com >
* Add missing key to logger
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com >
* Undo changes in markdown files
* Fix formatting
* Add context to secrets service
* Rename decryptSecureJsonData to decryptSecureJsonDataFn
* Name args in GetDecryptedValueFn
* Add template back to NewAlertmanagerNotifier
* Copy GetDecryptedValueFn to ngalert
* Add logging to pluginsettings
* Fix pluginsettings test
Co-authored-by: Tania B <yalyna.ts@gmail.com >
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com >
2021-10-07 17:33:50 +03:00
Carl Bergquist
a10fa5cad3
Instrumentation: Start tracing database requests ( #34572 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com >
2021-05-27 13:55:33 +02:00
Arve Knudsen
b5379c5335
Chore: Fix SQL related Go variable naming ( #28887 )
...
* Chore: Fix variable naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2020-11-11 06:21:08 +01:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues ( #27704 )
...
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2020-09-22 16:22:19 +02:00
Arve Knudsen
07582a8e85
Chore: Fix various spelling errors in back-end code ( #25241 )
...
* Chore: Fix various spelling errors in back-end code
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >>
2020-06-01 17:11:25 +02:00
Mario Trangoni
5116420e9a
Fix misspell issues ( #23905 )
...
* Fix misspell issues
See,
$ golangci-lint run --timeout 10m --disable-all -E misspell ./...
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com >
* Fix codespell issues
See,
$ codespell -S './.git*' -L 'uint,thru,pres,unknwon,serie,referer,uptodate,durationm'
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com >
* ci please?
* non-empty commit - ci?
* Trigger build
Co-authored-by: bergquist <carl.bergquist@gmail.com >
Co-authored-by: Kyle Brandt <kyle@grafana.com >
2020-04-29 21:37:21 +02:00
Andrej Ocenas
e5dd7efdee
Provisioning: Allows specifying uid for datasource and use that in derived fields ( #23585 )
...
* Add uid to datasource
* Fix uid passing when provisioning
* Better error handling and Uid column type change
* Fix test and strict null error counts
* Add backend tests
* Add tests
* Fix strict null checks
* Update test
* Improve tests
* Update pkg/services/sqlstore/datasource.go
Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com >
* Variable rename
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2020-04-20 15:48:38 +02:00
Arve Knudsen
eb98d9c15b
grafana-cli: Upgrade to urfave/cli v2 ( #22402 )
...
* grafana-cli: Upgrade to urfave/cli v2
2020-02-26 12:27:31 +01:00
Marcus Efraimsson
6a3a2f5f94
CLI: Fix encrypt-datasource-passwords fails with sql error ( #18014 )
...
Now handles secure_json_data stored as null in database when
running the encrypt-datasource-passwords migration.
Fixes #17948
2019-07-10 12:28:40 +02:00
Andrej Ocenas
151b24b95f
CLI: Add command to migrate all datasources to use encrypted password fields ( #17118 )
...
closes : #17107
2019-05-27 10:47:21 +02:00