schema: allow Device.fileMode set to null.#670
Closed
Kxuan wants to merge 1 commit intoopencontainers:masterfrom
Closed
schema: allow Device.fileMode set to null.#670Kxuan wants to merge 1 commit intoopencontainers:masterfrom
Kxuan wants to merge 1 commit intoopencontainers:masterfrom
Conversation
The `fileMode` is marked optional in the description (https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices) In spec-go, fileMode can be set to null. (https://github.com/opencontainers/runtime-spec/blob/master/specs-go/config.go#L347). However, in the schema, a null type is not allowed for fileMode. This patch allows fileMode set to null, and consistent with other optional fields. Signed-off-by: Zhai ZhaoXuan <zhaizx.fnst@cn.fujitsu.com>
3f72813 to
1c140fe
Compare
Contributor
|
On Tue, Jan 24, 2017 at 06:04:26PM -0800, Xuan wrote:
In spec-go, fileMode can be set to null. However, in the schema, a
null type is not allowed for fileMode.
specs-go has it as an omitempty pointer, so instead of setting it to
null in the JSON, you should not set the property at all. More on
this in #662 and in [1].
[1]: #555 (comment)
|
Author
Contributor
I agree. #662 removes all instances of |
Member
|
So we're closing this PR in lieu of 662 correct? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
fileModeis marked optional in the descriptionIn spec-go, fileMode can be set to null.
However, in the schema, a null type is not allowed for fileMode.
This patch allows fileMode set to null, and consistent with other optional fields.