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

consistency and style fix #811

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

Mashimiao
Copy link

replace file sytem with filesystem for consistent in context
keep one sentence per line

Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com

config.md Outdated
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m].
* **`source`** (string, OPTIONAL) A device name, but can also be a directory name or a dummy.
* Windows: the volume name that is the target of the mount point, \\?\Volume\{GUID}\ (on Windows source is called target).
* Solaris: corresponds to "special" of the fs resource in [zonecfg(1M)][zonecfg.1m].
* **`options`** (list of strings, OPTIONAL) Mount options of the filesystem to be used.
* Linux: supported options are listed in the [mount(8)][mount.8] man page. Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed.
* Linux: supported options are listed in the [mount(8)][mount.8] man page.
Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you want deeper indenting here to show that this is part of the * Linux: … entry. For an example with a two-space indent, see here, although that's getting cleaned up to use four-space indents (which Pandoc likes better) in #724.

config.md Outdated
Valid values are platform-specific.
For example, valid values for Linux are defined in the [capabilities(7)][capabilities.7] man page, such as `CAP_CHOWN`.
Any value which cannot be mapped to a relevant kernel interface MUST cause an error.
`capabilities` contains the following properties:
Copy link
Contributor

Choose a reason for hiding this comment

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

capabilities is already using four-space indents (in the list below). Can we use them here while we're touching the lines?

config.md Outdated
@@ -144,7 +148,8 @@ For Windows, see [mountvol][mountvol] and [SetVolumeMountPoint][set-volume-mount

* **`type`** (string, REQUIRED) - the platform resource being limited, for example on Linux as defined in the [setrlimit(2)][setrlimit.2] man page.
* **`soft`** (uint64, REQUIRED) - the value of the limit enforced for the corresponding resource.
* **`hard`** (uint64, REQUIRED) - the ceiling for the soft limit that could be set by an unprivileged process. Only a privileged process (e.g. under Linux: one with the CAP_SYS_RESOURCE capability) can raise a hard limit.
* **`hard`** (uint64, REQUIRED) - the ceiling for the soft limit that could be set by an unprivileged process.
Only a privileged process (e.g. under Linux: one with the CAP_SYS_RESOURCE capability) can raise a hard limit.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also want deeper indents here to make it clearly part of the hard list entry.

config.md Outdated
The runtime MUST generate an error if it does not support the specified **`os`**.
Bundles SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`GOOS`][go-environment].
Value for **`os`** SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`GOOS`][go-environment].
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think readers are likely to forget which property we're talking about ;). Can we shorten this line? Maybe:

Values should be, and runtimes SHOULD understand, valid [`GOOS`][go-environment] values.

config.md Outdated
@@ -428,7 +433,7 @@ Keys MUST be unique within this map.
Keys MUST NOT be an empty string.
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
Runtime implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use “Runtimes”?

$ git describe --always
v1.0.0-rc5-148-g45c3fd4
$ git grep -i runtime.implementations *.md | wc -l
2
$ git grep -i runtimes *.md | wc -l
19

@Mashimiao
Copy link
Author

all comments have been updated. PTAL

config.md Outdated
* **`capabilities`** (object, OPTIONAL) is an object containing arrays that specifies the sets of capabilities for the process(es) inside the container.
Valid values are platform-specific.
For example, valid values for Linux are defined in the [capabilities(7)][capabilities.7] man page, such as `CAP_CHOWN`.
Any value which cannot be mapped to a relevant kernel interface MUST cause an error.
Copy link
Contributor

Choose a reason for hiding this comment

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

When I asked for four-space indents here, I meant all the lines after * **capabilities** … (sorry for not clarifying). So it should be:

* **`capabilities`** (object, OPTIONAL) is an object containing arrays that specifies the sets of capabilities for the process(es) inside the container.
    Valid values are platform-specific.
    For example, valid values for Linux are defined in the [capabilities(7)][capabilities.7] man page, such as `CAP_CHOWN`.
    Any value which cannot be mapped to a relevant kernel interface MUST cause an error.
    `capabilities` contains the following properties:

Copy link
Author

Choose a reason for hiding this comment

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

updated, but there are a lot of sentences do not start with four-space indents, will not fix them in this PR.
I can submit a follow-PR to format all of them.

config.md Outdated
@@ -323,7 +328,7 @@ For Windows based systems the user structure has the following fields:
## <a name="configPlatformSpecificConfiguration" />Platform-specific configuration

[**`platform.os`**](#platform) is used to specify platform-specific configuration.
Runtime implementations MAY support any valid values for platform-specific fields as part of this configuration.
Runtimes MAY support any valid values for platform-specific fields as part of this configuration.

Choose a reason for hiding this comment

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

Fwiw, I think "Runtime implementations" is better than 'Runtimes" and I'd change the three 'Runtimes' below to that too. My $.02, your call to make.

Copy link
Contributor

@wking wking May 15, 2017

Choose a reason for hiding this comment

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

... I'd change the three 'Runtimes' below to that too.

Would you update the other instances (beyond those already touched by this PR) too?

Can you put a finger on why you likw including "implementations" better? A bare "runtimes" is shorter, and I can't think of a non-implementation runtime.

config.md Outdated
@@ -428,7 +433,7 @@ Keys MUST be unique within this map.
Keys MUST NOT be an empty string.
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
Runtimes MUST NOT generate an error if they encounter an unknown annotation key when reading/processing this configuration file.

Choose a reason for hiding this comment

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

Suggest 'reading or processing' here and below. I'm not a big fan of '/' over 'or'. Again, my $.02, your call.

@Mashimiao
Copy link
Author

rebased. @opencontainers/runtime-spec-maintainers PTAL

replace file sytem with filesystem for consistent in context
keep one sentence per line

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@Mashimiao
Copy link
Author

rebased around #846

@crosbymichael
Copy link
Member

crosbymichael commented Jun 1, 2017

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Jun 1, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit be3960a into opencontainers:master Jun 1, 2017
@vbatts vbatts mentioned this pull request Jul 5, 2017
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Aug 31, 2017
Generating an error seems like one potential violation of the
requirement to ignore unknown properties.  Compliance testing for the
ignore requirement can cite the MUST I've written here for any
noticeable runtime activity around the unknown property without
needing a error-specific MUST.

We've had the two MUSTs since 27a05de (Add text about extensions,
2016-06-26, opencontainers#510), citing [1].  I'd asked for consolidated phrasing
then [2,3], but hadn't followed up after the commit landed.

I've left a line mentioning the error activity as non-normative
clarification, but am also happy to drop that line completely.

Also:

* Update the unknown annotation entry to reference the generic
  extensibility section, because there's nothing annotation-specific
  in how we want runtimes to handle unknown keys.

* Remove "reading or processing" language.  This initially landed in
  27a05de with a bump in b92cf90 (consistency and style fix,
  2017-05-12, opencontainers#811).  Some thought was put into this phrasing there
  [4,5] and earlier in opencontainers#510 [6], but we never got around to dropping
  this qualifier.  However, the purpose of this qualifier is unclear
  to me.  What is the point of compliance requirements for runtimes
  which don't read or process a configuration?

[1]: opencontainers/image-spec#164
[2]: opencontainers#510 (comment)
[3]: opencontainers#510 (comment)
[4]: opencontainers#811 (comment)
[5]: opencontainers#811 (comment)
[6]: opencontainers#510 (comment)

Signed-off-by: W. Trevor King <wking@tremily.us>
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.

5 participants