Page MenuHomePhabricator

Zuul: project-templates override defined project jobs
Closed, ResolvedPublic

Description

The project-template feature I wrote is bugged. It was supposed to merge defined jobs with the one defined by a template but it is overwriting them:

Example:

  • name: mediawiki/tools/release check-voter:
    • mw-tools-release-phplint template:
    • name: 'python-lint' prefix: 'mw-tools-release'

That will only generate the jobs from the template and discard the phplint job.

The root cause is in Zuul scheduler:

  1. Finally merge the expansion with whatever has been already
  2. defined for this project config_project.update(expanded)

dict.update() does not do a recursive merge. We need a new function that will recursively merge all values being dicts.


Version: wmf-deployment
Severity: normal

Details

Reference
bz50112

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:59 AM
bzimport set Reference to bz50112.
bzimport added a subscriber: Unknown Object (MLST).

Related URL: https://gerrit.wikimedia.org/r/70199 (Gerrit Change Ib4371a26c7ea86711beb70800356a899805fd7ed)

Low priority, there is a workaround. Will revisit Zuul bugs once we upgraded production to the latest version of Zuul (that will happen by the end of November).

The upstream change has been merged in and our Zuul version now includes it. We already have a few project using that feature (template + jobs being added).