summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/resmokelib/config.py4
-rw-r--r--buildscripts/resmokelib/configure_resmoke.py1
-rw-r--r--buildscripts/resmokelib/logging/jasper_logger.py7
-rw-r--r--buildscripts/resmokelib/logging/loggers.py2
-rw-r--r--buildscripts/resmokelib/run/__init__.py6
-rw-r--r--buildscripts/resmokelib/testing/report.py10
-rw-r--r--etc/pip/components/resmoke.req2
7 files changed, 22 insertions, 10 deletions
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
index 686ca435e3a..b7072e822f6 100644
--- a/buildscripts/resmokelib/config.py
+++ b/buildscripts/resmokelib/config.py
@@ -110,6 +110,7 @@ DEFAULTS = {
"internal_params": [],
# Evergreen options.
+ "evergreen_url": "evergreen.mongodb.com",
"build_id": None,
"distro_id": None,
"execution_number": 0,
@@ -272,6 +273,9 @@ DBTEST_EXECUTABLE = None
# actually running them).
DRY_RUN = None
+# URL to connect to the Evergreen service.
+EVERGREEN_URL = None
+
# An identifier consisting of the project name, build variant name, commit hash, and the timestamp.
# For patch builds, it also includes the patch version id.
EVERGREEN_BUILD_ID = None
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py
index 859b2de3e70..3a9d0bc39f9 100644
--- a/buildscripts/resmokelib/configure_resmoke.py
+++ b/buildscripts/resmokelib/configure_resmoke.py
@@ -236,6 +236,7 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many
_config.INTERNAL_PARAMS = config.pop("internal_params")
# Evergreen options.
+ _config.EVERGREEN_URL = config.pop("evergreen_url")
_config.EVERGREEN_BUILD_ID = config.pop("build_id")
_config.EVERGREEN_DISTRO_ID = config.pop("distro_id")
_config.EVERGREEN_EXECUTION = config.pop("execution_number")
diff --git a/buildscripts/resmokelib/logging/jasper_logger.py b/buildscripts/resmokelib/logging/jasper_logger.py
index 5ac2dcb1316..44feef7b328 100644
--- a/buildscripts/resmokelib/logging/jasper_logger.py
+++ b/buildscripts/resmokelib/logging/jasper_logger.py
@@ -13,13 +13,6 @@ from buildscripts.resmokelib import config
from buildscripts.resmokelib import utils
-def get_test_log_url(group_id, test_id):
- """Return a URL to the test log in cedar."""
-
- return "https://{}/rest/v1/buildlogger/test_name/{}/{}/group/{}?execution={}".format(
- config.CEDAR_URL, config.EVERGREEN_TASK_ID, test_id, group_id, config.EVERGREEN_EXECUTION)
-
-
def get_logger_config(group_id=None, test_id=None, process_name=None, prefix=None, trial=None):
# pylint: disable=too-many-locals
"""Return the jasper logger config."""
diff --git a/buildscripts/resmokelib/logging/loggers.py b/buildscripts/resmokelib/logging/loggers.py
index 6e4e76bea17..54b5e71d25e 100644
--- a/buildscripts/resmokelib/logging/loggers.py
+++ b/buildscripts/resmokelib/logging/loggers.py
@@ -226,7 +226,7 @@ def new_test_logger(test_shortname, test_basename, command, parent, job_num, tes
if config.SPAWN_USING == "jasper":
_add_jasper_logger_handler(logger, job_num, test_id=test_id)
- return (logger, jasper_logger.get_test_log_url(job_num, test_id))
+ return (logger, None)
(test_id, url) = _get_test_endpoint(job_num, test_basename, command, job_logger)
_add_build_logger_handler(logger, job_num, test_id)
diff --git a/buildscripts/resmokelib/run/__init__.py b/buildscripts/resmokelib/run/__init__.py
index 5b9df271f3b..d0a41d8054c 100644
--- a/buildscripts/resmokelib/run/__init__.py
+++ b/buildscripts/resmokelib/run/__init__.py
@@ -314,7 +314,7 @@ class TestRunner(Subcommand): # pylint: disable=too-many-instance-attributes
def _setup_jasper(self):
"""Start up the jasper process manager."""
- curator_path = self._get_jasper_reqs()
+ curator_path = _get_jasper_reqs()
from jasper import jasper_pb2
from jasper import jasper_pb2_grpc
@@ -908,6 +908,10 @@ class RunPlugin(PluginInterface):
"Options used to propagate information about the Evergreen task running this"
" script."))
+ evergreen_options.add_argument("--evergreenURL", dest="evergreen_url",
+ metavar="EVERGREEN_URL",
+ help=("The URL of the Evergreen service."))
+
evergreen_options.add_argument(
"--archiveLimitMb", type=int, dest="archive_limit_mb", metavar="ARCHIVE_LIMIT_MB",
help=("Sets the limit (in MB) for archived files to S3. A value of 0"
diff --git a/buildscripts/resmokelib/testing/report.py b/buildscripts/resmokelib/testing/report.py
index 48fc8a69247..5b04628c187 100644
--- a/buildscripts/resmokelib/testing/report.py
+++ b/buildscripts/resmokelib/testing/report.py
@@ -106,6 +106,11 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr
unittest.TestResult.startTest(self, test)
test_info = _TestInfo(test.id(), test.test_name, test.dynamic)
+ if _config.SPAWN_USING == "jasper":
+ # The group id represents the group of logs this test belongs to in
+ # cedar buildlogger. It must be sent to evergreen/cedar in order to
+ # create the correct log URL.
+ test_info.group_id = str(self.job_num)
basename = test.basename()
command = test.as_command()
@@ -293,6 +298,9 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr
"elapsed": test_info.end_time - test_info.start_time,
}
+ if test_info.group_id is not None:
+ result["group_id"] = test_info.group_id
+
if test_info.url_endpoint is not None:
result["url"] = test_info.url_endpoint
result["url_raw"] = test_info.url_endpoint + "?raw=1"
@@ -319,6 +327,7 @@ class TestReport(unittest.TestResult): # pylint: disable=too-many-instance-attr
# Using test_file as the test id is ok here since the test id only needs to be unique
# during suite execution.
test_info = _TestInfo(test_file, test_file, is_dynamic)
+ test_info.group_id = result.get("group_id")
test_info.url_endpoint = result.get("url")
test_info.status = result["status"]
test_info.evergreen_status = test_info.status
@@ -374,6 +383,7 @@ class _TestInfo(object): # pylint: disable=too-many-instance-attributes
self.test_file = test_file
self.dynamic = dynamic
+ self.group_id = None
self.start_time = None
self.end_time = None
self.status = None
diff --git a/etc/pip/components/resmoke.req b/etc/pip/components/resmoke.req
index ca09458282d..abe49433d7b 100644
--- a/etc/pip/components/resmoke.req
+++ b/etc/pip/components/resmoke.req
@@ -1,4 +1,4 @@
-curatorbin == 0.9
+curatorbin == 0.11
PyKMIP == 0.4.0 # It's now 0.8.0. We're far enough back to have API conflicts.
evergreen.py == 2.1.0
jinja2