You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We would like to set BUILDKITE_REFSPEC to our main branch and whatever branch is currently being built (assuming it is another branch). We have run into multiple issues with this where FETCH_HEAD doesn't end up pointing to the right branch and instead points at master under some circumstances, notably, if doing a rebuild. It seems like git fetch ref1 ref2 creates two lines in .git/FETCH_HEAD and then when git checkout FETCH_HEAD is done, either of the refs will be used, sometimes landing on master instead of the feature branch.
Describe the solution you'd like
A way to set narrow refspecs and have the correct branch checked out, deterministically.
Describe alternatives you've considered
We could:
Use completely custom checkout/clone logic, but that seems like a downgrade
Not use narrow refspecs (will cause some slowdown since our monorepo has thousands of branches and can be slow to update)
Possibly disable the resolve commit feature? I am unsure if this is related
Additional context
I believe we are currently using this experiment, if that is related.
The text was updated successfully, but these errors were encountered:
hey there! that is indeed spooky; there's a couple of things that could be going on here; the checkout logic in the agent is pretty complicated.
i'd recommend seeing if this is still an issue with the resolve-commit-after-checkout experiment disabled, but i'll put a ticket on our backlog to investigate this.
Is your feature request related to a problem? Please describe.
We would like to set
BUILDKITE_REFSPEC
to our main branch and whatever branch is currently being built (assuming it is another branch). We have run into multiple issues with this whereFETCH_HEAD
doesn't end up pointing to the right branch and instead points at master under some circumstances, notably, if doing a rebuild. It seems likegit fetch ref1 ref2
creates two lines in.git/FETCH_HEAD
and then whengit checkout FETCH_HEAD
is done, either of the refs will be used, sometimes landing on master instead of the feature branch.Describe the solution you'd like
A way to set narrow refspecs and have the correct branch checked out, deterministically.
Describe alternatives you've considered
We could:
Additional context
I believe we are currently using this experiment, if that is related.
The text was updated successfully, but these errors were encountered: