Open jedevc opened 9 months ago
Did a brief investigation (will probably return at some point), but this seems related to https://github.com/moby/buildkit/blob/a09112603a36532b8e44ade74ee3fd8383f4b708/source/git/source.go#L561
If I change this line to pullref += ":refs/remotes/origin/" + pullref
then instead of the output:
#6 6.950 From file:///var/lib/buildkit/runc-overlayfs/snapshots/snapshots/3/fs
#6 6.950 * [new tag] v0.12.4 -> v0.12.4
#6 6.950 * [new tag] v0.12.4 -> v0.12.4
I get:
#6 2.739 From file:///var/lib/buildkit/runc-overlayfs/snapshots/snapshots/3/fs
#6 2.739 * [new tag] v0.12.4 -> origin/v0.12.4
#6 2.739 * [new tag] v0.12.4 -> v0.12.4
And then only get the tag, and not the branch as well. But I'm not familiar enough with the refspec syntax to immediately identify why this is.
Given the following
Dockerfile
:We get the following output on a build:
Note that we clone
v0.12.4
, a tag in the https://github.com/moby/buildkit repository. However, we can see that a branchv0.12.4
has also been created, in addition to a tag. Ideally, we shouldn't do this, since this makes it an ambiguous ref.Observed against buildkit version v0.12.4 and master.
Related: