-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <joe.lanford@gmail.com> * 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 <joe.lanford@gmail.com> * introduce benchmark for declcfg.LoadFS Signed-off-by: Joe Lanford <joe.lanford@gmail.com> * concurrent LoadFS Signed-off-by: Joe Lanford <joe.lanford@gmail.com> * 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 <joe.lanford@gmail.com> * 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 <joe.lanford@gmail.com> * updated LoadFS benchmark to use csv metadata properties instead of olm.bundle.object properties Signed-off-by: Joe Lanford <joe.lanford@gmail.com> --------- Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
- Loading branch information
1 parent
7629c6f
commit 2ee231b
Showing
19 changed files
with
1,038 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.