Add CSV metadata minification migration - #2088
joelanford wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughChangesCSV metadata migration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The metadata minification retains API-service summary fields and no actionable merge-blocking issue was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks 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.72% +0.16%
==========================================
Files 99 99
Lines 8157 8198 +41
==========================================
+ Hits 4858 4896 +38
- Misses 2724 2725 +1
- Partials 575 577 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8fb9ff3 to
2630501
Compare
Minify CRD and API service descriptions whenever olm.csv.metadata is marshaled, retaining only identifying and display fields. Update the bundle object migration to rewrite existing CSV metadata properties before checking image or CsvJSON fields, while leaving other properties unchanged. Add coverage for metadata construction and migration without CsvJSON.
2630501 to
f52a458
Compare
|
Comments here but I'll reproduce here and start using this as primary coordination to stay in-sync with other reviewers:
and
|
|
From offline conversation:
|
Summary
Minify CRD and APIService descriptions in
olm.csv.metadataby retaining only the fields consumed by OLM's package server:namegroup, where applicableversionkinddisplayNamedescriptionMinification occurs whenever
CSVMetadatais marshaled, so newly constructed metadata is always minimized without requiring a separate opt-in migration.The existing
bundle-object-to-csv-metadatamigration now also rewrites pre-existingolm.csv.metadataproperties. This check occurs before theImageandCsvJSONearly exits, allowing already-migrated bundles withoutCsvJSONto be minimized while leaving their other properties unchanged.This matches the field filtering performed by OLM's package server:
https://github.com/operator-framework/operator-lifecycle-manager/blob/cf27af72356d95b33c2fcb38dcff4d9ca2e7d475/pkg/package-server/apis/operators/packagemanifest.go#L28-L35
For the Red Hat 4.22 catalog, this reduces the catalog size from 118,396 KiB to 47,200 KiB, approximately 60.1%.
Testing
Summary by CodeRabbit