283 Commits

Author SHA1 Message Date
53ec379af8 unistore: add metadata store (#107151)
* Add datastore

* too many slashes

* lint

* add metadata store

* simplify meta

* Add datastore

* too many slashes

* lint

* pr comments

* extract ParseKey

* readcloser

* remove get prefix

* use dedicated keys

* parsekey

* sameresource

* unrelated

* name

* renmae tests

* fix tests

* lint

* allow empty ns

* get keys instead of list

* rename the functions

* refactor yield candidate
2025-06-27 08:25:27 +00:00
8a05378ef3 apiserver/folders: use exact match on GetFolderByTitle in legacy (#106867)
* apiserver/folders: use exact match on GetFolderByTitle in legacy

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>


---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-06-24 17:42:08 -03:00
4ac248a512 Internationalisation: Mark up panel plugins for translations (#106068)
* config for panel plugin translations

* markup

* tweaks

* prettier

* use data-testid

* rename disable rule now it's been moved

* final markup
2025-05-29 18:13:25 +01:00
5303a1cc7e Org: Fix org deletion (#106193) 2025-05-29 09:40:06 +03:00
c4d3eb1cd0 Remove support for Google Spanner database. (#105846)
* Remove support for Google Spanner database.
2025-05-23 11:35:59 +02:00
f70edbb6f2 fix(unified-storage): bump unified storage folder list limit (#105685) 2025-05-20 17:29:31 +02:00
91882cf50e chore(unified-storage): add tracing for unified storage folder implementation (#105601) 2025-05-19 23:25:08 +03:00
feaaf96269 RBAC: Remove folder guardians part 2 (#104645)
* replace usage of folder guardians with access control evaluators

* remove NewByFolderUID guardian

* bring up to date

* fix test

* more test fixes, and don't fetch the folder before evaluating lib element access

* change what error is returned

* fix alerting test

* try to fix linter errors

* replace the use of newByFolder guardian with direct access control evaluator checks

* remove newByFolder guardian

* remove unintentional changes

* remove unintentional changes

* undo unwanted change
2025-05-17 00:25:07 +03:00
002f46736a refactor(unified-storage): move generated protos to own pkg (#105356) 2025-05-15 21:36:52 +02:00
167b201525 fix(unified-storage): add pagination support for folder list (#105444) 2025-05-15 18:43:44 +02:00
6f1382a0c8 RBAC: Remove folder guardians part 1 (#104449)
* replace usage of folder guardians with access control evaluators

* remove NewByFolderUID guardian

* bring up to date

* fix test

* more test fixes, and don't fetch the folder before evaluating lib element access

* change what error is returned

* fix alerting test

* try to fix linter errors

* we don't assign general folder write permissions, reverting to the previous logic for general folders
2025-05-15 17:55:19 +03:00
a776556ae8 feat(unified-storage): build full path internally when getting folders (#105316) 2025-05-15 15:14:59 +03:00
dc63f8003c fix(unified-storage): make full path setting optional on get folders (#104757) 2025-05-06 16:20:49 +02:00
f5fd7a15b6 K8s: GetFolders to return default limit (#104976) 2025-05-06 08:09:18 +03:00
9edf2f6356 Folders and Dashboards: Version check fixes (#104663)
Folders: Fix version mismatch errors
2025-04-30 03:04:30 +03:00
9968576acf Folders & Dashboards: Cleanup timestamps and error codes (#104665)
K8s: Fix timestamps and error codes
2025-04-30 03:03:21 +03:00
72ea92f275 Provisioning: Remove warnings for valid usage (#104555) 2025-04-25 16:50:47 +01:00
e385237daf Access control: Make sure that user permission cache is cleared after new dashboard and folder creation (#104193)
* make sure that user permission cache is cleared after new dashboard and folder creation

* more test fixes

* Update pkg/services/dashboards/service/dashboard_service.go

* check identity type in SetDefaultPermissionsAfterCreate, set default permissions for service accounts

* set SA permissions for folders as well

* fix tests
2025-04-24 16:02:39 +03:00
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03:00
95f04c79cd Dashboards: Add Dashboard Schema validation (1) (#103662) 2025-04-11 16:52:46 +00:00
f5ad1ef69b K8s: Folders: Add v1 api (#103842) 2025-04-11 13:09:52 +01:00
757be6365a CI: Bump golangci-lint to 2.0.2 (#103572) 2025-04-10 14:42:23 +02:00
af8a70bbab K8s/Permissions: Enable a grant-permissions annotation action to set default permissions (#102527)
* create permissions

* add key

* lint

* structure as a delayed callback

* legacy API hook

* merge main

* wired up

* and folders

* watch repos

* missing return statement

* Set the correct permissions

* add TestAfterCreatePermissionCreator

* do not add perms on folder create

* fix tests

* add annotation on create

* lint

* lint

* ensure we set permissions when the FT is disabled

* remove custom folder_storage

* fix lint

* change default

* lint

* lint

* fix: annotation

* ensure permissions are added on folder legacy

* remove folderstorage again

* fix tests

* add FT

* undo change to folder

* dashboard on create

* remove annotation for folder

* fix tests

* fix prepare after rebase

* fix tests

* fix tests

* fix tests

* lint

* address comments

* add test for prepareObjectForStorage

* add again skipIfMode as per comment

---------

Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
2025-04-09 13:05:37 +02:00
f4ae8516bd chore(folders): add extended tracing to the folders service (#103007) 2025-04-03 11:54:47 +02:00
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
08042ae827 search: add legacy id for all resources in bleve (#103206)
* add legacy id for all resources in bleve
2025-04-02 08:20:23 -04:00
d8c5c2d3b8 K8s: Folders: Modify GetChildren to return only Folder References (#103072)
* Return FolderReference instead of Folder on GetChildren

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-04-02 01:30:17 -03:00
5535447587 Folders: Change query to an inner join on dashboards rather than 2 gets (#103183) 2025-04-01 21:21:58 +03:00
15c5b45724 dashboards: remove unused function from dashboard service (#103104)
remove unused function from dashboard service
2025-03-31 13:54:38 -04:00
f84654d162 Stats: Optimize getting folder stats (#103033) 2025-03-28 20:17:50 -05:00
b67b9e3c5e K8s: Folders: Reduce db calls with /api/folders (#103058) 2025-03-28 18:13:08 -05:00
5fa9f2b425 K8s: Folders: Remove unneeded parent calls (#103036) 2025-03-28 07:36:47 -04:00
51825cfffe unified-storage: Reduce calls to the user service (#102934)
* Create ListByIdOrUID in user service

* create UnstructuredToLegacyFolderList 

* update GetFolders to use list parser

* update GetDescendants to use list parser

* update UnstructuredToLegacyFolder to also make a single call to the user service

---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-03-27 22:01:07 +02:00
d0d7078953 App Platform: Remove mutable globals (#102962)
* App Platform: Remove mutable globals

* chore: clarify why this exists

* fix: support multi-tenant mode

* refactor: call builder providers directly

* CI: Force re-build
2025-03-27 15:46:09 +01:00
0087d7bd58 Unistore: Skip label for getting full path (#102928) 2025-03-26 15:50:53 -05:00
0ce28c8dd8 K8s: Reduce folder get calls in modes 0-2 (#102831) 2025-03-26 05:44:10 +02:00
7c2890384a K8s: Dashboards: Set v1alpha1 as priority (#102729) 2025-03-25 10:32:49 -06:00
543c0bbccb App platform: Add cleanup job for dashboards when going through /apis (kubectl) (#102506)
* Add dashboard cleanup job

Change log message

Adjust logic to account for new head RV logic

Don't update lastResourceVersion due to pagination

Save improvements

* Address review feedback

* Update docs.

* Remove docs

* Rename config

---------

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
2025-03-22 23:47:27 +01:00
ea89499209 Fix failing integration tests in folderimpl package when running on Spanner. (#102602)
* Fix failing integration tests in folderimpl package when running on Spanner.

* Add comments.
2025-03-21 14:18:22 +01:00
c79c768421 Folders: Add pagination to list (#102334) 2025-03-18 04:56:06 -06:00
4755da0ff5 Folders: Fix user setting in api (#102329) 2025-03-17 18:33:09 -05:00
9264431c81 RBAC: Remove action set feature toggle (#101959)
* remove action set feature toggle

* don't pass feature toggles to action set service instantiation

* linting

* test fixes and frontend clean-up

* fix test
2025-03-13 15:18:23 +00:00
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
ee23a7a7d9 Disable dashboard and folder synchronization when running on Spanner. (#102007) 2025-03-12 11:02:00 +01:00
dc2defd84f K8s/Annotations: Use manager/source annotations rather than repo (#101313)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-03-05 08:54:20 +02:00
67221fb328 K8s: Folders: Fix not found errors (#101585) 2025-03-05 00:31:41 +02:00
7c35d741ba Folders: Add validation that folder is not a parent of itself (#101569) 2025-03-04 13:56:21 -06:00
c873d975a4 Set Query Title when searching folder by title (#101169)
* Set Query to Title when serching folder by title

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-02-26 09:57:12 -03:00
1a65154e74 fix (unified-storage): Fix error when trying to get parents of folder as a viewer (#101245)
* Fix error when trying to get parents of folder as a viewer with unified-storage enabled
2025-02-25 14:38:32 +02:00