summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@mongodb.com>2021-05-20 21:49:48 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-21 13:53:34 +0000
commite500e9d4fcdf014acbab2a5fc9bd81df002c28ae (patch)
treeab9e2e7a8d9e28ef09083dca5ef445b2a245a1e3 /buildscripts
parent3eb5e69bcfb8000adea42c4c08e274d50f2eedae (diff)
downloadmongo-e500e9d4fcdf014acbab2a5fc9bd81df002c28ae.tar.gz
SERVER-56528 fix debug symbol downloader
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/configure_resmoke.py8
-rw-r--r--buildscripts/resmokelib/hang_analyzer/extractor.py40
2 files changed, 27 insertions, 21 deletions
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py
index b0081efc86b..f5e3394b13f 100644
--- a/buildscripts/resmokelib/configure_resmoke.py
+++ b/buildscripts/resmokelib/configure_resmoke.py
@@ -311,17 +311,17 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many
_config.CEDAR_RPC_PORT = config.pop("cedar_rpc_port")
def calculate_debug_symbol_url():
- url = "https://mciuploads.s3.amazonaws.com/"
+ url = "https://mciuploads.s3.amazonaws.com"
project_name = _config.EVERGREEN_PROJECT_NAME
variant_name = _config.EVERGREEN_VARIANT_NAME
revision = _config.EVERGREEN_REVISION
task_id = _config.EVERGREEN_TASK_ID
if (variant_name is not None) and (revision is not None) and (task_id is not None):
url = "/".join([
- project_name, variant_name, revision, task_id,
- f"/debugsymbols/debugsymbols-{task_id}"
+ url, project_name, variant_name, revision,
+ f"debugsymbols/debugsymbols-{_config.EVERGREEN_BUILD_ID}"
])
- url = url + ".tgz" if sys.platform == "win32" else ".zip"
+ url = url + (".zip" if sys.platform == "win32" else ".tgz")
return url
return None
diff --git a/buildscripts/resmokelib/hang_analyzer/extractor.py b/buildscripts/resmokelib/hang_analyzer/extractor.py
index 79ebe476ec8..b4b33650782 100644
--- a/buildscripts/resmokelib/hang_analyzer/extractor.py
+++ b/buildscripts/resmokelib/hang_analyzer/extractor.py
@@ -66,24 +66,30 @@ def _extracted_files_to_copy():
def download_symbols_from_patch_build(root_logger):
"""Download debug symbol from patch build."""
- if config.DEBUG_SYMBOL_PATCH_URL is not None:
- retry_secs = 10
+ if config.DEBUG_SYMBOL_PATCH_URL is None:
+ root_logger.info("Skipping downloading debug symbols since DEBUG_SYMBOLS_PATCH_URL is None")
+ return
- while True:
- try:
+ retry_secs = 10
+
+ while True:
+ try:
+ if config.DEBUG_SYMBOL_PATCH_URL is not None:
SetupMultiversion.setup_mongodb(artifacts_url=None, binaries_url=None,
symbols_url=config.DEBUG_SYMBOL_PATCH_URL,
install_dir=os.getcwd())
- break
- except tarfile.ReadError:
- root_logger.info("Debug symbols unavailable after %s secs, retrying in %s secs",
- compare_start_time(time.time()), retry_secs)
- time.sleep(retry_secs)
-
- ten_min = 10 * 60
- if compare_start_time(time.time()) > ten_min:
- root_logger.info(
- 'Debug-symbols archive-file does not exist after %s secs; '
- 'Hang-Analyzer may not complete successfully. Download URL: %s', ten_min,
- config.DEBUG_SYMBOL_PATCH_URL)
- break
+
+ break
+
+ except tarfile.ReadError:
+ root_logger.info("Debug symbols unavailable after %s secs, retrying in %s secs",
+ compare_start_time(time.time()), retry_secs)
+ time.sleep(retry_secs)
+
+ ten_min = 10 * 60
+ if compare_start_time(time.time()) > ten_min:
+ root_logger.info(
+ 'Debug-symbols archive-file does not exist after %s secs; '
+ 'Hang-Analyzer may not complete successfully. Download URL: %s', ten_min,
+ config.DEBUG_SYMBOL_PATCH_URL)
+ break