Commit fa9f9ba
fix: allow spec compliant, but unusually ordered HELM Chart OCI Artifacts in HELM OCI Artifact downloader (#1470)
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it
This allows arbitrarily ordered, but spec
(https://github.com/helm/community/blob/main/hips/hip-0006.md) compliant
HELM Charts in the Downloader when interpreting HELM Chart Artifact
Types.
#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
This will especially fix resource downloads which previously assumed
layer 0, which is incorrect. Instead we have to find the first and only
occurrence of `application/vnd.cncf.helm.chart.content.v1.tar+gzip`.
Similarly, finding provenance data should not be hardcoded to layer 1,
but to the first and only occurrence of
`application/vnd.cncf.helm.chart.provenance.v1.prov`
Fix #1469
---------
Co-authored-by: Frederic Wilhelm <frederic.wilhelm@sap.com>1 parent 742586b commit fa9f9ba
3 files changed
Lines changed: 73 additions & 15 deletions
File tree
- api/ocm/extensions/download/handlers/helm
- testdata
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
| |||
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
104 | 120 | | |
105 | 121 | | |
106 | 122 | | |
107 | 123 | | |
108 | 124 | | |
109 | 125 | | |
110 | | - | |
| 126 | + | |
111 | 127 | | |
112 | | - | |
113 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
114 | 133 | | |
115 | 134 | | |
116 | | - | |
| 135 | + | |
117 | 136 | | |
118 | | - | |
| 137 | + | |
119 | 138 | | |
120 | | - | |
| 139 | + | |
121 | 140 | | |
122 | 141 | | |
123 | | - | |
124 | | - | |
| 142 | + | |
125 | 143 | | |
126 | 144 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
133 | | - | |
134 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
135 | 156 | | |
136 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
137 | 181 | | |
138 | | - | |
139 | 182 | | |
140 | 183 | | |
141 | 184 | | |
| |||
Binary file not shown.
0 commit comments