drop versions older than 1.62 (#2405)

This commit is contained in:
Kristoffer Dalby 2025-02-05 12:02:32 +01:00 committed by GitHub
parent f12cb2e048
commit 9ae3570154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 21 deletions

View file

@ -9,6 +9,20 @@ import (
"tailscale.com/util/set"
)
const MinSupportedCapabilityVersion tailcfg.CapabilityVersion = 88
// CanOldCodeBeCleanedUp is intended to be called on startup to see if
// there are old code that can ble cleaned up, entries should contain
// a CapVer where something can be cleaned up and a panic if it can.
// This is only intended to catch things in tests.
//
// All uses of Capability version checks should be listed here.
func CanOldCodeBeCleanedUp() {
if MinSupportedCapabilityVersion >= 111 {
panic("LegacyDERP can be cleaned up in tail.go")
}
}
func tailscaleVersSorted() []string {
vers := xmaps.Keys(tailscaleToCapVer)
sort.Strings(vers)

View file

@ -15,6 +15,19 @@ func TestTailscaleLatestMajorMinor(t *testing.T) {
}{
{3, false, []string{"v1.76", "v1.78", "v1.80"}},
{2, true, []string{"1.78", "1.80"}},
// Lazy way to see all supported versions
{10, true, []string{
"1.62",
"1.64",
"1.66",
"1.68",
"1.70",
"1.72",
"1.74",
"1.76",
"1.78",
"1.80",
}},
{0, false, nil},
}