-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate: support migration of FBC to latest preferred FBC #1144
migrate: support migration of FBC to latest preferred FBC #1144
Conversation
This commit removes a feature of FBC that has never actually been used in practice: the ability to reference a file in an olm.bundle.object property, where the path is relative to the directory in which the file containing the olm.bundle.object property exists. This was originally intended to be a way to avoid bloating the FBC, but it's presence has caused two problems: 1. It hinted that it would be okay for third-party properties and schemas to reference files in a similar way. 2. Because of (1), we have never really been able to make assumptions that would enable us to migrate and re-write FBC in a different hierarchy, which has been limiting. In short, it imposes a burden on catalog maintainers to keep a catalog in a filesystem structure that is imposed by the author of the catalog contribution. In practice, ref-style olm.bundle.object properties have never been used (as far as I'm aware), because no tooling has ever produced that style, and no one I have heard of is using other methods to render bundles into an FBC. Lastly, with the recent addition of the `olm.csv.metadata` property, the useful life of the `olm.bundle.object` property (which has always been alpha) is nearing an end. Signed-off-by: Joe Lanford <[email protected]>
This commit adds support for migrating FBC to the latest preferred FBC contents. Note that sqlite and bundle inputs are always rendered using the latest preferred FBC contents. The migrate command is updated to now support FBC images and directories as input (only sqlite was supported prior), such that the written output will always be migrated. The render command is updated with a `--migrate` flag that allows a caller to opt into migration during rendering. Under the hood, both of these subcommands use the action.Render struct, which has a new `Migrate` boolean field that callers can use to enable/disable the migration behavior. Signed-off-by: Joe Lanford <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1144 +/- ##
==========================================
+ Coverage 53.79% 53.83% +0.03%
==========================================
Files 108 108
Lines 10199 10224 +25
==========================================
+ Hits 5487 5504 +17
- Misses 3744 3746 +2
- Partials 968 974 +6
☔ View full report in Codecov by Sentry. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: everettraven, joelanford The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@joelanford Thanks for this PR. I think this will be very useful. I did some testing, and I noticed that you may have inadvertently changed the default for rendering a bundle image. Is this on purpose? I would think that the
|
You're saying that this command produces The |
Yes, I didn't expect that. I happened to be testing with 1.26.1. I retested with 1.29.0, and you're right, and it's clear in that PR. Just missed it. |
/lgtm |
This commit adds support for migrating FBC to the latest preferred FBC
contents. Note that sqlite and bundle inputs are always rendered using
the latest preferred FBC contents.
The migrate command is updated to now support FBC images and directories
as input (only sqlite was supported prior), such that the written output
will always be migrated.
The render command is updated with a
--migrate
flag that allows acaller to opt into migration during rendering.
Under the hood, both of these subcommands use the action.Render struct,
which has a new
Migrate
boolean field that callers can use toenable/disable the migration behavior.
Signed-off-by: Joe Lanford [email protected]
This is specifically useful right now to convert existing FBCs using
olm.bundle.object
to use ofolm.csv.metadata
, which can reduce catalog size significantly. At the time of the PR being opened, it reduces the operatorhub catalog from 98M to 23M (~76% reduction in size)NOTE: This builds upon #1143, which is necessary to align on the tenet that FBC directory structure can change without changing the validity or meaning of the catalog.
Reviewer Checklist
/docs