Skip to content

git url: ?checksum=<SHORT> fails (while ?tag=<TAG>&checksum=<SHORT> and ?checksum=<LONG> work) #6175

@AkihiroSuda

Description

@AkihiroSuda

Contributing guidelines and issue reporting guide

Well-formed report checklist

  • I have found a bug that the documentation does not mention anything about my problem
  • I have found a bug that there are no open or closed issues that are related to my problem
  • I have provided version/information about my environment and done my best to provide a reproducer

Description of bug

Bug description

In the git url queries (#6172), ?checksum=<SHORT> fails, while ?tag=<TAG>&checksum=<SHORT> and ?checksum=<LONG> work

Reproduction

FROM scratch
ADD https://github.com/moby/buildkit.git?checksum=66735c67 /buildkit

# The following variants do not fail:
# ADD https://github.com/moby/buildkit.git?tag=v0.21.1&checksum=66735c67 /buildkit
# ADD https://github.com/moby/buildkit.git?checksum=66735c67040bc80e6ed104f451683e094030a4e1 /buildkit
$ sudo buildctl build --frontend dockerfile.v0 --local dockerfile=. --local context=.
[+] Building 0.9s (3/4)                                                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                                                    0.0s
 => => transferring dockerfile: 1.00kB                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                         0.0s
 => ERROR [1/1] ADD https://github.com/moby/buildkit.git?checksum=66735c67 /buildkit                                                                                    0.8s
------                                                                                                                                                                       
 > [1/1] ADD https://github.com/moby/buildkit.git?checksum=66735c67 /buildkit:
0.004 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/65/fs/
------
error: failed to solve: failed to load cache key: repository does not contain ref 66735c67, output: ""

Version information

99a9103129006338eb86a8b2ca553d1bb5c11037

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions