From 91e221b04712ec8dc563328ed3ec648df8f0933b Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Dec 2025 14:25:12 +0100 Subject: [PATCH] DRA upgrade/downgrade: roll over only after -alpha.0 All version up to and including x.y.z-alpha.0 are treated as if we were still the previous minor version x.(y-1). There are two reason for this: - During code freeze around (at?) -rc.0, the master branch already identfies itself as the next release with -alpha.0. Without this special case, we would change the version skew testing from what has been tested and been known to work to something else, which can and at least once did break. - Early in the next cycle the differences compared to the previous release are small, so it's more interesting to go back further. --- test/e2e_dra/upgradedowngrade_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/e2e_dra/upgradedowngrade_test.go b/test/e2e_dra/upgradedowngrade_test.go index 312293d7239..1be909178c1 100644 --- a/test/e2e_dra/upgradedowngrade_test.go +++ b/test/e2e_dra/upgradedowngrade_test.go @@ -123,6 +123,20 @@ var _ = ginkgo.Describe("DRA upgrade/downgrade", func() { version, err := version.ParseGeneric(gitVersion) tCtx.ExpectNoError(err, "parse version %s of repo root %q", gitVersion, repoRoot) major, previousMinor := version.Major(), version.Minor()-1 + if strings.Contains(gitVersion, "-alpha.0") { + // All version up to and including x.y.z-alpha.0 are treated as if we were + // still the previous minor version x.(y-1). There are two reason for this: + // + // - During code freeze around (at?) -rc.0, the master branch already + // identfies itself as the next release with -alpha.0. Without this + // special case, we would change the version skew testing from what + // has been tested and been known to work to something else, which + // can and at least once did break. + // + // - Early in the next cycle the differences compared to the previous + // release are small, so it's more interesting to go back further. + previousMinor-- + } tCtx.Logf("got version: major: %d, minor: %d, previous minor: %d", major, version.Minor(), previousMinor) tCtx = ktesting.End(tCtx)