Bug 1635149 - Force scheduling tasks which were not known when the bugbug test selection model was trained. r=ahal

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

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

@ -54,6 +54,9 @@ class BugBugPushSchedules(OptimizationStrategy):
test_manifests = task.attributes.get('test_manifests')
if test_manifests is None or self.use_reduced_tasks:
if "known_tasks" in data and task.label not in data["known_tasks"]:
return False
if task.label not in tasks:
return True

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

@ -160,6 +160,13 @@ def test_optimization_strategy(responses, params, opt, tasks, arg, expected):
['task-2'],
),
# tasks which are unknown to bugbug are selected
pytest.param(
(0.1,),
{'tasks': {'task-1': 0.9, 'task-3': 0.5}, 'known_tasks': ['task-1', 'task-3', 'task-4']},
['task-2'],
),
# tasks containing groups selected
pytest.param(
(0.1,),