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

runtime: Require 'start' to validate the bundle #404

Closed
wants to merge 1 commit into from

Conversation

wking
Copy link
Contributor

@wking wking commented Apr 27, 2016

This spec places RFC-2119 requirements on both bundles (bundle.md,
config.md, ...) and runtimes (runtime.md, runtime-linux.md). While
it's possible to envision a system where bundle validation is
decoupled and the runtime is free to blindly stumble through as far as
it can, it's likely that users will expect the runtime to perform
basic bundle validatation for them. With the requirement landing in
this commit, the runtime MUST at least validate bundles against this
spec. The runtime MAY also validate the bundle against the host
system's capabilities, but is not required to do so.

With this change, all RFC-2119 requirements are things the runtime is
responsible for.

I'm personally ok with the decoupled-bundle-validation approach (and
we already link to ocitools and OCT for testing both runtimes and
bundles
), but figured that will be an outlier position. If we do
want to go that way (and leave runtime activity in the face of an
invalid bundle undefined), we probably want to explicitly call that
out in the ‘start’ docs to avoid surprising people.

This spec places RFC-2119 requirements on both bundles (bundle.md,
config.md, ...)  and runtimes (runtime.md, runtime-linux.md).  While
it's possible to envision a system where bundle validation is
decoupled and the runtime is free to blindly stumble through as far as
it can, it's likely that users will expect the runtime to perform
basic bundle validatation for them.  With the requirement landing in
this commit, the runtime MUST at least validate bundles against this
spec.  The runtime MAY also validate the bundle against the host
system's capabilities, but is not required to do so.

Signed-off-by: W. Trevor King <wking@tremily.us>
@crosbymichael
Copy link
Member

-1

Every runtime author should not be expected to write validation logic for every field in the spec. Lets go with the decoupled approach.

@crosbymichael
Copy link
Member

Closing since you opened the alternate approach.

@wking
Copy link
Contributor Author

wking commented May 2, 2016

On Mon, May 02, 2016 at 11:16:26AM -0700, Michael Crosby wrote:

Lets go with the decoupled approach.

Filed in #418 for folks to compare. Once one of the PRs lands, we can
close the other.

@wking wking mentioned this pull request May 26, 2016
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.

2 participants