-
Notifications
You must be signed in to change notification settings - Fork 261
Introduce olm.channel schema, remove channel metadata-related bundle properties #768
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
Introduce olm.channel schema, remove channel metadata-related bundle properties #768
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
Codecov Report
@@ Coverage Diff @@
## master #768 +/- ##
==========================================
+ Coverage 50.45% 50.62% +0.17%
==========================================
Files 102 101 -1
Lines 8719 8691 -28
==========================================
+ Hits 4399 4400 +1
+ Misses 3470 3454 -16
+ Partials 850 837 -13
Continue to review full report at Codecov.
|
|
/hold |
In this PR, the `olm.channel` schema has an extensible `strategy` field
with an initial `legacy` implementation that allows each entry to define
channel-specific replaces, skips, and skipRange.
Conversions from the model to the file-based config format use the
`olm.channel` blob rather than generating `olm.channel`, `olm.skips`,
and `olm.skipRange` properties on `olm.bundle` properties.
If a package has any `olm.channel` blobs, that means that package has
opted into fully defining its channels and upgrade edges with
`olm.channel` blobs, which means:
1. `olm.channel`, `olm.skips` and `olm.skipRange` properties are not
allowed on any bundles in that package.
2. It is an error if an `olm.channel` blob references a non-existent
bundle
3. It is an error if a bundle exists in a channel that is not
referenced by an `olm.channel` blob.
This is an improvement on the the existing `olm.bundle` properties
because:
1. `olm.skips` and `olm.skipRange` properties apply to all channels.
This causes channel upgrade graphs to be defined by channel-specific
replaces values from the `olm.channel` property and by the global
skips and skipRange properties, which can make it extremely difficult
to define usable upgrade graphs when multiple channels are involved.
2. It centralizes all of the channel membership and upgrade edge
information in a single place, making it easier for humans to
visualize and for computers to quickly parse and generate upgrade
graphs.
3. It simplifies implementation of veneer APIs that focus on
different upgrade graph definitions. Different channel and
upgrade graph definitions can be built without touching any
`olm.bundle` blobs.
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
479ff85 to
fbcdcd7
Compare
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
fbcdcd7 to
ca53411
Compare
Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
|
This might be out of scope for this particular change, but one positive aspect of having all this update-graph/channel-related metadata in the bundle is that it made adding a bundle to a catalog extremely straight forward, essentially a single step. It seems we are moving towards a structure where, due to the separate of concerns, now multiple steps are needed in order to add a bundle to an existing set of bundles in a catalog / package definition: adding the bundle reference and then reference the version in the channel definitions and various graph controls. What does this process look like in the future. Will it always be two/multiple steps? |
I think what this PR brings into focus is that operator authors are the owners of their index. The number of steps for an operator author hasn't changed. Before
After
In the After case, step 3 can be manual configuration (basically what replaces mode is today by doing the Before step 1), or it can be automated. For example by rendering a handful of bundles into an index and then running some automation that builds channels and their upgrade graphs purely by inspecting the properties of the bundle (where I'm sure The |
|
For most users of any pipelines that we currently entertain the process looks like this:
That's it, then a pipeline picks it up, builds the image and adds it to the index. Making it a 3-way process by default would regress on the simplicity part quite a bit. We likely want to have some automation like your channelizer. I think I don't want to create more noise in this PR review about this, let's move the discussion to https://issues.redhat.com/browse/OLM-2107 |
|
/lgtm |
|
LGTM from |
|
/hold cancel |
Description of the change:
Define
olm.channelschema to specify channel membership and upgrade edges. For example:Remove properties on the
olm.bundleblobs that are related to channel metadata. Specificallyolm.channel,olm.skips, andolm.skipRangeare removed.Conversions from the model to the file-based config format use the
olm.channelschema.opm renderno longer populates channel-related metadata when rendering bundle images.Motivation for the change:
The current schema overlooked the fact that bundle properties contained channel-level metadata, which goes directly against the design goals of file-based configs.
This PR corrects that issue by implementing a new
olm.channelschema and removing the ability ofopm renderto pull this metadata from bundles created with imperative sqlite-based workflows in mind.This is also an improvement on the the existing
olm.bundleproperties because:olm.skipsandolm.skipRangeproperties apply to all channels. This causes channel upgrade graphs to be defined by channel-specific replaces values from theolm.channelproperty and by the global skips and skipRange properties, which can make it extremely difficult to define usable upgrade graphs when multiple channels are involved.olm.bundleblobs.Reviewer Checklist
/docs