From f5fd7a15b6f92371e2afa82c863bb6d07e307327 Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Mon, 5 May 2025 23:09:18 -0600 Subject: [PATCH] K8s: GetFolders to return default limit (#104976) --- pkg/services/folder/folderimpl/unifiedstore.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/services/folder/folderimpl/unifiedstore.go b/pkg/services/folder/folderimpl/unifiedstore.go index 193167358ed..7d893355903 100644 --- a/pkg/services/folder/folderimpl/unifiedstore.go +++ b/pkg/services/folder/folderimpl/unifiedstore.go @@ -321,7 +321,9 @@ func (ss *FolderUnifiedStoreImpl) GetHeight(ctx context.Context, foldrUID string // The full path UIDs of B is "uid1/uid2". // The full path UIDs of A is "uid1". func (ss *FolderUnifiedStoreImpl) GetFolders(ctx context.Context, q folder.GetFoldersFromStoreQuery) ([]*folder.Folder, error) { - opts := v1.ListOptions{} + opts := v1.ListOptions{ + Limit: folderSearchLimit, + } if q.WithFullpath || q.WithFullpathUIDs { // only supported in modes 0-2, to keep the alerting queries from causing tons of get folder requests // to retrieve the parent for all folders in grafana