diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-14 14:26:38 -0300 |
| commit | 294bc6ecabf14c09c9bc8644704921dcf97cb44e (patch) | |
| tree | 279b1e0bab53901a1647ac63c1c724f0f789a663 /buildscripts/resmokelib/multiversionconstants.py | |
| parent | 70be7c27a251621187a1de533462ae2bb1e3bd39 (diff) | |
| parent | 1e917fd798aa25b7066d4b414b51184f13d5a092 (diff) | |
Update upstream source from tag 'upstream/6.0.10'debian/6.0.10-1
Update to upstream version '6.0.10'
with Debian dir 2d176fa254eee97b139f712fec5709641335a8c3
Diffstat (limited to 'buildscripts/resmokelib/multiversionconstants.py')
| -rw-r--r-- | buildscripts/resmokelib/multiversionconstants.py | 74 |
1 files changed, 34 insertions, 40 deletions
diff --git a/buildscripts/resmokelib/multiversionconstants.py b/buildscripts/resmokelib/multiversionconstants.py index 0cac4fbc95b..3646d139b1f 100644 --- a/buildscripts/resmokelib/multiversionconstants.py +++ b/buildscripts/resmokelib/multiversionconstants.py @@ -2,25 +2,24 @@ import os import shutil from subprocess import DEVNULL, STDOUT, CalledProcessError, call, check_output +import requests import structlog -try: - # when running resmoke - from buildscripts.resmokelib.multiversion.multiversion_service import ( - MongoReleases, MongoVersion, MultiversionService) - from buildscripts.resmokelib.multiversionsetupconstants import \ - USE_EXISTING_RELEASES_FILE -except ImportError: - # when running db-contrib-tool - from multiversion.multiversion_service import (MongoReleases, MongoVersion, MultiversionService) - from multiversionsetupconstants import USE_EXISTING_RELEASES_FILE +from buildscripts.resmokelib.multiversion.multiversion_service import ( + MongoReleases, MongoVersion, MultiversionService, MONGO_VERSION_YAML, RELEASES_YAML) +from buildscripts.resmokelib.multiversionsetupconstants import \ + USE_EXISTING_RELEASES_FILE -LOGGER = structlog.getLogger(__name__) +LAST_LTS = "last_lts" +LAST_CONTINUOUS = "last_continuous" + +# We use the "releases.yml" file from "master" because it is guaranteed to be up-to-date +# with the latest EOL versions. If a "last-continuous" version is EOL, we don't include +# it in the multiversion config and therefore don't test against it. +MASTER_RELEASES_FILE = "https://raw.githubusercontent.com/mongodb/mongo/master/src/mongo/util/version/releases.yml" -# These values must match the include paths for artifacts.tgz in evergreen.yml. -MONGO_VERSION_YAML = ".resmoke_mongo_version.yml" -RELEASES_YAML = ".resmoke_mongo_release_values.yml" +LOGGER = structlog.getLogger(__name__) def generate_mongo_version_file(): @@ -40,14 +39,8 @@ def generate_mongo_version_file(): def generate_releases_file(): """Generate the releases constants file.""" # Copy the 'releases.yml' file from the source tree. - releases_yaml_path = os.path.join("src", "mongo", "util", "version", "releases.yml") - if not os.path.isfile(releases_yaml_path): - LOGGER.info( - 'Skipping yml file generation because file .resmoke_mongo_release_values.yml does not exist at path {}.' - .format(releases_yaml_path)) - return - - shutil.copyfile(releases_yaml_path, RELEASES_YAML) + with open(RELEASES_YAML, "wb") as file: + file.write(requests.get(MASTER_RELEASES_FILE).content) def in_git_root_dir(): @@ -86,33 +79,34 @@ multiversion_service = MultiversionService( mongo_releases=MongoReleases.from_yaml_file(RELEASES_YAML), ) -fcv_constants = multiversion_service.calculate_fcv_constants() +version_constants = multiversion_service.calculate_version_constants() -LAST_LTS_BIN_VERSION = fcv_constants.get_last_lts_fcv() -LAST_CONTINUOUS_BIN_VERSION = fcv_constants.get_last_continuous_fcv() +LAST_LTS_BIN_VERSION = version_constants.get_last_lts_fcv() +LAST_CONTINUOUS_BIN_VERSION = version_constants.get_last_continuous_fcv() -LAST_LTS_FCV = fcv_constants.get_last_lts_fcv() -LAST_CONTINUOUS_FCV = fcv_constants.get_last_continuous_fcv() -LATEST_FCV = fcv_constants.get_latest_fcv() +LAST_LTS_FCV = version_constants.get_last_lts_fcv() +LAST_CONTINUOUS_FCV = version_constants.get_last_continuous_fcv() +LATEST_FCV = version_constants.get_latest_fcv() -LAST_CONTINUOUS_MONGO_BINARY = fcv_constants.build_last_continuous_binary("mongo") -LAST_CONTINUOUS_MONGOD_BINARY = fcv_constants.build_last_continuous_binary("mongod") -LAST_CONTINUOUS_MONGOS_BINARY = fcv_constants.build_last_continuous_binary("mongos") +LAST_CONTINUOUS_MONGO_BINARY = version_constants.build_last_continuous_binary("mongo") +LAST_CONTINUOUS_MONGOD_BINARY = version_constants.build_last_continuous_binary("mongod") +LAST_CONTINUOUS_MONGOS_BINARY = version_constants.build_last_continuous_binary("mongos") -LAST_LTS_MONGO_BINARY = fcv_constants.build_last_lts_binary("mongo") -LAST_LTS_MONGOD_BINARY = fcv_constants.build_last_lts_binary("mongod") -LAST_LTS_MONGOS_BINARY = fcv_constants.build_last_lts_binary("mongos") +LAST_LTS_MONGO_BINARY = version_constants.build_last_lts_binary("mongo") +LAST_LTS_MONGOD_BINARY = version_constants.build_last_lts_binary("mongod") +LAST_LTS_MONGOS_BINARY = version_constants.build_last_lts_binary("mongos") -REQUIRES_FCV_TAG_LATEST = fcv_constants.get_latest_tag() +REQUIRES_FCV_TAG_LATEST = version_constants.get_latest_tag() # Generate tags for all FCVS in (lastLTS, latest], or (lowerBoundOverride, latest] if requested. # All multiversion tests should be run with these tags excluded. -REQUIRES_FCV_TAG = fcv_constants.get_fcv_tag_list() +REQUIRES_FCV_TAG = version_constants.get_fcv_tag_list() # Generate evergreen project names for all FCVs less than latest. EVERGREEN_PROJECTS = ['mongodb-mongo-master'] -EVERGREEN_PROJECTS.extend([evg_project_str(fcv) for fcv in fcv_constants.fcvs_less_than_latest]) +EVERGREEN_PROJECTS.extend([evg_project_str(fcv) for fcv in version_constants.fcvs_less_than_latest]) -OLD_VERSIONS = ["last_lts"] -if LAST_LTS_FCV != LAST_CONTINUOUS_FCV: - OLD_VERSIONS.append("last_continuous") +OLD_VERSIONS = [ + LAST_LTS +] if LAST_CONTINUOUS_FCV == LAST_LTS_FCV or LAST_CONTINUOUS_FCV in version_constants.get_eols( +) else [LAST_LTS, LAST_CONTINUOUS] |
