0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-56528 fix debug symbol downloader

This commit is contained in:
Robert Guo 2021-05-20 21:49:48 -04:00 committed by Evergreen Agent
parent 3eb5e69bcf
commit e500e9d4fc
2 changed files with 26 additions and 20 deletions

View File

@ -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

View File

@ -66,15 +66,21 @@ 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:
if config.DEBUG_SYMBOL_PATCH_URL is None:
root_logger.info("Skipping downloading debug symbols since DEBUG_SYMBOLS_PATCH_URL is None")
return
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)