diff --git a/v2/docs/dev-investigations/operator-filtering-investigation.md b/v2/docs/dev-investigations/operator-filtering-investigation.md index e89401564..bbf9014a8 100644 --- a/v2/docs/dev-investigations/operator-filtering-investigation.md +++ b/v2/docs/dev-investigations/operator-filtering-investigation.md @@ -157,21 +157,40 @@ The team proposes to use S4b - FBC filtering API as of 4.18** Below is a list of scenarios, and the expected outcomes. -| ImageSetConfig filtering | Expected bundle versions | Actual Implemented | -|--------------------------|--------------------------|-------------------| -|
mirror:| For each package in the catalog, 1 bundle, corresponding to the head version for each channel of that package | **❌ MISMATCH**: Only returns heads of default channels instead of heads of ALL channels | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true|all bundles of all channels of the specified catalog| **✅ CORRECT**: Returns all bundles for all channels as expected | -|mirror:|1 bundle, corresponding to the head version for each channel of that package| **❌ MISMATCH**: Only returns heads of default channels instead of heads of ALL channels for selected packages | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operatormirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- packages:
- name: elasticserach-operator|all bundles of all channels for the packages specified| **✅ CORRECT**: Returns all bundles for all channels of specified packages as expected | -|mirror:| all bundles in all channels of that package, from minVersion, up to each channel's head | **❌ MISMATCH**: Only processes default channel instead of ALL channels from minVersion up to each channel's head | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
minVersion: 5.6.0mirror:| all bundles in all channels of that package, that are lower than maxVersion | **❌ MISMATCH**: Only processes default channel instead of ALL channels below maxVersion | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
maxVersion: 6.0.0mirror:|all bundles in all channels, between minVersion and maxVersion for that package. Head of channel is not included, even if multiple channels are included in the filtering| **❌ MISMATCH**: Only processes default channel instead of ALL channels in the version range | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|head bundle for the selected channel of that package.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
defaultChannel: stable
channels:
- name: stable
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default| **✅ CORRECT**: Returns head of specified channel as expected | -|mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- packages:
- name: elasticserach-operator
channels:
- name: 'stable-v0'|all bundles for the packages and channels specified.
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default| **✅ CORRECT**: Returns all bundles for specified channel as expected | -|mirror:|head bundle for the each selected channel of that package| **✅ CORRECT**: Returns heads of both specified channels as expected | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
- name: stable-5.5mirror:|within the selected channel of that package, all versions starting minVersion up to channel head.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default. | **✅ CORRECT**: Returns bundles from minVersion to channel head as expected | -|mirror:|within the selected channel of that package, all versions up to maxVersion:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
maxVersion: 6.0.0
Head of channel is not included, even if multiple channels are included in the filtering.
User should expect errors if this filtering leads to a channel with multiple heads.| **✅ CORRECT**: Returns bundles up to maxVersion as expected | -|mirror:|within the selected channel of that package, all versions between minVersion and maxVersion.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0
Head of channel is not included, even if multiple channels are included in the filtering.
User should expect errors if this filtering leads to a channel with multiple heads.| **✅ CORRECT**: Returns bundles in version range as expected | -|mirror:|Error: filtering by channel and by package min/max should not be allowed| **✅ CORRECT**: Returns appropriate error as expected | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|Error: filtering using full:true and min or max version is not allowed| **✅ CORRECT**: Returns appropriate error as expected | -|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|Error: filtering using full:true and min or max version is not allowed| **✅ CORRECT**: Returns appropriate error as expected || **✅ CORRECT**: Returns appropriate error as expected | \ No newline at end of file +| ImageSetConfig filtering | Expected bundle versions | Actual Implemented | Joe's expected behavior | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0mirror:| For each package in the catalog, 1 bundle, corresponding to the head version for each channel of that package | **❌ MISMATCH**: Only returns heads of default channels instead of heads of ALL channels | ❌❌ All packages, all channels, all bundles | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true |all bundles of all channels of the specified catalog| **✅ CORRECT**: Returns all bundles for all channels as expected | ✅ All packages, all channels, all bundles | +|mirror:|1 bundle, corresponding to the head version for each channel of that package| **❌ MISMATCH**: Only returns heads of default channels instead of heads of ALL channels for selected packages | ❌❌ elasticsearch-operator only. All channels, all bundles | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operatormirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- packages:
- name: elasticserach-operator |all bundles of all channels for the packages specified| **✅ CORRECT**: Returns all bundles for all channels of specified packages as expected | ❌ This seems somewhat non-sensical to me. `full: true` at the catalog level, but then specifies a single package | +|mirror:| all bundles in all channels of that package, from minVersion, up to each channel's head | **❌ MISMATCH**: Only processes default channel instead of ALL channels from minVersion up to each channel's head | ❌❌ elasticsearch-operator only. All channels that contain 5.6.0 or greater on their replaces chain. Replaces chains' tails filtered to exclude bundles less than 5.6.0 (new channel tail is last on the replaces chain that is >=5.6.0). Fail if default channel was filtered out or if any filtered channel has no entries. | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
minVersion: 5.6.0mirror:| all bundles in all channels of that package, that are lower than maxVersion | **❌ MISMATCH**: Only processes default channel instead of ALL channels below maxVersion | ❌❌ elasticsearch-operator only. All channels that contain 6.0.0 or lower on their replaces chain. Replaces chains' heads filtered to exclude bundles greater than 6.0.0 (new channel head is first on the replaces chain that is <=6.0.0). Fail if default channel was filtered out or if any filtered channel has no entries. | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
maxVersion: 6.0.0mirror:|all bundles in all channels, between minVersion and maxVersion for that package. Head of channel is not included, even if multiple channels are included in the filtering| **❌ MISMATCH**: Only processes default channel instead of ALL channels in the version range | ❌❌ elasticsearch-operator only. All channels that contain bundles with versions >=5.6.0 <=6.0.0 on their replaces chain. Replaces chains' tails filtered to exclude bundles less than 5.6.0 (new channel tail is last on the replaces chain that is >=5.6.0). Replaces chains' heads filtered to exclude bundles greater than 6.0.0 (new channel head is first on the replaces chain that is <=6.0.0). Fail if default channel was filtered out or if any filtered channel has no entries. | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|head bundle for the selected channel of that package.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
defaultChannel: stable
channels:
- name: stable
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default| **✅ CORRECT**: Returns head of specified channel as expected | ❌ elasticsearch-operator only. All bundles in the stable channel. Default channel for the package set to "stable" (but this is unnecessary since this is the only channel specified). Fail if stable channel does not exist. | +|mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- packages:
- name: elasticserach-operator
channels:
- name: 'stable-v0' |all bundles for the packages and channels specified.
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default| **✅ CORRECT**: Returns all bundles for specified channel as expected | ❌ elasticsearch-operator only. All bundles in the stable-v0 channel. Default channel for the package set to "stable". Fail if stable-v0 channel does not exist. Automatically sets stable-v0 as the default channel since it is the only channel specified. | +|mirror:|head bundle for the each selected channel of that package| **✅ CORRECT**: Returns heads of both specified channels as expected | ❌ elasticsearch-operator only. All bundles in the stable and stable-5.5 channels. Fails if either channel does not exist. Fails if default channel is not one of stable or stable-5.5. | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
- name: stable-5.5mirror:|within the selected channel of that package, all versions starting minVersion up to channel head.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
`defaultChannel` should be used in case the filtered channel(s) is(are) not the default. | **✅ CORRECT**: Returns bundles from minVersion to channel head as expected | ❌ elasticsearch-operator only. stable channel, Replaces chain tail filtered to exclude bundles less than 5.6.0 (new channel tail is last on the replaces chain that is >=5.6.0). Fail if default channel was filtered out or if filtered channel has no entries. | +|mirror:|within the selected channel of that package, all versions up to maxVersion:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
maxVersion: 6.0.0
Head of channel is not included, even if multiple channels are included in the filtering.
User should expect errors if this filtering leads to a channel with multiple heads.| **✅ CORRECT**: Returns bundles up to maxVersion as expected | ❌ elasticsearch-operator only. stable channel, Replaces chain head filtered to exclude bundles greater than 6.0.0 (new channel head is first on the replaces chain that is <=6.0.0). Fail if default channel was filtered out or if filtered channel has no entries. | +|mirror:|within the selected channel of that package, all versions between minVersion and maxVersion.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0
Head of channel is not included, even if multiple channels are included in the filtering.
User should expect errors if this filtering leads to a channel with multiple heads.| **✅ CORRECT**: Returns bundles in version range as expected | ❌ elasticsearch-operator only. stable channel, Replaces chains' tails filtered to exclude bundles less than 5.6.0 (new channel tail is last on the replaces chain that is >=5.6.0). Replaces chains' heads filtered to exclude bundles greater than 6.0.0 (new channel head is first on the replaces chain that is <=6.0.0). Fail if default channel was filtered out or if filtered channel has no entries. | +|mirror:|Error: filtering by channel and by package min/max should not be allowed| **✅ CORRECT**: Returns appropriate error as expected | ✅ Invalid | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|Error: filtering using full:true and min or max version is not allowed| **✅ CORRECT**: Returns appropriate error as expected | ✅ Invalid | +|
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0mirror:|Error: filtering using full:true and min or max version is not allowed| **✅ CORRECT**: Returns appropriate error as expected | ✅ Invalid | + +### Joe's notes + +- I want to try to think about an API/UX that would make sense in the context of: + + 1. OLMv0's limitations + 2. OLMv1's improvements + 3. What customers are actually trying to accomplish: + - Initial install: mirror single "best" version (likely latest available versions of their desired packages). + - Upgrade: mirror desired destination version (likely latest available version of the desired package that has an upgrade path from the current version) and all versions along that path. + - OLMv0: limitation is that the only path is the replaces chain + - OLMv0 complication: what if the path requires moving to a different channel? + + Is there an API that covers all three that we could converge toward? We can start with the concepts in (3) and work backward from there. + +- Users generally don't know about the existence/importance of default channels and channel heads, so making default behaviors around those concepts seems problematic. Suggestions: + + 1. Deprecate "full" and replace with "latestOnly" to invert the logic? Pro: much more intuitive; Con: default behavior mirrors a lot more data. + 2. If a user specifies a single channel, don't require them to specify a default channel. We know that _that_ channel is going to have to be the default no matter what.
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10
full: true
- package: elastic-search-operator
channels
- name: stable
minVersion: 5.6.0
maxVersion: 6.0.0