From 32673beb9193176de717feb7cd8d37c6b580f32d Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Tue, 12 May 2020 16:18:20 -0400 Subject: SERVER-48162 tolerate new benchmark report fields --- buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py b/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py index ec4b6d53235..6bc5ba22dbf 100644 --- a/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py +++ b/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py @@ -137,7 +137,9 @@ class _BenchmarkThreadsReport(object): Context = collections.namedtuple("Context", CONTEXT_FIELDS) # type: ignore def __init__(self, context_dict): - self.context = self.Context(**context_dict) + # `context_dict` was parsed from a json file and might have additional fields. + relevant = dict(filter(lambda e: e[0] in self.Context._fields, context_dict.items())) + self.context = self.Context(**relevant) # list of benchmark runs for each thread. self.thread_benchmark_map = collections.defaultdict(list) -- cgit v1.2.1