feat(unified-storage): keep tags on reduce of dashboards (#100230)

This commit is contained in:
Jean-Philippe Quéméner 2025-02-06 22:23:00 +01:00 committed by GitHub
parent f4426e22bf
commit c8609b8a61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -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 {

View File

@ -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