Page MenuHomePhabricator

Submodule not being updated in Jenkins jobs
Closed, ResolvedPublic

Description

The mwext-VisualEditor-* jobs are no longer taking the submodule into account when starting a build.

It checks out the commit of the root repository, but the submodules are stale from whatever commit/branch was last used on that slave/workspace before the bug started happening.

While all VE jobs are affected, this is most significantly affecting mwext-VisualEditor-npm because that job asserts the git checkout is clean.

https://integration.wikimedia.org/ci/job/mwext-VisualEditor-npm/

I temporarily fixed it by updating the live job config. It looks like the "Disable submodule" option no longer exists, and is now inside a "Advanced submodule options" menu. Since this sub-section did not exist in the XML, this part of the plugin was not triggered at all.

Looking at the diff you can see this is caused by the Git plugin having been upgraded and it has a breaking change.

Before:

<scm class="hudson.plugins.git.GitSCM" plugin="git@1.5.0">
  ..
  <disableSubmodules>false</disableSubmodules>
 ..
</scm>

After

<scm class="hudson.plugins.git.GitSCM" plugin="git@2.3.5">
  ..
  <extensions>
  <hudson.plugins.git.extensions.impl.SubmoduleOption>
    <disableSubmodules>false</disableSubmodules>
    ..
  ..
 ..
</scm>

jjb will need updating, and re-generating all relevant jobs.

Event Timeline

Krinkle raised the priority of this task from to Unbreak Now!.
Krinkle updated the task description. (Show Details)
Krinkle added a subscriber: Krinkle.
hashar added a subscriber: hashar.

The JJB version on integration/jenkins-job-builder is at the commit just before Update git-submodule configuration to new extension style.

It changes JJB syntax https://review.openstack.org/#/c/148057/6/tests/scm/fixtures/git-submodule01.yaml but style recognize the current one.

Gotta update our JJB copy and update our yaml config files.

I have updated integration/jenkins-job-builder to e3199d9

Change 215335 had a related patch set uploaded (by Hashar):
Update Git plugin configuration

https://gerrit.wikimedia.org/r/215335

Further updated JJB from e3199d9 to c7231fe

Now gotta merge in https://gerrit.wikimedia.org/r/#/c/215335/ and refresh all the jobs :-/

Finished too late, had some meetings in the evening. So will process updating jobs carefully tomorrow morning.

Change 215335 merged by jenkins-bot:
Update Git plugin configuration

https://gerrit.wikimedia.org/r/215335

I have refreshed all the jobs. Should be fine now.

I sent a mail to the qa list to have people to update their JJB installation from our fork.

Krinkle reopened this task as Open.EditedJun 4 2015, 12:40 AM

Hm.. that didn't fix it. A couple days ago I updated the VE job config on Jenkins to re-enable the submodule handling (using the newer git plugin version).

It looks like your deployment didn't use the newer git config. Instead, it did the opposite and deployed the old code again. This diff removed the hudson.plugins.git.extensions.impl.SubmoduleOption extension and adds the old <disableSubmodules>false</disableSubmodules> back.
https://integration.wikimedia.org/ci/job/mwext-VisualEditor-npm/jobConfigHistory/showDiffFiles?timestamp1=2015-06-01_22-24-01&timestamp2=2015-06-03_12-14-50

https://integration.wikimedia.org/ci/job/mwext-VisualEditor-npm/

Screen Shot 2015-06-04 at 01.38.04.png (1×1 px, 307 KB)

I've reverted the job config update to mwext-VisualEditor-npm on Jenkins for now.

The mwext-VisualEditor-npm job is generated using:

template: '{name}-{ext-name}-npm'
defaults: use-remoteonly-zuul
scm macro: git-remoteonly-zuul

And that macro does not proceed submodules.

The template has a comment stating it is only used by VE, but it is also used by Wikibase extension, though that last one has no submodule and could use the regular npm job.

So I am going to:

  • switch Wikibase to use the npm job
  • make the mwext-Wikibase-npm a job instead of a job-template

Change 215875 had a related patch set uploaded (by Hashar):
Switch Wikibase to the generic npm job

https://gerrit.wikimedia.org/r/215875

Change 215876 had a related patch set uploaded (by Hashar):
Switch WikidataQuality to the generic npm job

https://gerrit.wikimedia.org/r/215876

Change 215875 merged by jenkins-bot:
Switch Wikibase to the generic npm job

https://gerrit.wikimedia.org/r/215875

Change 215876 merged by jenkins-bot:
Switch WikidataQuality to the generic npm job

https://gerrit.wikimedia.org/r/215876

Change 215888 had a related patch set uploaded (by Hashar):
Force JJB to use new git submodule syntax

https://gerrit.wikimedia.org/r/215888

Change 215893 had a related patch set uploaded (by Hashar):
Force JJB to use new git submodule syntax (2)

https://gerrit.wikimedia.org/r/215893

Change 215888 merged by jenkins-bot:
Force JJB to use new git submodule syntax

https://gerrit.wikimedia.org/r/215888

Change 215893 merged by jenkins-bot:
Force JJB to use new git submodule syntax (2)

https://gerrit.wikimedia.org/r/215893

All blame goes to JJB :-D We have to set a submodule parameter to trigger the proper config :/