Commit 2ee231b
authored
render: improve olm.bundle.object rendering for bundles (#1094)
* render: improve olm.bundle.object rendering for bundles
When rendering individual bundles, only generate olm.bundle.object
properties for the CSV if there is an image reference for the bundle.
Signed-off-by: Joe Lanford <[email protected]>
* render: improve olm.bundle.object rendering for sqlite dbs
When rendering sqlite-based catalogs, only generate olm.bundle.object
properties for the CSV if there is an image reference for the bundle.
Signed-off-by: Joe Lanford <[email protected]>
* introduce benchmark for declcfg.LoadFS
Signed-off-by: Joe Lanford <[email protected]>
* concurrent LoadFS
Signed-off-by: Joe Lanford <[email protected]>
* add olm.csv.metadata property
1. When rendering sqlite DBs and bundle images, generate an
"olm.csv.metadata" property instead of a full CSV (so long as
there is a bundle image reference associated with the corresponding
bundle)
2. When serving the GRPC interface and a full CSV is not present in an
"olm.bundle.object" property, generate a CSV from (a) the
"olm.csv.metadata" property. Also include the bundle's related
images, and the package's icon, if defined. If there is no
description in the CSV metadata, also include the package's
description in the generated CSV.
Signed-off-by: Joe Lanford <[email protected]>
* Meta: more correct handling of HTML-unescaping
It turns out that straight byte-based replacements of unicode escape
characters back to their ascii representations is invalid if the unicode
escape character itself is escaped (e.g. "\u003c" => "\\u003c" => "\<").
To solve this, we will instead unmarshal Meta objects to
map[string]interface{}, extract the expected Meta fields from the map,
and then use a JSON encoder with SetEscapeHTML(false) to re-encode the
map back to JSON to be stored in Meta.Blob.
Signed-off-by: Joe Lanford <[email protected]>
* updated LoadFS benchmark to use csv metadata properties instead of olm.bundle.object properties
Signed-off-by: Joe Lanford <[email protected]>
---------
Signed-off-by: Joe Lanford <[email protected]>1 parent 7629c6f commit 2ee231b
File tree
19 files changed
+1038
-222
lines changed- alpha
- action
- declcfg
- property
- template/composite
- pkg
- api
- registry
- server
19 files changed
+1038
-222
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | | - | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
| |||
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
52 | 47 | | |
53 | 48 | | |
54 | 49 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 50 | + | |
99 | 51 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | | - | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| |||
212 | 210 | | |
213 | 211 | | |
214 | 212 | | |
215 | | - | |
| 213 | + | |
216 | 214 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| |||
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 254 | + | |
254 | 255 | | |
255 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
| |||
299 | 309 | | |
300 | 310 | | |
301 | 311 | | |
302 | | - | |
| 312 | + | |
303 | 313 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
308 | 321 | | |
309 | 322 | | |
310 | 323 | | |
| |||
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 341 | + | |
332 | 342 | | |
333 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
334 | 352 | | |
335 | 353 | | |
336 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | | - | |
| 380 | + | |
380 | 381 | | |
381 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
382 | 386 | | |
383 | | - | |
384 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
385 | 392 | | |
386 | 393 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 394 | + | |
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | | - | |
109 | | - | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
134 | | - | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
468 | 467 | | |
469 | 468 | | |
470 | 469 | | |
471 | | - | |
472 | | - | |
| 470 | + | |
473 | 471 | | |
474 | 472 | | |
475 | 473 | | |
| |||
518 | 516 | | |
519 | 517 | | |
520 | 518 | | |
521 | | - | |
522 | | - | |
| 519 | + | |
523 | 520 | | |
524 | 521 | | |
525 | 522 | | |
| |||
551 | 548 | | |
552 | 549 | | |
553 | 550 | | |
554 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
555 | 562 | | |
556 | 563 | | |
557 | 564 | | |
| |||
880 | 887 | | |
881 | 888 | | |
882 | 889 | | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
0 commit comments