Add CSV metadata minification migration - #2088
joelanford wants to merge 1 commit into
Conversation
Add the minify-csv-metadata migration and register it after bundle-object-to-csv-metadata. The migration rewrites existing olm.csv.metadata properties while leaving other bundle properties unchanged. Minify CRD and API service definitions to retain only their identifying and display fields: Name, Group where applicable, Version, Kind, DisplayName, and Description. Add tests covering migration sequencing and removal of the omitted definition fields. This follows the OLMv0 package-server implementation, which filters CRD and API service descriptions to the same fields: https://github.com/operator-framework/operator-lifecycle-manager/blob/cf27af72356d95b33c2fcb38dcff4d9ca2e7d475/pkg/package-server/apis/operators/packagemanifest.go#L28-L31 For the Red Hat 4.22 catalog, the catalog size decreases from 118,396 KiB (116M) to 47,200 KiB (47M) after migration and minification, a reduction of 71,196 KiB or approximately 60.1%.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2088 +/- ##
==========================================
+ Coverage 59.55% 59.75% +0.19%
==========================================
Files 99 100 +1
Lines 8157 8202 +45
==========================================
+ Hits 4858 4901 +43
- Misses 2724 2725 +1
- Partials 575 576 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add the minify-csv-metadata migration and register it after bundle-object-to-csv-metadata. The migration rewrites existing olm.csv.metadata properties while leaving other bundle properties unchanged.
Minify CRD and API service definitions to retain only their identifying and display fields: Name, Group where applicable, Version, Kind, DisplayName, and Description. Add tests covering migration sequencing and removal of the omitted definition fields.
This follows the OLMv0 package-server implementation, which filters CRD and API service descriptions to the same fields: https://github.com/operator-framework/operator-lifecycle-manager/blob/cf27af72356d95b33c2fcb38dcff4d9ca2e7d475/pkg/package-server/apis/operators/packagemanifest.go#L28-L31
For the Red Hat 4.22 catalog, the catalog size decreases from 118,396 KiB (116M) to 47,200 KiB (47M) after migration and minification, a reduction of 71,196 KiB or approximately 60.1%.