Page MenuHomePhabricator

selenium-daily-* Jenkins jobs fail with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository`
Closed, ResolvedPublic

Description

Example error message:

...
+ cd /src
+ git init
Initialized empty Git repository in /src/.git/
+ git fetch --quiet --depth 2 https://gerrit.wikimedia.org/r/p//mediawiki/core +master:master
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
Build step 'Execute shell' marked build as failure
...

Event Timeline

zeljkofilipin renamed this task from selenium-daily-betacommons-MediaWiki fails with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository` to selenium-daily-(beta)commons-MediaWiki fails with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository`.Jun 30 2020, 1:33 PM
zeljkofilipin updated the task description. (Show Details)
zeljkofilipin renamed this task from selenium-daily-(beta)commons-MediaWiki fails with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository` to selenium-daily-* Jenkins jobs fail with `fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository`.Jun 30 2020, 1:35 PM
zeljkofilipin updated the task description. (Show Details)
hashar added a subscriber: hashar.

That is an aftermath of T186496 . The releng/ci-src-setup containers now fetches with +$ZUUL_REF:$ZUUL_REF:

An empty repository defaults to pointing to `master:

.git/HEAD
ref: refs/heads/master

And when the patch targets master we thus git fetch +master:master but git refuses to do because master is the "current" branch. We need to pass --update-head-ok.

Change 608626 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] dockerfiles: allow fetch when ZUUL_REF=master

https://gerrit.wikimedia.org/r/c/integration/config/ /608626

Change 608627 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] jjb: use ci-src-setup-simple:0.4.0

https://gerrit.wikimedia.org/r/c/integration/config/ /608627

Change 608626 merged by jenkins-bot:
[integration/config@master] dockerfiles: allow fetch when ZUUL_REF=master

https://gerrit.wikimedia.org/r/c/integration/config/ /608626

Change 608636 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/mediawiki-config@master] Revert "group0 wikis to 1.35.0-wmf.39"

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/ /608636

Change 608636 merged by jenkins-bot:
[operations/mediawiki-config@master] Revert "group0 wikis to 1.35.0-wmf.39"

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/ /608636

last two comments from gerritbot can be discarded. Wrong task number.

Mentioned in SAL (#wikimedia-operations) [2020-06-30T14:38:31Z] <hashar@deploy1001> rebuilt and synchronized wikiversions files: Revert "group0 wikis to 1.35.0-wmf.39" - T256759

https://integration.wikimedia.org/ci/job/selenium-daily-beta-MediaWiki/696/ should be good now:

00:00:08.417 Status: Downloaded newer image for docker-registry.wikimedia.org/releng/ci-src-setup-simple:0.4.0
00:00:08.860 + cd /src
00:00:08.860 + git init
00:00:08.868 Initialized empty Git repository in /src/.git/
00:00:08.868 + git fetch --quiet --update-head-ok --depth 2 https://gerrit.wikimedia.org/r/p//mediawiki/core +master:master

00:00:18.574 + git checkout -B master FETCH_HEAD

00:00:19.434 Reset branch 'master'

You can rebuild the jobs that failed previously.

Change 608627 merged by jenkins-bot:
[integration/config@master] jjb: use ci-src-setup-simple:0.4.0

https://gerrit.wikimedia.org/r/c/integration/config/ /608627