forked from mirrors/gecko-dev
Bug 1876318 - android_taskgraph: update release-type and release promotion filters. r=gbrown,releng-reviewers
Ensure firefox-android release promotion picks up the right tasks. Differential Revision: https://phabricator.services.mozilla.com/D201477
This commit is contained in:
parent
ce1e8c7b9d
commit
a0a6b8dc65
2 changed files with 8 additions and 11 deletions
|
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
|
|
||||||
def does_task_match_release_type(task, release_type):
|
def does_task_match_release_type(task, release_type):
|
||||||
return (
|
if task.attributes.get("build-type", task.attributes.get("release-type")) is None:
|
||||||
# TODO: only use a single attribute to compare to `release_type`
|
return True
|
||||||
task.attributes.get("build-type") == release_type
|
return bool(
|
||||||
or task.attributes.get("release-type") == release_type
|
{task.attributes.get("build-type"), task.attributes.get("release-type")}
|
||||||
|
& {release_type}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -101,19 +101,15 @@ def _filter_release_promotion(
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# TODO: get rid of this release_type match
|
# TODO: get rid of this release_type match
|
||||||
if task.attributes.get(
|
|
||||||
"shipping_phase"
|
|
||||||
) == shipping_phase and does_task_match_release_type(
|
|
||||||
task, parameters["release_type"]
|
|
||||||
):
|
|
||||||
return True
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
task.attributes.get("shipping_phase") == shipping_phase
|
task.attributes.get("shipping_phase") == shipping_phase
|
||||||
and task.attributes.get("shipping_product") == parameters["release_product"]
|
and task.attributes.get("shipping_product") == parameters["release_product"]
|
||||||
|
and does_task_match_release_type(task, parameters["release_type"])
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
|
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue