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

config: Explicily make consoleSize unspecified if terminal is false or unset #863

Merged

Conversation

wking
Copy link
Contributor

@wking wking commented May 26, 2017

The old language is from #563, where nobody commented on the “if attached” wording. But reading the old line now, it's not clear to me what consoleSize means when terminal is not true.

This commit explicitly declares consoleSize unspecified in that condition, so runtimes are free to do what they want short of erroring out. I considered making the property undefined or requiring it to be unset, but those seemed too strict given our permissive “MUST ignore unknown properties” extensibility requirement.

@wking
Copy link
Contributor Author

wking commented May 31, 2017

I don't think the old language is clear enough for me to make a call about whether this is a breaking change (and therefore should happen before 1.0) or not. If maintainers feel like the old language is clear enough to make that call, they can probably just close this with a “this is already clear enough” comment (although I'd personally like them to also include a longer description about what the old language means, since it's not clear to me).

If maintainers agree that the old language is unclear, then I think we want to land something to clear this up before 1.0, whether it's this PR or a maintainer-authored PR.

@wking wking force-pushed the console-size-if-attached branch from f4255fb to 29074b4 Compare June 1, 2017 15:35
@wking
Copy link
Contributor Author

wking commented Jun 1, 2017

Rebased around #846 with f4255fb29074b4.

config.md Outdated
@@ -137,7 +137,8 @@ For all platform-specific configuration values, the scope defined below in the [

* **`terminal`** (bool, OPTIONAL) specifies whether a terminal is attached to that process, defaults to false.
As an example, if set to true on Linux a pseudoterminal pair is allocated for the container process and the pseudoterminal slave is duplicated on the container process's [standard streams][stdin.3].
* **`consoleSize`** (object, OPTIONAL) specifies the console size in characters of the terminal if attached, containing the following properties:
* **`consoleSize`** (object, OPTIONAL) specifies the console size in characters of the terminal.
`consoleSize` is unspecified if `terminal` is `false` or unset.
Copy link
Member

Choose a reason for hiding this comment

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

Please change unspecified to ignored

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please change unspecified to ignored

Done with 29074b4ed6c9ef, which shuffles some words to make it clear that it is the runtime that must be doing the ignoring.

@mrunalp mrunalp added this to the 1.0.0 milestone Jun 1, 2017
…r unset

The old language is from a502caf (config: Add consoleSize to process,
2016-09-14, opencontainers#563), where nobody commented on the "if attached" wording
[1].  But reading the old line now, it's not clear to me what
consoleSize means when terminal is not true.

This commit explicitly declares consoleSize ignored in that condition.
I'd rather have made it unspecified, so runtimes are free to do what
they want short of erroring out, but Michael wanted the more specific
"ignored" [2].  I considered making the property undefined or
requiring it to be unset, but those seemed too strict given our
permissive "MUST ignore unknown properties" extensibility requirement.

[1]: opencontainers#563
[2]: opencontainers#863 (comment)

Signed-off-by: W. Trevor King <wking@tremily.us>
@wking wking force-pushed the console-size-if-attached branch from 29074b4 to ed6c9ef Compare June 1, 2017 21:21
@mrunalp
Copy link
Contributor

mrunalp commented Jun 1, 2017

LGTM

Approved with PullApprove

@crosbymichael
Copy link
Member

crosbymichael commented Jun 1, 2017

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit 239c4e4 into opencontainers:master Jun 1, 2017
@wking wking deleted the console-size-if-attached branch June 2, 2017 04:17
@vbatts vbatts mentioned this pull request Jul 5, 2017
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.

3 participants