зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
7f6fa15abf
Коммит
7f3e0d8258
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Загрузка…
Ссылка в новой задаче