Commit 7eb0c7d
committed
fix(oci): render arm64 platform description without redundant v8
`Platform.description` rendered the same arm64 platform two different ways
depending on how the value was constructed: `linux/arm64` when the variant
was `nil`, and `linux/arm64/v8` when the variant was set to `"v8"`. These
are the same platform — `==`, `hash`, and Set membership already treat an
arm64 `nil` variant as equivalent to `"v8"` — so two equal values produced
different descriptions and drifted between `arm64` and `arm64/v8` across
stages of a single build (apple/container#1542).
Omit the redundant `v8` variant for arm64 so equal platforms always
describe as `linux/arm64`, matching how Docker and containerd display it.
Only the rendered description changes; the stored variant and Codable
encoding are untouched, so OCI content digests remain stable.1 parent 44bec8b commit 7eb0c7d
2 files changed
Lines changed: 50 additions & 2 deletions
File tree
- Sources/ContainerizationOCI
- Tests/ContainerizationOCITests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | | - | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
84 | 120 | | |
0 commit comments