-
Notifications
You must be signed in to change notification settings - Fork 557
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
format specs with 4 spaces indent #846
Conversation
This MUST be unique across all containers on this host. | ||
There is no requirement that it be unique across hosts. | ||
This MUST be unique across all containers on this host. | ||
There is no requirement that it be unique across hosts. | ||
* **`status`** (string, REQUIRED) is the runtime state of the container. |
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'm not sure what's happening, but when I view this document the bullet for the status line is a line above the word "status'
o
status
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'm not sure if this will help, but I think the following “The value MAY be one of:” should be indented as well.
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.
@TomSweeneyRedHat I'm not sure what's your browser. This may be that's the browser's problem. If you use another browser to view, does it look OK?
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 don't think this is a browser thing. Looking at the rendered HTML:
$ curl -s https://github.com/Mashimiao/specs/blob/3d92dd2a8907af6fbabe47caf2f04e8cf628b34f/runtime.md | grep -A10 -B10 status | head -n21
</a><ul><a name="user-content-runtimeState">
<li>
<p><strong><code>ociVersion</code></strong> (string, REQUIRED) is the OCI specification version used when creating the container.</p>
</li>
<li>
<p><strong><code>id</code></strong> (string, REQUIRED) is the container's ID.
This MUST be unique across all containers on this host.
There is no requirement that it be unique across hosts.</p>
</li>
</a><li><a name="user-content-runtimeState">
<p><strong><code>status</code></strong> (string, REQUIRED) is the runtime state of the container.
The value MAY be one of:</p>
</a><ul><a name="user-content-runtimeState">
</a><li><a name="user-content-runtimeState"><code>creating</code>: the container is being created (step 2 in the </a><a href="#lifecycle">lifecycle</a>)</li>
<li><code>created</code>: the runtime has finished the <a href="#create">create operation</a> (after step 2 in the <a href="#lifecycle">lifecycle</a>), and the container process has neither exited nor executed the user-specified program</li>
<li><code>running</code>: the container process has executed the user-specified program but has not exited (after step 5 in the <a href="#lifecycle">lifecycle</a>)</li>
<li><code>stopped</code>: the container process has exited (step 7 in the <a href="#lifecycle">lifecycle</a>)</li>
</ul>
<p>Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.</p>
</li>
<li>
There are more user-content-runtimeState
names than there should be, one of those <a>
tags wraps the first two <li>
entries, and only the status
<li>
entry gets some internal <p>
tags. It seems like GitHub may be having issues with the partially-loose list, but according to their GFM spec (and this example), a single item with a blank line between two block-level elements should be enough to make the whole list loose.
So I think this is a GitHub rendering bug, and we should just accept the broken rendering until we can get GitHub's Markdown renderer patched. But it's probably worth washing this Markdown through Pandoc too to get a second opinion.
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.
That may be a GitHub's bug. But different browsers have different views.
For example, chrome and firefox. By chrome, it looks OK
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.
FWIW, I viewed this in Firefox and Chrome this morning. the issue did not show up in Chrome as you suspected. I'm fine with merging this as I agree it's a github/firefox rendering issue.
config.md
Outdated
@@ -38,7 +38,8 @@ For example, if a configuration is compliant with version 1.1 of this specificat | |||
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`. |
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.
FWIW, I think these all should be sub-bullets.
o On Windows, ...
o On all other platforms, ...
o On Linux, ...
o If defined, ...
bundle.md
Outdated
This REQUIRED file MUST reside in the root of the bundle directory and MUST be named `config.json`. | ||
See [`config.json`](config.md) for more details. | ||
This REQUIRED file MUST reside in the root of the bundle directory and MUST be named `config.json`. | ||
See [`config.json`](config.md) for more details. | ||
|
||
2. <a name="containerFormat02" />A directory representing the root filesystem of the container. | ||
On Windows, for Windows Server containers, this directory is REQUIRED. For Hyper-V containers, it MUST be omitted. |
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 know it's not part of this review, but I think the "On Windows...", "For Hyper-V..." and "On all other ..." lines should be sub-bullets here.
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.
config-solaris.md
Outdated
Mapped to `allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page. | ||
If `allowedAddress` has not been specified, then they can use any IP address on the associated physical interface for the network resource. | ||
Otherwise, when allowedAddress is specified, the container cannot use IP addresses that are not in the allowedAddress list for the physical address. | ||
Mapped to `allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page. | ||
* **`configureAllowedAddress`** *(string, OPTIONAL)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts. |
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.
If you're backticking allowdAddress
(like you do a few lines above), you probably want to get it (and configureAllowedAddress
?) here too. Or we can punt some/all of the backtick fixup to a follow-up PR.
config.md
Outdated
|
||
* **`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. |
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.
You want more indents here to place this line under the hard
list entry.
@wking @TomSweeneyRedHat all comments have been fixed. |
config.md
Outdated
|
||
If defined, a directory MUST exist at the path declared by the field. | ||
* **`readonly`** (bool, OPTIONAL) If true then the root filesystem MUST be read-only inside the container, defaults to false. On Windows, this field must be omitted or false. | ||
* **`readonly`** (bool, OPTIONAL) If true then the root filesystem MUST be read-only inside the container, defaults to false. | ||
* On Windows, this field must be omitted or false. |
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.
This line will need at least a “must” → “MUST”, but this PR is already touching so much that I'd rather leave that fix to a follow-up PR.
746b721
to
b4f31ee
Compare
ping @opencontainers/runtime-spec-maintainers |
config-windows.md
Outdated
* **`utilityvmpath`** *(string, OPTIONAL)* - specifies the path to the image used for the utility VM. This would be specified if using a base image which does not contain a utility VM image. If not supplied, the runtime will search the container filesystem layers from the bottom-most layer upwards, until it locates "UtilityVM", and default to that path. | ||
* **`utilityvmpath`** *(string, OPTIONAL)* - specifies the path to the image used for the utility VM. | ||
This would be specified if using a base image which does not contain a utility VM image. | ||
If not supplied, the runtime will search the container filesystem layers from the bottom-most layer upwards, until it locates "UtilityVM", and default to that path. | ||
|
||
* **`sandboxpath`** *(string, REQUIRED)* - specifies the root of the path to the sandbox to be used for the container. |
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.
Looks like https://github.com/opencontainers/runtime-spec/pull/849/files is getting ready to remove this, you might have some merge fun between the two PR'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.
LGTM, thanks for the touch ups.
needs a rebase, but LGTM |
Signed-off-by: Ma Shimiao <[email protected]>
Signed-off-by: Ma Shimiao <[email protected]>
1 similar comment
The Markdown spec is liberal for the first paragraph [1]: > To make lists look nice, you can wrap items with hanging > indents... But if you want to be lazy, you don’t have to... However, it's a bit more strict about subsequent paragraphs [1]: > List items may consist of multiple paragraphs. Each subsequent > paragraph in a list item must be indented by either 4 spaces or one > tab: That doesn't matter for our use here, because all of our entries are single-paragraph. But runtime-spec has been bitten by Pandoc strictness for multiple paragraphs before [2], and their RELEASES.md has used four-space indents since [3]. By adopting the stricter behavior here, we make it easier for OCI Projects to stay synchronized with the template while maintaining their stricter local conventions. OCI Projects that do not have strict local conventions probably don't care either way. [1]: https://daringfireball.net/projects/markdown/syntax#list [2]: opencontainers/runtime-spec#495 [3]: opencontainers/runtime-spec#846 Signed-off-by: W. Trevor King <[email protected]>
Signed-off-by: Ma Shimiao [email protected]