105 Commits

Author SHA1 Message Date
ef6e28b955 K8s: Make v0alpha1 opt-in (#107056) 2025-06-20 16:37:17 -05:00
3e3fa18118 Revert "fix(folders): only return continue token if more results" (#106700)
Revert "fix(folders): only return continue token if more results (#106667)"

This reverts commit 3fd8ad8476077b69c44172159852162fdf4dc605.
2025-06-13 12:07:27 +02:00
3fd8ad8476 fix(folders): only return continue token if more results (#106667) 2025-06-13 09:55:30 +02:00
d7a4f497bc Folders: Correctly resolve nested folder breadcrumbs (#106344)
correctly use UID scope instead of ID based scope
2025-06-05 10:02:07 +01: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
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
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
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03: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
df537d6f0f UniStore/Large Objects: Make threshold configurable (#101774)
* Make blob threshold configurable
* Test condition for deconstructing large objects
* Refactor blob threshold naming
2025-04-08 10:50:35 +02:00
04fb9f534e Dashboards: Only expose LibraryPanels and search on v0 (not v1+v2) (#103335) 2025-04-03 20:24:12 +03:00
b97b1cc730 K8s: Revert change around full path (#103334) 2025-04-03 04:57:26 -05: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
2e2b5942c8 K8s/Unified: Consolidate generation logic in apistore client (#102260) 2025-03-21 10:45:25 +02: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
927f7befd6 Unistore: Create default permissions through Folder APIServer (#101420)
* Unistore: Declare a new storage to set default folder permissions

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

* Remove the setting of default permissions from folder legacy storage

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

* Disable setting of folder permissions when Api Server is enabled

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

* Reverts grafana/grafana#100019

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

* Add unit test

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

* check error on unit test

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

* Add unit test

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

* Remove unused fields

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

* Add unit tests for folder_storage

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

* Remove duplicated import

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

* Fix unit test

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-03-11 11:33:08 +00:00
6389b801b9 Authz: Pass correct property (#101674) 2025-03-06 10:02:04 +01: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
d6b6a9da7b FolderAPI: Use different authorizer for multi-tenant api (#101372)
Use different authorizers depening on if we are running multi-tenant or single-tenant
2025-02-28 10:10:32 +01:00
5e61ec1258 Prevent wrong type conversion (#101349) 2025-02-27 15:17:50 +01:00
bfabe2ce82 Ks8/Folders: Fix status codes returned on GET (#101237)
return the correct status code for folder fetching failures
2025-02-25 11:07:27 +00:00
3e6f40c873 K8s: Move to one feature toggle for folders and dashboards (#100911) 2025-02-19 01:11:26 +02:00
9d5af95565 K8s/OpenAPI: Remove /watch/ from the openapi spec (#99793) 2025-01-30 12:51:55 +03:00
94a844977e Folders/K8s: Fix createdBy and updatedBy fields in response (#99569) 2025-01-28 10:46:07 -06:00
a5c14db051 Folders: Convert between unstructured and legacy (#99504) 2025-01-27 17:37:28 +01:00
7720f0b64e folder: allow standalone folder apiserver (#99508)
* add standalone folders

* add validate

* fix auth
2025-01-27 15:50:06 +01:00
a037c6f344 K8s/Folders: Remove kubernetesFolders flag and full path metadata (#99256)
* remove full path

* remove more

* remove KubernetesFolders tests

* remove feature toggles

* remove feature toggles

* skip permissions test

* skip permissions test

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2025-01-23 17:25:03 +03:00
d8b6ded101 K8s: use deprecatedInternalID label rather than SQL annotation (#99263) 2025-01-21 12:38:14 +03:00
680e6bc1f8 Authlib: Use types package rather than claims (#99243) 2025-01-21 12:06:55 +03:00
b4ec11e150 Unistore: Ensure deprecated Folder ID gets stored on all modes (#99043)
* Unistore: Ensure deprecated Folder ID gets stored on all modes

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-01-16 15:01:00 -03:00
cbb688e910 Zanzana: Remove usage from legacy access control (#98883)
* Zanzana: Remove usage from legacy access control

* remove unused

* remove zanzana client from services where it's not used

* remove unused metrics

* fix linter
2025-01-14 10:26:15 +01:00
766d645d82 Filewalkwithme/unistore refactor folder service to hit folder apiserver (#98409)
Refactor folder service to use Unified Storage

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-01-13 18:15:35 -03:00
937e8dea2d Folder/parent subresource (#98392)
* Expose get folder parents endpoint

* Add tests
2025-01-03 10:43:56 +01:00
d2639f6080 Ensure all internal Services are using FolderService and not FolderStore (#98370)
* Ensure all internal Services are using FolderService and not FolderStore

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-12-30 13:48:35 -03:00
fec5c0ec19 Make sure annotations are kept when updating a folder (#98321)
* Make sure annotations are kept when updating a folder

* Remove pointer

* Mock get on update tests
2024-12-27 13:51:10 +01:00
58c44f6c66 Trim folder title (#98275) 2024-12-19 17:56:14 +01:00
f5d44ff51d Folders move (#98100) 2024-12-19 09:59:14 +01:00
2e08092a34 UniStore: Get Folder Handler return Root Folder (general) (#98127)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-12-18 22:31:55 -03:00
eb38a63559 K8s/Folder: Show parent folder information (#97938) 2024-12-17 16:19:40 +02:00
62c1735a61 Implement k8s count handler (#97955)
* Implement k8s count handler

* Fix endpoint

* Fix type converstions

* Add tests for foldercounts

* Add more tests

* Only use sql-fallback if no values in unistore

* Update gomod

* Fix test

* Update pkg/api/folder_test.go

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>

* Go.mod

---------

Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
2024-12-16 14:08:29 +01:00
f710573b37 Use searcher GetStats to count for folders and dashboards under a folder to be deleted (#97708)
* get stats from index

* fix logging

* fix logging

* actually counting

* Use searcher to check for resources referencing a folder

* Add tests when deleting a folder

* Lint

* merge/fix test

* will delegate to SQL

* get stats from index

* fix logging

* actually counting

* merge/fix test

* will delegate to SQL

* Uncomment test

* Add tests for checking stats before deleting a folder

* Change base branch to main

* Lint

* [REVIEW] remove logs

* Check for type assertion success

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-12-12 11:53:01 +01:00
ea17b79c09 Search: Return counts for values within an folder/repository (#97534) 2024-12-10 20:37:37 +02:00
5f39d2eeb0 K8s: Make GetAPIRoutes an optional interface (#97531) 2024-12-07 03:08:18 +03:00
7fd8877439 Unistore: Update Folders Endpoint (#97317)
* Add route for update folders via apiserver

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-12-03 15:33:01 -03:00