Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Digest sha256:(...) not in repository (...) #1

Closed
awoimbee opened this issue Jan 19, 2022 · 1 comment · Fixed by Trow-Registry/trow#314
Closed

Digest sha256:(...) not in repository (...) #1

awoimbee opened this issue Jan 19, 2022 · 1 comment · Fixed by Trow-Registry/trow#314

Comments

@awoimbee
Copy link
Collaborator

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
This happens on multiple repositories, the latest problematic one is:
docker pull ${trow}/f/ghcr/extrality/cert-manager-webhook-namecheap
Error:

[2022-01-19T10:44:34Z WARN  trow_server::server] Internal error with manifest ErrorMessage { msg: "Digest sha256:1cbb4dc8437d49f51a11bdbbebff3bd494a1f81a40deedd93db2c9af9d433be1 not in repository f/ghcr/extrality/cert-manager-webhook-namecheap" }

Output/Logs

trow@trow-0:/$ find /data -type f
/data/blobs/sha256/2d43812b78e05191d8ea9a2842038fb76c2d8bce3c1807e7e35d06dcf59a2411
/data/blobs/sha256/1cbb4dc8437d49f51a11bdbbebff3bd494a1f81a40deedd93db2c9af9d433be1
/data/blobs/sha256/c1298fbe9336228581b480658f43accb94730c6d4c856a641e78e8e6dad47678
/data/manifests/f/ghcr/extrality/cert-manager-webhook-namecheap/latest
trow@trow-0:/$ find /data -type f | xargs -i sh -c "echo '->' {} && cat {}"
-> /data/blobs/sha256/2d43812b78e05191d8ea9a2842038fb76c2d8bce3c1807e7e35d06dcf59a2411
{
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "schemaVersion": 2,
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "digest": "sha256:1cbb4dc8437d49f51a11bdbbebff3bd494a1f81a40deedd93db2c9af9d433be1",
         "size": 950,
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "digest": "sha256:c1298fbe9336228581b480658f43accb94730c6d4c856a641e78e8e6dad47678",
         "size": 950,
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}
-> /data/blobs/sha256/1cbb4dc8437d49f51a11bdbbebff3bd494a1f81a40deedd93db2c9af9d433be1
{"errors":[{"code":"BLOB_UNKNOWN","message":"blob unknown to registry"}]}
-> /data/blobs/sha256/c1298fbe9336228581b480658f43accb94730c6d4c856a641e78e8e6dad47678
{"errors":[{"code":"BLOB_UNKNOWN","message":"blob unknown to registry"}]}
-> /data/manifests/f/ghcr/extrality/cert-manager-webhook-namecheap/latest
sha256:2d43812b78e05191d8ea9a2842038fb76c2d8bce3c1807e7e35d06dcf59a2411 2022-01-19T10:43:09.335275741Z

Trow Info

@awoimbee
Copy link
Collaborator Author

This issue does not affect the docker hub repository, so it doesn't affect the upstream Trow version.
Here is the bug:

  • Trow reads every digest inside a manifest and treats them as blobs.
    for digest in mani.get_local_asset_digests() {
  • Turns out that a Manifest can return other manifest digests. Returning digests without context (are they blobs ? manifests ?) is a problem !
    Manifest::List(ref list) => {

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant