Page MenuHomePhabricator

Clarification/documentation needed with relation to branches and tests run via Jenkins
Closed, ResolvedPublic


I noticed when creating a dev branch on Gather that Jenkins tests suddenly began failing. The errors suggested old code (PS1 -

I noticed a dev branch existed on MobileFrontend and reading the logs it seemed to be used (10:32:03 DEBUG:zuul.Cloner:upstream repo has branch dev [1]). When deleting it and recreating it the tests magically passed.

My logic and reading of the Jenkins reports says that tests running on the dev branch of Gather were also running using the dev branch of MobileFrontend. If this is true that is awesome, but it's not documented anywhere. Could someone point me at some documentation if this is not true or clarify the situation if it is?


Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Jdlrobson, phuedx.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 21 2015, 8:09 PM
greg set Security to None.

Jobs that have multiple repositories tends to use zuul-cloner which for each repositories attempt to checkout the branch of the proposed patchset.

The formal introduction took the form of a RFC in October 2014 and you pushed to get the multiple clone enabled for the mobile devices (i.e. Gather and MobileFrontend among others are tested together). Side effect: branches are matched :-}

Upstream has some overview (disclaimer I wrote the original version of that doc).

From the console log of a job triggered by a patch against Gather@dev, you can search for has branch dev. That yields the two following blocks of logs:

INFO:zuul.Cloner:Creating repo mediawiki/extensions/Gather from upstream
DEBUG:zuul.Repo:Updating repository src/extensions/Gather
DEBUG:zuul.Cloner:upstream repo has branch dev
DEBUG:zuul.Cloner:Fetched ref refs/zuul/dev/Zb5c5d5c41c36484aa2f66c7d85cc7831 from mediawiki/extensions/Gather
DEBUG:zuul.Repo:Checking out ae6134b332cd870ee85d10e213b085d0bd057842
INFO:zuul.Cloner:Prepared mediawiki/extensions/Gather repo with commit ae6134b332cd870ee85d10e213b085d0bd057842

Where refs/zuul/dev/Zb5c5d5c41c36484aa2f66c7d85cc7831 is a merge of the patchset on the tip of the dev branch.

INFO:zuul.Cloner:Creating repo mediawiki/extensions/MobileFrontend from upstream
DEBUG:zuul.Repo:Updating repository src/extensions/MobileFrontend
DEBUG:zuul.Cloner:upstream repo has branch dev
DEBUG:zuul.Cloner:Project mediawiki/extensions/MobileFrontend in Zuul does not have ref refs/zuul/dev/Zb5c5d5c41c36484aa2f66c7d85cc7831
DEBUG:zuul.Cloner:Falling back to branch dev
DEBUG:zuul.Repo:Checking out remotes/origin/dev
INFO:zuul.Cloner:Prepared mediawiki/extensions/MobileFrontend repo with branch dev

zuul-cloner tries to fetch the same reference that has been crafted for Gather (refs/zuul/dev/Zb5c5d5c41c36484aa2f66c7d85cc7831), that is the case in gate-and-submit if one had +2 ed a change for MobileFrontend before the Gather one so this way we can test a change made to MobileFrontend which is ahead in the queue and not yet merged.

It fails to find such ref and fall back to matching the branch dev that is the branch of Gather.

What this also mean is if you propose a patch to REL1_26, core/skins/extensions etc are all checked out at REL1_26 :-}

@Jdlrobson if you have any idea of a good place to document all of that mess I am willing to take advices / tips. I am very badly organized overall and there are doc bits all over the web :-\

There is also mail I posted on the QA list.

[QA] How Zuul gating works (on +2)

Thanks this is super useful and good to know! Looks like there is lots of documentation and we'll just need to find a good place on wiki.

I'll have a think about how to document this!

Jdlrobson closed this task as Resolved.Oct 26 2015, 8:13 PM

@hashar I had no ideas where to put this so I just put it on our release process documentation for the time being - - so this phabricator task can at least do the job of documenting.

Thanks so much for the detailed information!

Good enough for now I guess :-} Thank you @Jdlrobson!