buildkit
buildkit copied to clipboard
fatal: Not a valid object name
#3 0.682 hint: Using 'master' as the name for the initial branch. This default branch name
#3 0.682 hint: is subject to change. To configure the initial branch name to use in all
#3 0.682 hint: of your new repositories, which will suppress this warning, call:
#3 0.682 hint:
#3 0.682 hint: git config --global init.defaultBranch <name>
#3 0.682 hint:
#3 0.682 hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
#3 0.682 hint: 'development'. The just-created branch can be renamed via this command:
#3 0.682 hint:
#3 0.682 hint: git branch -m <name>
#3 0.702 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/300/fs/
#3 0.856 fatal: Not a valid object name dd142c005ca6e2decf64b7e295e0f858d6195820^{commit}
#3 3.071 From https://github.com/tekumara/ghapp-dagger
#3 3.071 * [new branch] main -> origin/main
completed duration=3.5s
when tying to solve:
llb.Git("https://github.com/tekumara/ghapp-dagger.git", "dd142c005ca6e2decf64b7e295e0f858d6195820")
Looks like it's fetching the correct git ref, but produces a fatal error in the logs.
Did the remote definitely have that commit pushed at the time? What was the buildx command that was run?
Yep it did have that commit, and it correctly fetches it. I was actually running this via dagger, not buildx.
The log is coming from here:
https://github.com/moby/buildkit/blob/5ab03b48ac5f819cbbda2e76376a646e6d55d849/source/git/gitsource.go#L428-L433
Looks like just noisy logs coming from an optimization.
Confirming this is reproducible, and seems to be just extraneous logging. The commit does exist, and the git operation is succesful.
It only happens when using a commit ref (eg: not happening if using a tag / branch).
#1 git://github.com/XXXX.git#ad41d95d0f171f6b8908b7d1aedcc3b5f83d11c2
#0 0.031 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#0 0.080 fatal: Not a valid object name ad41d95d0f171f6b8908b7d1aedcc3b5f83d11c2^{commit}
I am using llb directly.