phase1: builds on clean workers always fail on gitverify step
ynezz opened this issue · 0 comments
ynezz commented
Following build step utilizing Git()
stock buildbot build step when performed on a clean worker:
factory.addStep(Git(
name = "git",
repourl = repo_url,
mode = 'full',
method = 'fresh',
locks = NetLockDl,
haltOnFailure = True,
))
leaves the cloned Git repository in the detached HEAD state and consecutive gitverify
check thus always fail:
git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || git show-ref --tags --dereference 2>/dev/null | sed -ne "/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."
So every first build on ephemeral VPS results in a failure, each second build then goes fine as Git()
checkouts the branch correctly.
Output of the Git() step on a fresh worker, 1st build (BAD case)
git --version
in dir /builder/master_bcm47xx_mips74k/build (timeout 1200 secs)
...
git version 2.30.2
program finished with exit code 0
...
stat: No such file or directory: /builder/master_bcm47xx_mips74k/build/.buildbot-patched
program finished with exit code 0
git clone --branch master https://git.openwrt.org/openwrt/openwrt.git . --progress
in dir /builder/master_bcm47xx_mips74k/build (timeout 1200 secs)
...
program finished with exit code 0
elapsedTime=17.474384
git checkout -f 466be0612aaed4034e15095b9fc63ce4cd99b87a
in dir /builder/master_bcm47xx_mips74k/build (timeout 1200 secs)
...
Note: switching to '466be0612aaed4034e15095b9fc63ce4cd99b87a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
...
HEAD is now at 466be0612a e2fsprogs: fix compilation with musl 1.2.4
program finished with exit code 0
elapsedTime=0.453183
git rev-parse HEAD
...
466be0612aaed4034e15095b9fc63ce4cd99b87a
program finished with exit code 0
elapsedTime=0.008105
Output of the Git() step on a fresh worker, 2nd build (GOOD case)
git --version
in dir /builder/master_malta_be/build (timeout 1200 secs)
...
git version 2.30.2
program finished with exit code 0
elapsedTime=0.007659
program finished with exit code 2
stat: No such file or directory: /builder/master_malta_be/build/.buildbot-patched
program finished with exit code 0
git clean -f -f -d -x
in dir /builder/master_malta_be/build (timeout 1200 secs)
...
program finished with exit code 0
elapsedTime=0.048432
git cat-file -e 466be0612aaed4034e15095b9fc63ce4cd99b87a
in dir /builder/master_malta_be/build (timeout 1200 secs)
...
program finished with exit code 0
elapsedTime=0.007559
git checkout -f 466be0612aaed4034e15095b9fc63ce4cd99b87a
in dir /builder/master_malta_be/build (timeout 1200 secs)
...
HEAD is now at 466be0612a e2fsprogs: fix compilation with musl 1.2.4
program finished with exit code 0
elapsedTime=0.049798
git checkout -B master
in dir /builder/master_malta_be/build (timeout 1200 secs)
...
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.
program finished with exit code 0
elapsedTime=0.052273
git rev-parse HEAD
...
466be0612aaed4034e15095b9fc63ce4cd99b87a
program finished with exit code 0
elapsedTime=0.007634