Skip to content

Commit

Permalink
Replace custom_2_error by backoff (Firefox 67) (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem authored Sep 30, 2019
1 parent 7f51be4 commit d5f527f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion checks/normandy/uptake_error_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
9 changes: 8 additions & 1 deletion tests/checks/normandy/test_normandy_uptake_error_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit d5f527f

Please sign in to comment.