22 Commits

Author SHA1 Message Date
761150fcb8 fix: enable dashboard api k8s list tests (#106508)
* fix: separate dashboard api tests

* fix: typo

* refactor: revert file rename

* fix: compilable

* fix: trial

* fix: remove unused func

* Pass the right value for kubernetesDashboardsEnabled flag

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

* Enable mode 3 for remaining tests

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

* Disable integration tests for MySQL and Postgres

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

* Run go work use

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

* Update go.mod

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

* Remove TODO comment

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

* Revert to go 1.24.5

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

* go.mod

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

* Remove duplicated block

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

* Experiment without reusing client

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

* Reenable integration tests on Postgres and MySQL

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

* Revert "Experiment without reusing client"

This reverts commit 0126e321a08dbafc482a623f2593edaf5561ed32.

* Reapply "Experiment without reusing client"

This reverts commit 5368b4c5318f78aef9b1a5c310846f3f5569fe78.

* Refactor how we get an adminClient

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

* Add TODO comments

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-25 09:46:02 +02:00
d72a70d246 Dashboards API: v2alpha2 missing pieces (#108293)
* Dashboards API: v2alpha2 missing pieces

* Fix issue with dashboard client scope for alpha versions

As we now have 2 different alpha versions for v2 we need to store the
clients separately.

* Improve debuggability of provisioning export test

- Add a helper function to print the tree structure.
- Be explicit about the expected file names expected in each case.

* Update pkg/registry/apis/dashboard/mutate.go

* Update pkg/services/authz/zanzana/server/server.go

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>

* Review

* go lint

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
2025-07-22 11:44:05 +02:00
b017f42278 Unistore: Fix dualwriter mode 3 (#108092)
* Unistore: Fix dualwriter mode 3

Fallback to legacy if Unified is the main store and we get an error when
reading from it

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


---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-15 11:16:26 -03:00
d7f7a19c56 Dashboard permissions: Update integration tests to take into account kubernetesDashboards flag value (#107706)
Dashboard permissions: Update integration tests to take into account  flag value
2025-07-09 08:46:27 +02:00
b1d3155b60 K8s: Library Panels: Add rerouting for get (#107362) 2025-06-30 13:26:24 -05:00
63bc65fa4c Dashboards: Fix history list for dashboard uids that end in - (#107073) 2025-06-22 06:56:45 -06:00
0b7e2f5601 K8s/Dashboards: Add mode 1, 2 to dashboard TestIntegrationValidation (#107018)
* Add mode 1 to dashboard TestIntegrationValidation
* Reject update with version conflict also in mode 1
* Add integration testing for mode 2
2025-06-20 13:11:26 +02:00
feeced9618 K8s: Dashboards /apis: Fix library element connections (#106734) 2025-06-13 21:40:39 +02:00
129e8bb1e4 Dashboards: Fix moving to general folder (#104655) 2025-04-30 03:03:57 +03:00
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
ee4d59b547 Linter: fix conflict (#104370)
Linter: fix enterprise conflict
2025-04-23 07:00:32 +01:00
b887e8aa05 K8s: Dashboards: Add fine grained access control checks to /apis (#104347)
---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
Co-authored-by: Marco de Abreu <marco.deabreu@grafana.com>
Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
2025-04-23 03:29:05 +01:00
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03:00
c47ab101d1 Dashboards: Add Dashboard Schema validation (2) (#103844)
* Activate schema validation and align underlying systems

* update to save as v0 if not the right schema version

* Resolve merge conflicts

* Move RequireApiErrorStatus to tests package

* Add mutation tests

* Fix lint

* Only do min version check if dashboard is v1

* Fix lint and disable provisioning test

* Revert provisioning changes

* Revert more tests and add schema test

* Reran gen

* SQL Dashboard save

* Adjust APIVERSION

* Fixed mutation test

* Add logging on downgrade

---------

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-04-11 23:05:41 +02:00
bba85c1128 K8s: Dashboards: Fix error handling (#103929) 2025-04-11 13:31:41 -06: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
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
0c79a8927b Dashboards: Add validation tests for all dual writer modes (#103570)
* Add validation tests for mode 0 and 4

* Add mode 1, 2, 3, 5

---------

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
2025-04-08 14:37:50 +02:00
c8c55621fb Dashboards: Fix dashboard UID inconsistency between creation and retrieval in legacy storage (#103568) 2025-04-08 12:25:32 +02:00
8cd6f837a5 Dashboards: Prevent saving to a non-existent folder (#103503) 2025-04-07 09:02:20 +03:00
b2f80d4dca Dashboards: Add Dashboard API Validation tests and fix underlying issues (#103502) 2025-04-07 05:44:28 +03:00