Page MenuHomePhabricator

Zuul-cloner fails in mediawiki-extensions-hhvm job due to dirty VisualEditor submodule
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm/42941/console triggered in gate-and-submit pipeline from https://gerrit.wikimedia.org/r/258729

[mediawiki-extensions-hhvm] $ /bin/bash -xe /tmp/hudson456950155432289344.sh
00:11:16 + grep -q mediawiki/extensions/VisualEditor deps.txt
00:11:16 + cd src/extensions/VisualEditor
00:11:16 + git submodule update --init
00:11:18 error: Your local changes to the following files would be overwritten by checkout:
00:11:18 	AUTHORS.txt
00:11:18 	CONTRIBUTING.md
00:11:18 	Gruntfile.js
..
00:11:18 Please, commit your changes or stash them before you can switch branches.
00:11:18 error: The following untracked working tree files would be overwritten by checkout:
00:11:18 	Rakefile
00:11:18 	bin/sync-gh-pages.sh
...
00:11:18 Please move or remove them before you can switch branches.
00:11:18 Aborting
00:11:18 Unable to checkout 'c9ab407dbdfe422662c1f2a9516a627f380be169' in submodule path 'lib/ve'
00:11:18 Build step 'Execute shell' marked build as failure

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle subscribed.

The root cause is a canceled build right in the middle of the submodule update operation:
https://integration.wikimedia.org/ci/job/mediawiki-extensions-hhvm/42929/console

23:21:18 + grep -q mediawiki/extensions/VisualEditor deps.txt
23:21:18 + cd src/extensions/VisualEditor
23:21:18 + git submodule update --init
23:21:19 Build was aborted
23:21:19 Aborted by anonymous

Where anonymous is really zuul. That has left the submodule in lib/ve in a dirty space.

zuul-cloner does a reset of the repositories but that does not clean submodules.

The macro ve-submodules-update does:

if grep -q mediawiki/extensions/VisualEditor deps.txt; then
   cd src/extensions/VisualEditor
   git submodule update --init
   git submodule status
   git submodule foreach git clean -xdff -q
fi

The job does not use it though and has a specific inlined shell which is similar but look at a different txt file

if grep -q mediawiki/extensions/VisualEditor src/extensions_load.txt; then
   cd src/extensions/VisualEditor
   git submodule update --init
fi

Maybe after cd src/extensions/VisualEditor we should do a git clean with -ff.

Change 262432 had a related patch set uploaded (by Paladox):
Fix dirty VisualEditor submodule

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

Change 262432 merged by JanZerebecki:
Fix dirty VisualEditor submodule

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

Change 297126 had a related patch set uploaded (by JanZerebecki):
Fix dirty VisualEditor submodule

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

hashar claimed this task.

Should be good now.

Change 297126 merged by jenkins-bot:
Fix dirty VisualEditor submodule

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