Skip to content

Commit e0fa34b

Browse files
committed
image-index: remove platform.features field
While the intended use of the `platform.features` field was to express the availability of hardware instructions on CPUs, the practicality of expressing and implementing such a standard has been called into question. Much of the functionality is usually hidden deep within kernel code or is defined by hardware vendors in ways that will make the field unusable without future additions. Applications that can make use of such field will likely have other requirements on top of this field that are specific to a deployment. In that regard, it is best to remove this field and defer to hardware to make the decision about what can be run. Signed-off-by: Stephen J Day <[email protected]>
1 parent 8cd3190 commit e0fa34b

6 files changed

+27
-57
lines changed

image-index.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
7676

7777
- **`features`** *array of strings*
7878

79-
This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`).
79+
This property is RESERVED for future versions of the specification.
8080

8181
- **`annotations`** *string-string map*
8282

@@ -107,10 +107,7 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
107107
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
108108
"platform": {
109109
"architecture": "amd64",
110-
"os": "linux",
111-
"os.features": [
112-
"sse4"
113-
]
110+
"os": "linux"
114111
}
115112
}
116113
],

schema/backwards_compatibility_test.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
4949
fail bool
5050
}{
5151
{
52-
digest: "sha256:d0ed7cfe33821cb6a15624486e650149e92fff3192ff2014bda0c4b0206c1aa2",
52+
digest: "sha256:4ffd0883f25635999f04ea543240a27c9a4341979ff7d46a9774f71512eebb1f",
5353
imageIndex: `{
5454
"schemaVersion": 2,
5555
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
@@ -69,10 +69,7 @@ func TestBackwardsCompatibilityImageIndex(t *testing.T) {
6969
"digest": "sha256:ae1b0e06e8ade3a11267564a26e750585ba2259c0ecab59ab165ad1af41d1bdd",
7070
"platform": {
7171
"architecture": "amd64",
72-
"os": "linux",
73-
"features": [
74-
"sse"
75-
]
72+
"os": "linux"
7673
}
7774
},
7875
{

schema/fs.go

+16-16
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ b1D07fCyW0vviMlWxN4UcYpZ/Enjdtf+RQ3SGiZ/vj8oANpKu/UTMV9kR1SDMjPzGZ6y5MQwnZvwWfX7
223223
"/content-descriptor.json": {
224224
local: "content-descriptor.json",
225225
size: 1085,
226-
modtime: 1493147571,
226+
modtime: 1494380450,
227227
compressed: `
228228
H4sIAAAAAAAA/5yTwW7UMBCG73mKUVqpl27NoeIQVb3AnQPcEAevPY6nbGwznlW1oL47mniXJoAo3Vsy
229229
+r+Zz8n4RwfQe6yOqQjl1A/QfyiY3uUklhIy6BMmgffHUGb4WNBRIGdn4lpbXFYXcbKKR5EyGPNQc9q0
@@ -238,7 +238,7 @@ ERcrb5b9zhBc4s2zO7r2jN/2xKhin3+/McttXS9NB/Cle+p+BgAA///HjexwPQQAAA==
238238
"/defs-descriptor.json": {
239239
local: "defs-descriptor.json",
240240
size: 922,
241-
modtime: 1493750367,
241+
modtime: 1494380450,
242242
compressed: `
243243
H4sIAAAAAAAA/6STX2/TMBTF3/spLl7FgDZN4QFp0Ria2DsP42lTV93ZN/Ed8R/ZrqYy9bsjJ1naFYFA
244244
PCSyj67Pub8b52kCIBRFGdgndlZUIK6oZst5F8FjSCw3LQZIDr56sl+cTciWAlwNx1yAa0+Sa5bYecx7
@@ -268,21 +268,21 @@ fIvD7in0ryMEy+fK1G6UfmdTE+tvpoL+1wV/AgAA//96IpqyhgYAAA==
268268

269269
"/image-index-schema.json": {
270270
local: "image-index-schema.json",
271-
size: 3151,
272-
modtime: 1493147606,
271+
size: 3009,
272+
modtime: 1495059260,
273273
compressed: `
274-
H4sIAAAAAAAA/7yWP2/bPBDGd3+KgxIgSxK+eBF0MIIs7ZKpQ4MuRQaGPFmXWqR6pJO4hb97QTKyJVF2
275-
E9XoZh95z/2eE//9mg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PVpdh5npsGtexK2pAWZ+fky+fky8dEt2rQp5qnZ5Quxho2DbIj
277+
tNkcvCWALOZ/R7bRVgynbh8qslAQLhTYaA8tuAohVIZQGaIYvEQ1EBaEBtIOS+SAEJQneMq3MddSncuk
278+
Rk2a6mWdzeHjJibeulgItXEkq4WmAq2zffudsmAWqx67w7o/72g7XbEv7+01G+jxr/Y+wvhrSYy+1o91
279+
1MOjIvHg0y77YUu/BxFFJVqXrUOPPfGRhZHIbw+kC8SvhTDbewBThMXBWCCjlqggsRREzhkLn62wsFdq
280+
3ZNrvzvOcoUFafIVbL4h6Sm0qelDOP1EIA1PK4d2EusIIGn36WY33Hv/D8GTvGqcKVk0FUmQFcqfdllD
281+
VOhwI+Olt+H/NsI5ZA0Xt2JRGiZX1XfzW78WFaq7i+l9H66boa8lL4arJnUlYEER3U+Hgk0NrxXJCpw/
282+
V6IXqMUKnhCUedULIxSq6dSBaidzsxCuMFyn3Mdt5rXOgHPnNoY9WzmMCZYVOZRuyTjIA8jMlqetPQx7
283+
93GqnY5Pdp/vhe61wzomXWaDCe2YzVPiGXsaqOuX5JY8Bdxa9jSQBQr/HU7dwo3uHszty7JfNrk2DzYJ
284+
0P7T9otgEjo9XA/p4d7/7c4jRGhtXHjgjZx+x3V5c5DlfdXJZ19fZDbmpfvVbj2Dxh1Neq2N2fgfAx40
285+
YKZnZzb2Muw96WYAj7N29jcAAP//8RsPuMELAAA=
286286
`,
287287
},
288288

schema/image-index-schema.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@
6767
},
6868
"variant": {
6969
"type": "string"
70-
},
71-
"features": {
72-
"type": "array",
73-
"items": {
74-
"type": "string"
75-
}
70+
}
7671
}
7772
}
7873
},

