zuul/releasenotes/notes/dependency-validation-000f63204da83b4a.yaml
James E. Blair 026de6587b Validate dependent job names
It is possible to merge an invalid Zuul config by having a dependency
on a job which does not exist (e.g., due to a typo in the job name).
If this happens, the problem will only be detected when the job graph
is frozen.  At this point, the user will need to try to find out where
the erroneus reference is defined.

To try to avoid this situation, we can validate job dependency references
early, as we do most other configuration objects (such as references to
nodesets from jobs).  This should help users avoid merging new errors.
Existing jobs and project stanzas with reference errors will become
invalid and ineffective, which may cause some collatoral damage, so a
release note is included.

This may have escaped notice so far because within a single repo,
attempting to add a bad config would trigger an error freezing the job
graph and therefore bringing the error to the attention of the user.
Having a project stanza in a config project is much more likely to
produce the issue since the job graph would not be frozen as part of
that change.

Change-Id: I196a2fb13e93847bc4db4b20f30dea8fecba6325
2022-06-15 11:28:02 -07:00

13 lines
600 B
YAML

---
fixes:
- |
Zuul now treats job dependencies that reference undefined jobs as
a configuration error. Previously a job which depended on another
job which did not exist would pass initial syntax validation and
only cause a failure in freezing the job graph when Zuul attempted
to run the job. Now incorrect or missing job dependencies are
detected during configuration. This means that new config errors
may be prevented from merging. It also means that existing
erroneous job or project configurations will be regarded as
configuration errors at startup.