Opened 5 years ago

Last modified 16 months ago

#2548 new defect

Git builder silently drops back to HEAD (master) if a branch isn't found

Reported by: chmorgan Owned by:
Priority: major Milestone: undecided
Version: 0.8.6p1 Keywords: git
Cc:

Description

There is no option to cause a git builder to fail if the specified branch isn't found. We've had several cases where people have plugged in an invalid branch, or a partial sha in place of the branch field and gotten the wrong build.

The build runs and completes without error but you can see from the log that it didn't do what was expected:

...
Cloning into '.'...
warning: Remote branch aa7391a not found in upstream origin, using HEAD instead
...

Change History (3)

comment:1 Changed 5 years ago by dank

This burnt me today.

In my case, on ubuntu, the warning was

git version 1.7.0.4
...
git clone --branch rel-3.10 --recursive git.oblong.com:/ob/git/repo/staging.git .
warning: Remote branch rel-3.10 not found in upstream origin, using HEAD instead

Happily, one of my bots did notice and fail. The good bot is running git 1.8.0.2, installed with 'sudo port install git-core'.

git version 1.8.0.2
...
git clone --branch rel-3.10 --recursive git.oblong.com:/ob/git/repo/staging.git .
Cloning into '.'...
fatal: Remote branch rel-3.10 not found in upstream origin

So perhaps this is fixed in git-1.8 and higher?

comment:2 Changed 5 years ago by dustin

Hopefully - that would make this an easy fix for Buildbot!

comment:3 Changed 16 months ago by ahammond

I think I'm seeing a similar problem, except on the buildmaster. I see a SourceStamp with branch: HEAD. My hypothesis is that our Stash server is overloaded that's where the problem is coming from.

Last edited 16 months ago by sa2ajj (previous) (diff)
Note: See TracTickets for help on using tickets.