39 Commits

Author SHA1 Message Date
ce73e5126a Folders/k8s: Enable all dualwriter modes on remaining integration tests (#107992)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-11 09:20:01 -03:00
18b5a9eb8d Run TestIntegrationFoldersApp for all dualwriter modes on sqlite only (#107818)
* Run TestIntegrationFoldersApp for all dualwriter modes on sqlite only

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-10 18:16:27 +00:00
b1fcdb9c09 Folders: run integration tests only for SQLite (#107979)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-10 14:48:14 -03:00
a8733f9a05 Fix TestIntegrationFoldersGetAPIEndpointK8S (#107924)
Run TestIntegrationFoldersGetAPIEndpointK8S only for SQLite

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-10 09:58:35 -03:00
a7aed23d47 Disable TestIntegrationFoldersGetAPIEndpointK8S for all databases (#107913)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-09 16:55:15 +00:00
4228ed789b Folders: disable TestIntegrationFoldersGetAPIEndpointK8S (#107897)
* Folders: disable TestIntegrationFoldersGetAPIEndpointK8S

it's breaking the enteprise CI pipeline

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

* Run only against sqlite

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

* noop: force backend change

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-09 15:44:20 +00:00
79ebe2dc10 Folders: Ensure all folder tests under /pkg/tests/apis/folders are handled as integrations tests (#107801)
Folders: ensure integration tests are executed in our CI pipeline

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-08 16:32:41 -03:00
53537148e1 Folders: reenable unit tests (#107751)
* Folders: reenable unit test TestFoldersCreateAPIEndpointK8S

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

* reenable unit test TestFoldersGetAPIEndpointK8S

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-08 11:26:45 -03:00
e76f470b44 NestedFolderPicker: Migrate to app platform API (#106926)
* Add /children endpoint

* Update folder client

* Add comment

* Add feature toggle

* Add new version of useFoldersQuery

* Error handling

* Format

* Rename feature toggle

* Remove options and move root folder constant

* Fix feature toggle merge

* Add feature toggle again

* Rename useFoldersQuery files

* Update API spec

* Fix test

* Add test

* Better typings

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-07-03 16:15:23 +02:00
55e29d4405 Unistore: Reenable integration tests (#107340)
* Unistore: Reenable integration tests

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-06-30 10:32:12 -03:00
5f21f320f7 fix(unified-storage): use continue token containing both formats for dualwriter (#106525) 2025-06-13 15:59:46 +02: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
3e6f40c873 K8s: Move to one feature toggle for folders and dashboards (#100911) 2025-02-19 01:11:26 +02: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
b2d0359e72 K8s/Folders: Remove slow/redundant folder integration tests (#99291) 2025-01-21 11:14:31 +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
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
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
c8d3ea58f8 Support importing local cue modules when generating TS types with cog (#96876)
* Support importing local cue modules when generating TS types with cog

* Generate enums as unions of values instead of an actual `enum` statement

* Update transformers to use the new TS enums

* Update go workspaces

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-11-28 10:45:31 +01:00
6d04023aa6 K8s/Folders: Improve k8s client implementation of get (#96434)
* Enable getting folders with kubernetes client
* Add TestIntegrationFolderGetPermissions
* Set full path as part of legacy get
* Replace implementation for setting fullpath
* Add folder get test
* Escape forward slash in parent titles
* Replace test for access control metadata
* Add test case to TestIntegrationFolderGetPermissions
* Improve fetching of access control
2024-11-26 16:20:00 +02:00
2a74778776 Support delete endpoint for folders (#96573)
* Support delete endpoint for folders

* Include authorizer

* Add test for delete verb

* Add delete command to delete options

* Pass query string to context to admission

* Dont support nested folder deletion for now

* Skip test if feature flag is present

* Add test case

* Remove comment

* Only rely on the storage type config to run alerting tests

* Dont change legacy subpath

* Remove unised function

* Add test case when an editor can delete alert rules

* Lint
2024-11-22 16:51:53 +01:00
bbae396db4 Unistore: Add GetFolders endpoint backed by UnifiedStorage (#96399)
* Unistore: Add GetFolders endpoint backed by UnifiedStorage

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2024-11-22 10:38:00 -03:00
af1a732821 UniStore: test folders circular reference (#95496)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-29 21:06:55 +00:00
2f40fd6741 Dashboards: Remove unique name constraints (#90687) 2024-10-29 08:58:39 +03:00
f6a5e03bfb UniStore: Add testcase for trimming folder title (#95405)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-28 10:24:28 -03:00
4a13580a2f K8s/Folders: Fix folder status error message (#95464)
* Fix folder status error message
* Add test for folder creation response message
* Add TestFoldersCreateAPIEndpointK8S fixes
* Fix message returned when user has no permissions
2024-10-28 12:33:56 +01:00
f5ed2f52f7 UniStore: expand nested folders testing (#95374)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-24 19:54:33 -03:00
f379329127 UniStore: add FoldersCreate Endpoint test (#95253)
* UniStore: add FoldersCreate Endpoint test

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-24 12:04:32 -03:00
f3a93a0303 K8s/Folders: Enhance k8s folder update (#95033)
* Put folder update behind feature toggle
* Set more fields when doing k8s update
* Check update in folder tests
* Uncomment remaining k8s handler methods
2024-10-21 19:08:03 +02:00
8abfcdbb78 Ks8/Folders: Fix status codes returned on create (#95055)
* Fix status codes returned by k8s folder handler
* Add test for status code when creating duplicate folder
2024-10-21 13:07:11 -03:00
992186c88f K8s/Folders: Require create permissions when creating folder (#94514)
* Require create permissions when creating folder
* Test folder create permissions
* Add test for nested folder permissions on creation
* Replace hardcoded verbs
2024-10-11 15:13:56 +02:00
011978e81b K8s/Folders: Remove folder service from client (#94450)
* Support getting full path of UIDs
* Use full path to set parents field
* Update get folder test
* Add folder store test for getting with full path UIDs
* Add test for parsing parent titles
* Test nested folder create payload
2024-10-10 13:22:57 +02:00
a42caa7a61 K8s/Folders: Fix tests for creating folders (#94192)
* Add feature toggle grafanaAPIServerTestingWithExperimentalAPIs
* Customise registration of FolderAPIBuilder for tests and fix tests
2024-10-03 12:11:40 +02:00
177965704d Storage: Test mode 5 (#93714) 2024-09-25 08:29:17 -04:00
b918739a98 K8s/Folders: Add basic folder integration tests (create, read) (#93232)
* Add initial folder tests
* Add test for get/reading folders
* Compare legacy and k8s create and read
* Remove dependency on grafanaAPIServerWithExperimentalAPIs
2024-09-12 14:36:46 +02:00
ee2f6a7b49 Force interface implementation also on legacy storage (#87414)
* Force interface implementation also on legacy storage

* Add DeleteCollection to folders and dashboards

* Fix integration tests

* Fix tests
2024-05-07 15:02:30 +02:00
74115f1f08 Chore: fix apiserver integration tests (#83724)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-02-29 14:58:49 -08:00
e041055012 K8s/Folders: Rename api group to singular (#81443) 2024-01-30 08:50:37 -08:00