schema/imageindex_test.go

+6-21
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,8 @@ func TestImageIndex(t *testing.T) {
5959
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
6060
"platform": {
6161
"architecture": "amd64",
62-
"os": "linux",
63-
"features": [
64-
"sse4"
65-
]
66-
}
62+
"os": "linux"
63+
}
6764
}
6865
]
6966
}
@@ -82,10 +79,7 @@ func TestImageIndex(t *testing.T) {
8279
"size": 7682,
8380
"platform": {
8481
"architecture": "amd64",
85-
"os": "linux",
86-
"features": [
87-
"sse4"
88-
]
82+
"os": "linux"
8983
}
9084
}
9185
]
@@ -126,10 +120,7 @@ func TestImageIndex(t *testing.T) {
126120
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
127121
"platform": {
128122
"architecture": "amd64",
129-
"os": "linux",
130-
"features": [
131-
"sse4"
132-
]
123+
"os": "linux"
133124
}
134125
}
135126
]
@@ -150,10 +141,7 @@ func TestImageIndex(t *testing.T) {
150141
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
151142
"platform": {
152143
"architecture": "amd64",
153-
"os": "linux",
154-
"features": [
155-
"sse4"
156-
]
144+
"os": "linux"
157145
}
158146
}
159147
]
@@ -183,10 +171,7 @@ func TestImageIndex(t *testing.T) {
183171
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
184172
"platform": {
185173
"architecture": "amd64",
186-
"os": "linux",
187-
"features": [
188-
"sse4"
189-
]
174+
"os": "linux"
190175
}
191176
}
192177
],

specs-go/v1/descriptor.go

-4
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,4 @@ type Platform struct {
6161
// Variant is an optional field specifying a variant of the CPU, for
6262
// example `v7` to specify ARMv7 when architecture is `arm`.
6363
Variant string `json:"variant,omitempty"`
64-
65-
// Features is an optional field specifying an array of strings, each
66-
// listing a required CPU feature (for example `sse4` or `aes`).
67-
Features []string `json:"features,omitempty"`
6864
}

0 commit comments

Comments
 (0)