From 7f3e0d8258699fac2da764d4a56efd3305421161 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Wed, 25 May 2016 11:56:38 -0400 Subject: [PATCH] Bug 1275613 - Always schedule a 'file_patterns' job when its task definition has changed, r=dustin Currently, jobs which has 'file_patterns' set will only be run if a file matching one of those patterns has been modified. This means that unless the task definition of the job was explicitly included in those 'file_patterns', the job won't run when we modify it! I think it is safe to assume that when making changes to a job's task, we want it to be run no matter what. So let's add the task definition to 'file_patterns' automatically. Here's a try run which modifies the marionette harness task: https://treeherder.mozilla.org/#/jobs?repo=try&revision=01e6cf9d8599c64d61ac8ecb5320c1c4209e0a8b MozReview-Commit-ID: AUSfUFzhiA1 --HG-- extra : rebase_source : de9d66d1d17de90dc83681e51134637616a0652e --- taskcluster/taskgraph/kind/legacy.py | 2 ++ testing/taskcluster/mach_commands.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/taskcluster/taskgraph/kind/legacy.py b/taskcluster/taskgraph/kind/legacy.py index c56f7e279342..1e088cab27ca 100644 --- a/taskcluster/taskgraph/kind/legacy.py +++ b/taskcluster/taskgraph/kind/legacy.py @@ -191,6 +191,8 @@ class LegacyKind(base.Kind): # of the changed files. file_patterns = when.get('file_patterns', None) if file_patterns and changed_files: + # Always consider changes to the task definition itself + file_patterns.append('testing/taskcluster/{task}'.format(task=task['task'])) for pattern in file_patterns: for path in changed_files: if mozpackmatch(path, pattern): diff --git a/testing/taskcluster/mach_commands.py b/testing/taskcluster/mach_commands.py index d58d5e249992..c08243ef9c29 100644 --- a/testing/taskcluster/mach_commands.py +++ b/testing/taskcluster/mach_commands.py @@ -311,6 +311,8 @@ class Graph(object): # of the changed files. file_patterns = when.get('file_patterns', None) if file_patterns and changed_files: + # Always consider changes to the task definition itself + file_patterns.append('testing/taskcluster/{task}'.format(task=task['task'])) for pattern in file_patterns: for path in changed_files: if mozpackmatch(path, pattern):