Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Jul 19, 2017

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.

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 <[email protected]>
@wking
Copy link
Contributor Author

wking commented Aug 2, 2017

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 but didn't want to catch invalid-acording-to-our-Markdown swappiness values, and I doubt any such users exist.

"swappiness": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness",
"$ref": "defs.json#/definitions/uint64"
"$ref": "defs.json#/definitions/percent"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's not actually a percent, just happen to have the same range.

@crosbymichael
Copy link
Member

crosbymichael commented Aug 14, 2017

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.

@wking
Copy link
Contributor Author

wking commented Aug 14, 2017

Like @hqhq said, just because the numbers are from 0-100 do not make it a percentage...

So I can rename our current percent range to zeroThroughOneHundred.

... and it's not in the kernel either.

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 swappiness to 0 through 100 there.

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.

3 participants