Uh oh!
There was an error while loading. Please reload this page.
config: Convert process.rlimits from an array to an object - #583
Conversation
crosbymichael
commented
Sep 27, 2016
uhh, just because order is not important does not mean you have to change the schema |
wking
commented
Sep 27, 2016
On Tue, Sep 27, 2016 at 09:04:54AM -0700, Michael Crosby wrote:
True, but using an array means entries are referenced by index |
Rlimits do not need either ordering or repeat entries for a single type. Using an object leans on the new wording from eeaccfa (glossary: Make objects explicitly unordered and forbid duplicate names, 2016-09-27, opencontainers#584) to make both of those points explicit. Also add Solaris support. I'm not entirely clear on this, because while Solaris is POSIX-certified system and there is a Solaris man page for setrlimit, Abhijeeth claims no Solaris support for rlimits [1]. The additionalProperties object bit comes from [2,3], although it is not documented in draft 4 of the JSON Schema RFC [4]. [1]: opencontainers#564 (comment) [2]: https://spacetelescope.github.io/understanding-json-schema/reference/object.html#properties [3]: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.18 [4]: https://tools.ietf.org/html/draft-zyp-json-schema-04 Signed-off-by: W. Trevor King <wking@tremily.us>
Alternative of opencontainers#583 , as what we do for `namespaces` in opencontainers#597 . Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
02e284f to
bde2aa9Comparemrunalp
commented
Jan 11, 2017
Closed by #607 |
Rlimits do not need either ordering or repeat entries for a single type. While come JSON libraries preserve object key order or allow repeats, there are many JSON libraries which do not (e.g. Python and JavaScript both parse JSON objects into hash tables). Using objects here reinforces the unimportance of ordering or repeated entries.
Also add Solaris support. I'm not entirely clear on this, because while Solaris is POSIX-certified system and there is a Solaris man page for setrlimit, @anuthanclaims no Solaris support for rlimits.
The
additionalPropertiesobject bit comes from here, although it is not documented in draft 4 of the JSON Schema RFC.