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

specs-go/config: Add omitempty to LinuxSyscall.Args #763

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

wking
Copy link
Contributor

@wking wking commented Apr 7, 2017

It used to have this, but the omitempty was dropped in #657. However, the docs that landed in #706 list the property as optional, and if it is optional, we can leave it unset instead of serializing an empty array.

If it should be required, then we should also require it to have a minimum length of 1 (#762).

Ping @grantseltzer, @q384566678.

It used to have this, but the omitempty was dropped in 652323c
(improve seccomp format to be more expressive, 2017-01-13, opencontainers#657).
However, the docs that landed in 3ca5c6c (config-linux.md: fix
seccomp, 2017-03-02, opencontainers#706) list the property as optional, and if it is
optional, we can leave it unset instead of serializing an empty array.

Signed-off-by: W. Trevor King <wking@tremily.us>
@zhouhao3
Copy link

If we do not add omitempty to Args, the following error occurs when the validate command is executed:

'LinuxSyscall.Args' should not be empty.

In the assignment to the syscalls, there is the case of Args value is empty, so in order to avoid this conflict, I think we should add omitempty.

@cyphar
Copy link
Member

cyphar commented Apr 12, 2017

👍 I've hit this with umoci very recently because of the DefaultSeccomp value in runtime-tools.

@wking
Copy link
Contributor Author

wking commented Apr 12, 2017 via email

@hqhq
Copy link
Contributor

hqhq commented Apr 12, 2017

LGTM

Approved with PullApprove

1 similar comment
@mrunalp
Copy link
Contributor

mrunalp commented Apr 12, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 67316f0 into opencontainers:master Apr 12, 2017
@wking wking deleted the seccomp-args-omitempty branch April 13, 2017 19:21
@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.

5 participants