From c8609b8a6165eded00aea0c7dc7bf26702c4528f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Philippe=20Qu=C3=A9m=C3=A9ner?= Date: Thu, 6 Feb 2025 22:23:00 +0100 Subject: [PATCH] feat(unified-storage): keep tags on reduce of dashboards (#100230) --- pkg/registry/apis/dashboard/large.go | 2 +- pkg/registry/apis/dashboard/large_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/registry/apis/dashboard/large.go b/pkg/registry/apis/dashboard/large.go index 88a5eb2d56d..9530b247d2f 100644 --- a/pkg/registry/apis/dashboard/large.go +++ b/pkg/registry/apis/dashboard/large.go @@ -31,7 +31,7 @@ func NewDashboardLargeObjectSupport(scheme *runtime.Scheme) *apistore.BasicLarge dash.Spec = spec dash.SetManagedFields(nil) // this could be bigger than the object! - keep := []string{"title", "description", "schemaVersion"} + keep := []string{"title", "description", "tags", "schemaVersion"} for _, k := range keep { v, ok := old[k] if ok { diff --git a/pkg/registry/apis/dashboard/large_test.go b/pkg/registry/apis/dashboard/large_test.go index a1f1094a935..45510304a65 100644 --- a/pkg/registry/apis/dashboard/large_test.go +++ b/pkg/registry/apis/dashboard/large_test.go @@ -54,7 +54,8 @@ func TestLargeDashboardSupport(t *testing.T) { require.NoError(t, err) require.JSONEq(t, `{ "schemaVersion": 33, - "title": "Panel tests - All panels" + "title": "Panel tests - All panels", + "tags": ["gdev","panel-tests","all-panels"] }`, string(small)) // Now make it big again