Bug 1639164 - Translate groups returned by bugbug in the config_groups dict too. r=ahal

Otherwise there is a mismatch between the group names in "groups" and "config_groups".

Differential Revision: https://phabricator.services.mozilla.com/D91842
This commit is contained in:
Marco Castelluccio 2020-10-05 13:05:21 +00:00
Родитель efda27b066
Коммит daf1b7c976
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -26,6 +26,11 @@ def test_group_translation(responses):
"dom/indexedDB": 1, "dom/indexedDB": 1,
"testing/web-platform/tests/IndexedDB": 1, "testing/web-platform/tests/IndexedDB": 1,
"testing/web-platform/mozilla/tests/IndexedDB": 1, "testing/web-platform/mozilla/tests/IndexedDB": 1,
},
"config_groups": {
"dom/indexedDB": ["label1", "label2"],
"testing/web-platform/tests/IndexedDB": ["label3"],
"testing/web-platform/mozilla/tests/IndexedDB": ["label4"],
} }
}, },
status=200, status=200,
@ -39,6 +44,11 @@ def test_group_translation(responses):
"/_mozilla/IndexedDB", "/_mozilla/IndexedDB",
"dom/indexedDB", "dom/indexedDB",
] ]
assert data["config_groups"] == {
"dom/indexedDB": ["label1", "label2"],
"/IndexedDB": ["label3"],
"/_mozilla/IndexedDB": ["label4"],
}
assert len(push_schedules) == 1 assert len(push_schedules) == 1
# Value is memoized. # Value is memoized.

Просмотреть файл

@ -112,4 +112,7 @@ def push_schedules(branch, rev):
if "groups" in data: if "groups" in data:
data["groups"] = {translate_group(k): v for k, v in data["groups"].items()} data["groups"] = {translate_group(k): v for k, v in data["groups"].items()}
if "config_groups" in data:
data["config_groups"] = {translate_group(k): v for k, v in data["config_groups"].items()}
return data return data