Le 03/12/2015 02:17, Jon Robson a écrit :
This doesn't seem to work for
https://gerrit.wikimedia.org/r/#/c/238992/
Any ideas why? Is it because the Gather patch is on a different branch
or because I'm not using the commit message right?
Hello,
Indeed the patch from Gather dev branch is not found, because the job
consider the branch to be 'master'.
Long read, one feel free to copy to the wiki!
context
=======
https://gerrit.wikimedia.org/r/#/c/238992/
MobileFrontend patch against master
It relies on some Javascripts introduced in Gather dev branch by:
https://gerrit.wikimedia.org/r/#/c/250826/
The job mediawiki-extensions-qunit on MobileFrontend fail. That job
clones a subset of extensions deployed on Wikimedia cluster and run the
whole QUnit test suite.
What Zuul does?
===============
Prepare patches
---------------
When the patch for MobileFrontend is received, Zuul detects it depends
on the Gather change and thus build the dependency chain. It then ask
for zuul-merger to craft merge commits for each patches against the tip
of their branches and tag them. The output from the merge system is:
CreateZuulRef dev/Zfb21011d8e154089a0657b3a419d739e on Gather
CreateZuulRef master/Zfb21011d8e154089a0657b3a419d739e on MobileFrontend
The refs are prefixed with the branch the patch has been merged against.
Note the ideas are the same, that is the unique identifier for this
specific build.
The references are exposed in git under refs/zuul/*
Retrieval of refs
-----------------
Zuul triggers the builds with the parameters:
ZUUL_REF=refs/zuul/master/Zfb21011d8e154089a0657b3a419d739e
ZUUL_BRANCH=master
'master' because that is the tip of MobileFrontend.
zuul-cloner takes care of cloning the repositories and checking out the
patch / branch. The order of lookups are:
1) Zuul reference for the indicated branch
2) Zuul reference for the master branch
3) The tip of the indicated branch
4) The tip of the master branch
Ref:
http://docs.openstack.org/infra/zuul/cloner.html#clone-order
Where "indicated branch" is ZUUL_BRANCH or 'master'.
When looking at the zuul-cloner output:
Creating repo mediawiki/extensions/Gather
upstream repo has branch master
does not have ref refs/zuul/master/Zfb21011d8e154089a0657b3a419d739e
Falling back to branch master
Checking out remotes/origin/master
The master/Z... ref is not found for Gather cause the patch was againt
dev branch and the actual ref is dev/Z... So it fallback to master and
your patch is not included.
Creating repo mediawiki/extensions/MobileFrontend from upstream
upstream repo has branch master
Fetched ref refs/zuul/master/Zfb21011d8e154089a0657b3a419d739e
What??
------
Since MobileFrontend@master is tested with Gather@master, one would need
the patch to dev to be cherry picked to master and that would work.
The same issue will occur for Gather@dev, other repositories will use
the tip of master since dev branches do not exists.
You can override the branch either for all projects (--branch) or on a
per project basis (--project-branch). So in theory, we could have a
second job that properly fetch from dev, but the other job will still fail.
What do I do now?
-----------------
Once your Gather patch in 'dev' is reviewed and merged, you can cherry
pick against master (the Change-Id will be the same). Then 'recheck' the
MobileFrontend patch which should be happy. You can +2 it, it is not
going to merge till the change to Gather is merged in master.
Then, we can cut the wmf branches, deploy on the cluster with high
confident and process with the next feature :-}
cheers,
--
Antoine "hashar" Musso