From 47f48faed7331b7ba4ad3d6775d5cffacf8931b5 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 2 Oct 2024 13:56:39 -0500 Subject: [PATCH] fix(upgrades): avoid clobbering cache when filtering (#9752) The slice is shared, can't overwrite elements of it. (Upgrade server only thing.) --- cmd/infra/stupgrades/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/infra/stupgrades/main.go b/cmd/infra/stupgrades/main.go index 49e4c9857..7b8abfd0d 100644 --- a/cmd/infra/stupgrades/main.go +++ b/cmd/infra/stupgrades/main.go @@ -227,7 +227,7 @@ func filterForCompabitility(rels []upgrade.Release, ua, osv string) []upgrade.Re } os := osArch[1] - filtered := rels[:0] + var filtered []upgrade.Release for _, rel := range rels { if rel.Compatibility == nil { // No requirements means it's compatible with everything.