Add osversion and osvariant to platform specification#1534
Add osversion and osvariant to platform specification#1534aaronlehmann merged 1 commit intodistribution:masterfrom
Conversation
|
cc @dmp42 |
|
@docker/core-distribution-maintainers please take a look at this |
|
@jstarks be sure to validate the design of this with @aaronlehmann @dmcgowan and @RichardScothern |
|
Since last night I thought about this some more, and I think osvariant is a mistake -- it's too coarse. What would be best would be either:
Thoughts? |
|
|
||
| // OSVersion is an optional field specifying the operating system | ||
| // version, for example `10.0.10586`. | ||
| OSVersion string `json:"osversion"` |
There was a problem hiding this comment.
Let's mark this one omitempty too. There will be a lot of cases where OS version requirements are unspecified, such as most Linux images.
There was a problem hiding this comment.
Oops, yes that was my intention.
|
I agree that having a set of OS features is better than having a single string. I don't have much of a preference either way between using the existing |
81860e8 to
dd0959e
Compare
|
I've updated the PR with a proposal that expands the meaning of features (and fixed the missing omitempty, which also fixes CI). |
Current coverage is
|
| The os field specifies the operating system, for example | ||
| `linux` or `windows`. | ||
|
|
||
| - **`osversion`** *string* |
There was a problem hiding this comment.
I'm open to that, but it's a little strange since . is the field separator in most languages. This means that if you were manipulating this in JavaScript, for example, you couldn't write p.os.version, you'd have to write p["os.version"]. But AFAIK, if it's osversion, you can just write p.osversion.
There was a problem hiding this comment.
Agreed.
If we can come up with a way to namespace the properties as under "os", that would be sufficient. I don't have a suggestion off the top of my head.
There was a problem hiding this comment.
Does os_version fit the bill?
Ultimately this is up to you all. I'm happy to choose os.version if that's what you'd like.
dd0959e to
24742e4
Compare
|
I've updated the branch with os.version and os.features. I'm not sure if the bikeshedding is complete or not ;) |
|
@jstarks I didn't see your comment earlier. I found you point about |
| - **`os.features`** *array* | ||
|
|
||
| The optional os.features field specifies an array of strings, | ||
| each listing a required CPU feature (for example on Windows |
There was a problem hiding this comment.
I'm a little confused here. Are these CPU features or features provided by the os? Maybe some documentation on this would help to clarify.
There was a problem hiding this comment.
Oops, sorry, that should say OS feature.
There was a problem hiding this comment.
Whew! Thought I had misunderstood and had you going around making new fields.
Awesome. LGTM after correction!
|
LGTM There are some clarifications of the role of "os.features" but the naming looks fine. |
These changes are needed to differentiate Windows images. Signed-off-by: John Starks <[email protected]>
24742e4 to
5b0a484
Compare
|
LGTM |
Add osversion and osvariant to platform specification
|
Hi All, I am still not sure where the values for |
You might wanna ask in https://github.com/moby/moby/ |
These are needed to differentiate incompatible Windows versions. In the short run, Windows will need os, osvariant, and osversion matching. Eventually we should be able to avoid matching on osvariant.
cc/@aaronlehmann