Ian Wienand 6439b16c04 Fix manifest HEAD response when looking up by label
Prior change Iaf6b83b61a470e8c5a61d18b7c241f9ca002c08a contained a bug
that and was returning an blank Content-Length for manifest HEAD
queries.  For this case, we have already read() the blob so we can
just return it's length for the HEAD query.

(the extant code was wrong for this case and self.storage.blob_size
was returning None, which got turned into 0 silently.  This leads to
the client reporting:

 failed commit on ref "manifest-sha256:ad38c...": unexpected commit digest
 sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,
 expected  sha256:ad38c... failed precondition

I put this in for anyone googling who is seeing that e3b0c4... hash;
it's a clue that somehow you're trying to hash something empty.  This
slipped through because I tested pulling images, which worked, but it
fails when pulled in by docker build).

Change-Id: I7218843879ecd7939730060b6cee18af8190b888
2021-09-17 16:32:51 +10:00
2021-09-14 05:54:50 +00:00
2019-09-19 16:08:44 +00:00
2021-07-06 17:27:57 -07:00
2019-10-02 13:50:42 -04:00
2019-09-20 09:53:42 -07:00
2020-05-05 09:24:01 -05:00
2019-10-02 13:50:42 -04:00
2019-10-01 08:09:55 -07:00

Zuul Registry

This is a container image registry for use with the Zuul project gating system.

The defining feature of this registry is support for shadowing images: it allows you to upload a local version of an image to use instead of an upstream version. If you pull an image from this registry, it will provide the local version if it exists, or the upstream if it does not.

This makes it suitable for use in a Zuul-driven speculative image pipeline.

The latest documentation for Zuul is published at: https://zuul-ci.org/docs/

Getting Help

There are two Zuul-related mailing lists:

zuul-announce

A low-traffic announcement-only list to which every Zuul operator or power-user should subscribe.

zuul-discuss

General discussion about Zuul, including questions about how to use it, and future development.

You will also find Zuul developers in the #zuul channel on Freenode IRC.

Contributing

To browse the latest code, see: https://opendev.org/zuul/zuul-registry To clone the latest code, use git clone https://opendev.org/zuul/zuul-registry

Bugs are handled at: https://storyboard.openstack.org/#!/project/zuul/zuul-registry

Suspected security vulnerabilities are most appreciated if first reported privately following any of the supported mechanisms described at https://zuul-ci.org/docs/zuul/user/vulnerabilities.html

Code reviews are handled by gerrit at https://review.opendev.org

After creating a Gerrit account, use git review to submit patches. Example:

# Do your commits
$ git review
# Enter your username if prompted

Join #zuul on Freenode to discuss development or usage.

License

Zuul-registry is free software licensed under the General Public License, version 3.0.

Python Version Support

Zuul requires Python 3. It does not support Python 2.

Description
A speculative container registry
Readme 1.2 MiB
Languages
Python 97.4%
Dockerfile 1.3%
Shell 1.3%