summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorEvelyn Wu <evelyn.wu@mongodb.com>2022-07-05 19:28:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-06 13:15:15 +0000
commit3988585f1cc62d0e384dd2dbb96831f824e37f06 (patch)
treece9edab6ced6fd847486abaa941e768f0c9dbd95 /buildscripts
parentf62a3778d114a208a3d8c6ddc09e7a7702cde8c2 (diff)
downloadmongo-3988585f1cc62d0e384dd2dbb96831f824e37f06.tar.gz
SERVER-65943 Add logging to multiversionconstants.py
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/generate_fcv_constants/__init__.py12
-rw-r--r--buildscripts/resmokelib/multiversionconstants.py9
-rw-r--r--buildscripts/resmokelib/run/__init__.py2
3 files changed, 22 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/generate_fcv_constants/__init__.py b/buildscripts/resmokelib/generate_fcv_constants/__init__.py
index fab4be5abd9..2ccbc9e5b60 100644
--- a/buildscripts/resmokelib/generate_fcv_constants/__init__.py
+++ b/buildscripts/resmokelib/generate_fcv_constants/__init__.py
@@ -1,6 +1,8 @@
"""Generate FCV constants for consumption by non-C++ integration tests."""
import argparse
+from buildscripts.resmokelib import configure_resmoke
+from buildscripts.resmokelib import logging
from buildscripts.resmokelib.plugin import PluginInterface, Subcommand
_COMMAND = "generate-fcv-constants"
@@ -11,6 +13,11 @@ class GenerateFCVConstants(Subcommand):
def __init__(self):
"""Constructor."""
+ self._exec_logger = None
+
+ def _setup_logging(self):
+ logging.loggers.configure_loggers()
+ self._exec_logger = logging.loggers.ROOT_EXECUTOR_LOGGER
def execute(self) -> None:
"""
@@ -19,8 +26,10 @@ class GenerateFCVConstants(Subcommand):
:return: None
"""
# This will cause multiversion constants to be generated.
+ self._setup_logging()
+
import buildscripts.resmokelib.multiversionconstants # pylint: disable=unused-import
- pass
+ buildscripts.resmokelib.multiversionconstants.log_constants(self._exec_logger)
class GenerateFCVConstantsPlugin(PluginInterface):
@@ -46,6 +55,7 @@ class GenerateFCVConstantsPlugin(PluginInterface):
:param kwargs: additional args
:return: None or a Subcommand
"""
+ configure_resmoke.validate_and_update_config(parser, parsed_args)
if subcommand != _COMMAND:
return None
diff --git a/buildscripts/resmokelib/multiversionconstants.py b/buildscripts/resmokelib/multiversionconstants.py
index 56381531f72..aee419cd02b 100644
--- a/buildscripts/resmokelib/multiversionconstants.py
+++ b/buildscripts/resmokelib/multiversionconstants.py
@@ -110,3 +110,12 @@ 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]
+
+
+def log_constants(exec_log):
+ """Log FCV constants."""
+ exec_log.info("Last LTS FCV: {}".format(LAST_LTS_FCV))
+ exec_log.info("Last Continuous FCV: {}".format(LAST_CONTINUOUS_FCV))
+ exec_log.info("Latest FCV: {}".format(LATEST_FCV))
+ exec_log.info("Requires FCV Tag Latest: {}".format(REQUIRES_FCV_TAG_LATEST))
+ exec_log.info("Requires FCV Tag: {}".format(REQUIRES_FCV_TAG))
diff --git a/buildscripts/resmokelib/run/__init__.py b/buildscripts/resmokelib/run/__init__.py
index b16517f1d79..6186d9c18d1 100644
--- a/buildscripts/resmokelib/run/__init__.py
+++ b/buildscripts/resmokelib/run/__init__.py
@@ -220,6 +220,8 @@ class TestRunner(Subcommand): # pylint: disable=too-many-instance-attributes
os.path.join(config.CONFIG_DIR, "evg_task_doc", "evg_task_doc.yml"))
self._log_local_resmoke_invocation()
+ from buildscripts.resmokelib import multiversionconstants
+ multiversionconstants.log_constants(self._resmoke_logger)
suites = None
try: