schema/config-linux: Check swappiness for zero to 100 range#904
schema/config-linux: Check swappiness for zero to 100 range#904wking wants to merge 1 commit intoopencontainers:masterfrom
Conversation
Catch the JSON Schema up with e73cd70 (Make Linux memory allocations int64 not uint64, 2017-06-23, opencontainers#876), which carried the kernel's 0 to 100 range into the spec. Signed-off-by: W. Trevor King <wking@tremily.us>
|
I think this belongs in the v1.0.Z milestone, since it brings the JSON Schema closer to the normative Markdown. It will be a breaking change for anyone who had been using the JSON Schema to validate fields other than |
| "swappiness": { | ||
| "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness", | ||
| "$ref": "defs.json#/definitions/uint64" | ||
| "$ref": "defs.json#/definitions/percent" |
There was a problem hiding this comment.
But it's not actually a percent, just happen to have the same range.
|
REJECT Like @hqhq said, just because the numbers are from 0-100 do not make it a percentage and it's not in the kernel either. |
So I can rename our current
Our JSON Schema is not about validating things that are in the kernel (although as @justincormack pointed out, this is in the kernel), it's about validating against our Markdown spec. And as I pointed out in this PR's opening post we limit |
Catch the JSON Schema up with #876, which carried the kernel's 0 to 100 range into the spec. I'd argued against carrying those limits locally, but as long as we have them in the normative Markdown spec we should be enforcing them in the JSON Schema.
As of v1.0.0, the Markdown line carrying the kernel's limits is here.