From 8a378cbc4b834dd37b36e3566278ddc2428d9b36 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 3 May 2024 23:13:37 +0100 Subject: [PATCH] We can't test next version releases on previous version branches --- tools/ci.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/ci.py b/tools/ci.py index e89d458ac40..a3837ef613b 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -1326,8 +1326,6 @@ def get_testing_releases( """ Get a list of releases to use for the upgrade and downgrade tests. """ - # We aren't testing upgrades from anything before 3006.0 except the latest 3005.x - threshold_major = 3005 parsed_salt_version = tools.utils.Version(salt_version) # We want the latest 4 major versions, removing the oldest if this version is a new major num_major_versions = 4 @@ -1335,7 +1333,15 @@ def get_testing_releases( num_major_versions = 3 majors = sorted( list( - {version.major for version in releases if version.major >= threshold_major} + { + version.major + for version in releases + # We aren't testing upgrades from anything before + # 3006.0 except the latest 3005.x + if version.major >= 3005 + # We don't want to test 3007.? on the 3006.x branch + and version.major <= parsed_salt_version.major + } ) )[-num_major_versions:] testing_releases = []