diff --git a/checks/normandy/uptake_error_rate.py b/checks/normandy/uptake_error_rate.py index 6714d08b..ac7a2d07 100644 --- a/checks/normandy/uptake_error_rate.py +++ b/checks/normandy/uptake_error_rate.py @@ -51,7 +51,10 @@ async def run( by_collection: Dict[str, Dict[str, int]] = defaultdict(dict) for row in rows: rid = int(row["source"].split("/")[-1]) - by_collection[rid][row["status"]] = row["total"] + # In Firefox 67, `custom_2_error` was used instead of `backoff`. + status = row["status"].replace("custom_2_error", "backoff") + by_collection[rid].setdefault(status, 0) + by_collection[rid][status] += row["total"] error_rates = {} for rid, all_statuses in by_collection.items(): diff --git a/tests/checks/normandy/test_normandy_uptake_error_rate.py b/tests/checks/normandy/test_normandy_uptake_error_rate.py index 2cbb122e..caea0077 100644 --- a/tests/checks/normandy/test_normandy_uptake_error_rate.py +++ b/tests/checks/normandy/test_normandy_uptake_error_rate.py @@ -21,7 +21,14 @@ { "status": "backoff", "source": "normandy/recipe/123", - "total": 5000, + "total": 4000, + "min_timestamp": "2019-09-16T01:36:12.348", + "max_timestamp": "2019-09-16T07:24:58.741", + }, + { + "status": "custom_2_error", + "source": "normandy/recipe/123", + "total": 1000, "min_timestamp": "2019-09-16T01:36:12.348", "max_timestamp": "2019-09-16T07:24:58.741", },