Allow getting the latest 3005 release from GH releases, we are publishing them consistently now

This commit is contained in:
MKLeb 2023-08-15 14:49:06 -04:00 committed by Pedro Algarvio
parent 6f5fc9ba18
commit 2077995108
2 changed files with 2 additions and 12 deletions

View file

@ -160,7 +160,7 @@ Description: remote manager to administer servers via Salt SSH
Package: salt-cloud
Architecture: amd64 arm64
Breaks: salt-common (<= 3006.1)
Breaks: salt-common (<= 3006.2)
Depends: salt-common (= ${source:Version}),
${misc:Depends}
Description: public cloud VM management system

View file

@ -918,7 +918,7 @@ def get_testing_releases(
ctx.exit(1, "The 'GITHUB_OUTPUT' variable is not set.")
else:
# We aren't testing upgrades from anything before 3006.0 except the latest 3005.x
threshold_major = 3006
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
@ -941,16 +941,6 @@ def get_testing_releases(
]
testing_releases.append(minors_of_major[-1])
# TODO: Remove this block when we reach version 3009.0
# Append the latest minor version of 3005 if we don't have enough major versions to test against
if len(testing_releases) != num_major_versions:
url = "https://repo.saltproject.io/salt/onedir/repo.json"
ret = ctx.web.get(url)
repo_data = ret.json()
latest = list(repo_data["latest"].keys())[0]
version = repo_data["latest"][latest]["version"]
testing_releases = [version] + testing_releases
str_releases = [str(version) for version in testing_releases]
with open(github_output, "a", encoding="utf-8") as wfh: