summaryrefslogtreecommitdiff
path: root/buildscripts/mongosymb.py
diff options
context:
space:
mode:
authorMikhail Shchatko <mikhail.shchatko@mongodb.com>2022-05-23 18:27:46 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-23 14:28:56 +0000
commitf6e237006a85a670592763d5a13d61775261c7de (patch)
tree8c546acc7bd1a25ecb0fcf66b180474e7023bbc3 /buildscripts/mongosymb.py
parentd69a2bf1c49f3517cb0838326370f31b2894d519 (diff)
downloadmongo-f6e237006a85a670592763d5a13d61775261c7de.tar.gz
SERVER-66613 Send binary version instead of evergreen version to symbolizer service
(cherry picked from commit c2f3bb6b7f263d91f9a5f212faec2417adadea97)
Diffstat (limited to 'buildscripts/mongosymb.py')
-rwxr-xr-xbuildscripts/mongosymb.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/buildscripts/mongosymb.py b/buildscripts/mongosymb.py
index 3224ede0dfa..035b00f3a07 100755
--- a/buildscripts/mongosymb.py
+++ b/buildscripts/mongosymb.py
@@ -362,6 +362,7 @@ class PathResolver(DbgFileResolver):
search_parameters = {"build_id": build_id}
if version:
search_parameters["version"] = version
+ print(f"Getting data from service... Search parameters: {search_parameters}")
response = self.http_client.get(f"{self.host}/find_by_id", params=search_parameters)
if response.status_code != 200:
sys.stderr.write(
@@ -416,7 +417,7 @@ def parse_input(trace_doc, dbg_path_resolver):
return {so_entry["b"]: so_entry for so_entry in somap_list if "b" in so_entry}
base_addr_map = make_base_addr_map(trace_doc["processInfo"]["somap"])
- version = parse_version(trace_doc)
+ version = get_version(trace_doc)
frames = []
for frame in trace_doc["backtrace"]:
@@ -449,19 +450,14 @@ def parse_input(trace_doc, dbg_path_resolver):
return frames
-def parse_version(trace_doc: Dict[str, Any]) -> Optional[str]:
- """Parse version from trace doc.
-
- In evergreen patches `mongodbVersion` is appended by `-patch-{version}`.
- We want to use this version value to distinguish patch builds.
+def get_version(trace_doc: Dict[str, Any]) -> Optional[str]:
+ """
+ Get version from trace doc.
- :param trace_doc: traceback object
- :return: version string or None
+ :param trace_doc: Traceback dict.
+ :return: Version string or None.
"""
- version = trace_doc.get("processInfo", {}).get("mongodbVersion")
- if version and "patch" in version:
- return version.split("-")[-1]
- return None
+ return trace_doc.get("processInfo", {}).get("mongodbVersion")
def symbolize_frames(trace_doc, dbg_path_resolver, symbolizer_path, dsym_hint, input_format,