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

Clarify when non-distributable layer policies should be enforced #475

Closed
stevvooe opened this issue Nov 29, 2016 · 6 comments · Fixed by #483
Closed

Clarify when non-distributable layer policies should be enforced #475

stevvooe opened this issue Nov 29, 2016 · 6 comments · Fixed by #483

Comments

@stevvooe
Copy link
Contributor

This came up in this discussion: moby/moby#28903 (comment).

For docker, the mediaType for a nondistributable layer is only enforced on push, leaving the mediaType ignored on pull. On pull, the urls field is used instead. While this specification doesn't define push and pull, we should clarify that it is important that these operations be only enforced on the correct data flow direction.

This is very subtle, but preserving this behavior ensures flexibility.

@jonboulle
Copy link
Contributor

I'm not sure we want to be any more prescriptive than what's already in https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers but feel free to tweak the wording?

@stevvooe
Copy link
Contributor Author

@jonboulle If you read back to that issue, restrictive type checking on pull can lead to inflexibility. Something like:

The nondistributable policy SHOULD only be enforced when pushing layers. URLs should only be used when pulling.

Without saying "pushing" and "pulling". Perhaps, we can define these input and output operations as part of #467. This really falls in the camp of implementation wisdom, but that kind of thing is important for a complete specification.

Again, this is subtle and I may need help with the wording. Let me know if I need to further explain the exact issue.

@wking
Copy link
Contributor

wking commented Dec 1, 2016 via email

@jonboulle
Copy link
Contributor

@stevvooe I honestly don't know exactly what you'd like to see here - IMO the existing wording is pretty clear that they can be downloaded but probably-shouldn't-be uploaded. I do agree that we can further qualify those verbs though. In any case want to put up some strawman wording we can iterate on?

@stevvooe
Copy link
Contributor Author

stevvooe commented Dec 5, 2016

The nondistributable policy SHOULD only be enforced when pushing layers. URLs should only be used when pulling.

I honestly thought the above was a solid strawman.

The implication here is that if you use urls for applying push policy, there are cases where the nondistributable policy applied will prevent usage of urls without nondistributable. Opposite to that, using the nondistributable policy for a layer type on pull, other than registering the type, will prevent systems from working where they choose not to apply the policy.

The linked PR, moby/moby#28903 (comment), attempts to do the latter, with unfortunate results.

@jonboulle Does that help to clarify?

jonboulle added a commit to jonboulle/image-spec that referenced this issue Dec 7, 2016
Attempt to clarify when non-distributable policies should be enforced
(only on upload, never on download); as discussed in + fixes opencontainers#475

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
@jonboulle
Copy link
Contributor

@stevvooe not really :-). Taken a stab in #483, ptal.

jonboulle added a commit to jonboulle/image-spec that referenced this issue Jan 6, 2017
Attempt to clarify when non-distributable policies should be enforced
(only on upload, never on download); as discussed in + fixes opencontainers#475

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
jonboulle added a commit to jonboulle/image-spec that referenced this issue Jan 9, 2017
Attempt to clarify when non-distributable policies should be enforced
(only on upload, never on download); as discussed in + fixes opencontainers#475

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
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 a pull request may close this issue.

3 participants