docs/spec: catalog V2 API specification proposal#583
docs/spec: catalog V2 API specification proposal#583stevvooe wants to merge 2 commits intodistribution:masterfrom
Conversation
|
On Mon, Jun 01, 2015 at 07:15:23PM -0700, Stephen Day wrote:
To reduce load on the server from unlimited requests on large sets, it You likely also want to return an envelope or header parameter with a The decision to use ‘last’ instead of an integer offset (like |
docs/spec/api.md
Outdated
This specification leaves that to the server and client. A server can always refuse a client without support. Please note that catalog listing will always be hidden by admin privileges (or maybe a listing scope), since it may expose registry wide data.
How would one implement this efficiently with the current backend layout and storage driver system? Perhaps, this is something we specify and don't implement.
The issue with an integer index is that it requires the server assign rank to the results. In the face of a changing data set, rank is always changing where as a "pivot" is a property of the data. Forcing this problem on the client just moves it some where it cannot be addressed. The registry may not even have a full few of its dataset to calculate the rank properly. |
docs/spec/api.md.tmpl
Outdated
There was a problem hiding this comment.
👍 on using a header, the property is similar to Location and Range
28302c3 to
db2366a
Compare
|
Looks good. +1 |
|
On Tue, Jun 02, 2015 at 04:00:38PM -0700, Stephen Day wrote:
If server implementations can optionally not support the unlimited
Ah, good point. So I guess relying on well-behaved clients to not
The current filesystem driver already has a len(fileNames) call 1,
Yeah. I guess the issue is how you expect storage backends to scale |
I added this to cover that. This endpoint can be protected by access control or just return an empty result. |
|
On Wed, Jun 03, 2015 at 06:27:47PM -0700, Stephen Day wrote:
That helps, but it only mentions authorization an upstream concerns. |
|
@wking I'm not sure that belongs in the specification. Please provide updated language for that part if you believe it should be changed. Perhaps, we can have an option to redirect to the paginated version but that is not really the same resource. No matter what, this is an inefficient endpoint. Most applications would be better served by accessing the storage backend directly, but no one seems willing to do this. It's unfortunate, since we took measures to make the layout very approachable. Clearly, this was a poor trade off. |
|
On Thu, Jun 04, 2015 at 11:30:15AM -0700, Stephen Day wrote:
Yeah, I guess I'd just only have the paginated version in the spec.
It seems worthwile to have a way to write backend-agnostic admin Of course, you could also get the backend-agnostic API by making the (registry-client) →{registry API}→ (registry) →{storage-API}↘ But for storage-drivers built on sufficiently atomic drivers/storage, (registry-client) →{registry API}→ (registry →{storage API}→ storage-driver) ↘ with both storage-drivers running on the same backing storage. |
Label/Metadata inspection(formerly #600) This proposal adds metadata inspection into the catalog API. The endpoint could be like: The body of the request would contain specification which metadata to return, as well as the pagination information specified above.
The catalogue would return one record per each tag in the repository: Request: (jq examplet) Since the filtering could possibly end up with large amounts of data, I think that it would be sane to limit the response size to, say, 8kb per record (or some empiric ratio between average manifest size). |
|
@shaded-enmity This is completely outside of the scope and context of this proposal. As stated in #600, the registry provides access to data. It has no facilities for indexing and collating data except under its primary key (tag, name, digest, etc.). Adding such functionality is a massive departure from those design goals. |
d74240d to
63af0b9
Compare
This contains a proposal for a catalog API, provided access to the internal contents of a registry instance. The API endpoint is prefixed with an underscore, which is illegal in images names, to prevent collisions with repositories names. To avoid issues with large result sets, a paginated version of the API is proposed. We make an addition to the tags API to support pagination to ensure the specification is conistent. Signed-off-by: Stephen J Day <stephen.day@docker.com>
Move the specification to use a Link header, rather than a "next" entry in the json results. This prevents requiring clients from parsing the request body to issue the next request. It also ensures that the returned response body does not change in between requests. The ordering of the specification has been slightly tweaked, as well. Listing image tags has been moved after the catalog specification. Tag pagination now heavily references catalog pagination. Signed-off-by: Stephen J Day <stephen.day@docker.com>
63af0b9 to
777c0fb
Compare
|
Closed in favor of #653. |
This contains a proposal for a catalog API, provided access to the internal
contents of a registry instance. The API endpoint is prefixed with an
underscore, which is illegal in images names, to prevent collisions with
repositories names. To avoid issues with large result sets, a paginated version
of the API is proposed. We make an addition to the tags API to support
pagination to ensure the specification is consistent.
Closes #441, #382.
Signed-off-by: Stephen J Day stephen.day@docker.com
cc @dmp42 @dmcgowan @ncdc @pdevine