Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag pagination #470

Merged
merged 1 commit into from May 9, 2024
Merged

Conversation

sudo-bmitch
Copy link
Contributor

@sudo-bmitch sudo-bmitch commented Sep 23, 2023

Registries must still support the n=100 and last query parameters. Clients may use the Link header.
When registries cannot return all requested tags, an error must be returned.

This adds support for the Link header, and prefers it when available. Registries returning the Link header may return fewer than the requested number of tags per request.

Fixes #461.

spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
@sudo-bmitch sudo-bmitch force-pushed the pr-tag-pagination branch 2 times, most recently from b0b7fb0 to ac58658 Compare September 28, 2023 19:09
spec.md Outdated Show resolved Hide resolved
@sudo-bmitch
Copy link
Contributor Author

There is a proposal to replace this with #496.

@haampie
Copy link

haampie commented Mar 12, 2024

Why is this not merged after so many months? It's pretty obvious the current spec is broken and should be fixed.

spec.md Outdated Show resolved Hide resolved
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest avoiding promotion of the somewhat arbitrary number to a SHOULD value..

Also suggest allowing the maximum limit for the number of requests to be determined for a particular request.. Thus suggest not limiting with MUST language that a registry may have only one maximum limit.

spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Outdated Show resolved Hide resolved
spec.md Show resolved Hide resolved
Updating tag listing to prefer the Link header.
This aligns with the behavior of actual registries, but will break clients implementing the current spec.
Breaking the spec was preferred over breaking existing registries and clients that work with them.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch
Copy link
Contributor Author

sudo-bmitch commented Apr 4, 2024

Documenting the community decision made today:

We are making a breaking change to clients that followed the spec to document the majority of real world implementations. There are three different groups of clients to consider:

  • Clients that strictly followed the spec.
  • Clients that implemented the Link header.
  • Clients that would quickly update to any change we make to the spec.

The community felt that the second group was larger than the first, and did not want to break those users even if it meant the first group would be silently broken.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sudo-bmitch sudo-bmitch merged commit 2ed79d9 into opencontainers:main May 9, 2024
4 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-tag-pagination branch May 9, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag list API should include pagination
7 participants