diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 99a675303eb..b3387f099c1 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -265,7 +265,8 @@ def layout_2020_regressions_report(): ) .with_index_and_artifacts_expire_in(log_artifacts_expire_in) .with_artifacts("/repo/tests/wpt/reftests-report/report.html") - .find_or_create("layout-2020-regressions-report") + .with_index_at("layout-2020-regressions-report") + .create() ) def macos_unit(): diff --git a/etc/taskcluster/decisionlib.py b/etc/taskcluster/decisionlib.py index 6deca94bacf..8435cd59137 100644 --- a/etc/taskcluster/decisionlib.py +++ b/etc/taskcluster/decisionlib.py @@ -157,6 +157,10 @@ class Task: with_extra = chaining(update_attr, "extra") + def with_index_at(self, index_path): + self.routes.append("index.%s.%s" % (CONFIG.index_prefix, index_path)) + return self + def with_treeherder_required(self): self.treeherder_required = True return self @@ -291,7 +295,7 @@ class Task: if e.status_code != 404: # pragma: no cover raise if not CONFIG.index_read_only: - self.routes.append("index.%s.%s" % (CONFIG.index_prefix, index_path)) + self.with_index_at(index_path) task_id = self.create() SHARED.found_or_created_indexed_tasks[index_path] = task_id