diff --git a/tests/fixtures/config/templated-project/git/common-config/zuul.yaml b/tests/fixtures/config/templated-project/git/common-config/zuul.yaml index b4773f1e03..22a2d6d90e 100644 --- a/tests/fixtures/config/templated-project/git/common-config/zuul.yaml +++ b/tests/fixtures/config/templated-project/git/common-config/zuul.yaml @@ -81,6 +81,9 @@ - job: name: layered-project-foo-test5 +- job: + name: project-test6 + - project: name: org/templated-project templates: diff --git a/zuul/model.py b/zuul/model.py index 06639f1a75..a77183c0dc 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -1771,6 +1771,11 @@ class Layout(object): if variant not in inherited: frozen_job.inheritFrom(variant) inherited.add(variant) + if not inherited: + # A change must match at least one defined job variant + # (that is to say that it must match more than just + # the job that is defined in the tree). + continue if job not in inherited: # Only update from the job in the tree if it is # unique, otherwise we might unset an attribute we