-
Notifications
You must be signed in to change notification settings - Fork 677
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
schema: add checkPlatform #491
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like these should all be errors not printf's.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They aren't errors though, since the spec only SHOULDs a platform/OS supported by runtime-spec's
platform.*
.It would be nice to have a more programmatic API for logging warnings, even if it was only “use this
Write
-supporting object to log errors” instead of hardcoding stdout, but I think that can probably happen in a follow-up commit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the specification, here should be a warning, not an error. (Although I think it should be output errors)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is a library function writing to stdout?
I am almost ready to propose a moratorium on validation until someone starts doing some engineering work. This is a huge waste of time for the maintainers and this stuff isn't passing muster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need a way to handle warnings for SHOULD violations (they aren't errors, but the caller may want to know about them). I've tried floating
strict
(#403, opencontainers/image-tools#66) and TAP comments (opencontainers/image-tools#60). And @xiekeyang has been trying to follow your guidance on this in #452. So far nobody has managed to land anything more polished than “print warnings to stdout” (and we have precedence for that approach in master). So until the image-spec maintainers decide how they want SHOULD violations handled, I think we should just roll forward withfmt.Printf("warning:…
. It will be easy enough to grep and replace once we have a better approach figured out.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wking Printing to stderr/stdout makes this package completely useless for any case where I care about program output.
Propose something that isn't broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not my project ;). I'll let you all sort this out, but it seems unfortunate to block otherwise fine PRs because they follow an established-in-master pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wking These packages are unusable in other commands that control
stderr
/stdout
. I am not sure how they slipped into master, but this is pretty bad.I am going to take a deeper look into this next week, so I'll be able to provide some better direction.