From d20ade0c2acc34e371f5d3e6932f900d7db894c9 Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Thu, 11 Sep 2025 16:25:19 -0600 Subject: [PATCH] Provisioning: Fix settings panic (#110993) --- pkg/registry/apis/provisioning/routes.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/registry/apis/provisioning/routes.go b/pkg/registry/apis/provisioning/routes.go index dd063f0fe0e..724e23de1c9 100644 --- a/pkg/registry/apis/provisioning/routes.go +++ b/pkg/registry/apis/provisioning/routes.go @@ -156,10 +156,15 @@ func (b *APIBuilder) handleSettings(w http.ResponseWriter, r *http.Request) { return } + legacyStorage := false + if b.storageStatus != nil { + legacyStorage = dualwrite.IsReadingLegacyDashboardsAndFolders(ctx, b.storageStatus) + } + settings := provisioning.RepositoryViewList{ Items: make([]provisioning.RepositoryView, len(all)), // FIXME: this shouldn't be here in provisioning but at the dual writer or something about the storage - LegacyStorage: dualwrite.IsReadingLegacyDashboardsAndFolders(ctx, b.storageStatus), + LegacyStorage: legacyStorage, AvailableRepositoryTypes: b.repoFactory.Types(), }