Last modified: 2013-06-03 20:17:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49847, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47847 - Zuul: Job name regex is a bit confusing
Zuul: Job name regex is a bit confusing
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-29 21:38 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-06-03 20:17 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2013-04-29 21:38:43 UTC
To make the mwext-Parsoid-jslint voting, I had to remove the beginning/end regex markers:

-  - name: ^mwext-Parsoid-jslint$
+  - name: mwext-Parsoid-jslint
     voting: true

https://gerrit.wikimedia.org/r/#/c/61478/


Seems a bit strange to me. There must be some whitespace issue somewhere.
Comment 1 C. Scott Ananian 2013-04-29 22:03:25 UTC
From looking at the xuul source code, the best diagnosis I can come up with is:

layout.yaml is parsed around line 129 of zuul/scheduler.py, starting with "job = self.getJob(config_job['name'])"

The getJob() function reads:

    def getJob(self, name):
        if name in self.jobs:
            return self.jobs[name]
        job = Job(name)
        if name.startswith('^'):
            # This is a meta-job
            regex = re.compile(name)
            self.metajobs[regex] = job
        else:
            # Apply attributes from matching meta-jobs
            for regex, metajob in self.metajobs.items():
                if regex.match(name):
                    job.copy(metajob)
            self.jobs[name] = job
        return job

So if the name starts with a ^ its a metajob.  Metajob properties are copied to named jobs, but *only when the job is first encountered/created*.  My best guess is that using ^mwext-Parsoid-jslint$ creates a metajob, but the mwext-Parsoid-jslint job has already been created at that point, so the metajob properties are never applied to the job.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links