forked from opencontainers/runtime-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit cbdff10
committed
spec: Define the property-specification syntax
And add platform annotations.
By formally defining our syntax, we do a better job of making that
syntax enforcable. We can also make platform-scoping very obvious,
and no longer need to rely on "For Linux-based systems the process
supports..." guards.
The only intentional semantic change is that we now allow,
platform-named properties that don't match platform.os. For example:
{
"platform": {
"os": "linux",
...
},
"windows": {
...
}
}
and even:
{
"platform": {
"os": "linux",
...
},
"windows": "foo",
}
are both legal now. This rolls back the "MUST NOT be set otherwise"
requirement which had landed in 718f9f3 (minor narrative cleanup
regarding config compatibility, 2017-01-30, opencontainers#673) to make those
properties consistent with our general:
Implementations that are reading/processing this configuration file
MUST NOT generate an error if they encounter an unknown property.
and:
The state MAY include additional properties.
extensibility policies. The alternative would be cross-platform
specification of those properties which then forbid the properties on
non-matching platforms, but then the cross-platform definition would
not match the platform-specific Go type. For example:
Linux *Linux `json:"linux,omitempty" platform:"linux"`
Blocking the non-matching-platform properties didn't seem to be worth
the potential confusion of the Go platform tag not matching the
Markdown platforms tag.
Signed-off-by: W. Trevor King <[email protected]>1 parent 3adac26 commit cbdff10Copy full SHA for cbdff10
File tree
Expand file treeCollapse file tree
5 files changed
+133
-108
lines changedOpen diff view settings
Filter options
Expand file treeCollapse file tree
5 files changed
+133
-108
lines changedOpen diff view settings
0 commit comments