3 Commits

Author SHA1 Message Date
002f46736a refactor(unified-storage): move generated protos to own pkg (#105356) 2025-05-15 21:36:52 +02: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
b1157dbd7a Validate if we are creating a folder more than 5 levels deep (#95579)
* Add getter to FolderAPIBuilder so that we can access it in admission

* Remove deprecated return

* Fix test

* Update pkg/registry/apis/folders/register_test.go

Co-authored-by: maicon <maiconscosta@gmail.com>

* Fix maxNested folder test

* Remove log

---------

Co-authored-by: maicon <maiconscosta@gmail.com>
2024-10-31 12:19:53 +01:00