-
Notifications
You must be signed in to change notification settings - Fork 1
Restore C3 hard block: APIService not yet fully supported in OLMv1 #22
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
Open
tmshort
wants to merge
1
commit into
main
Choose a base branch
from
olm-restore-c3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -27,9 +27,8 @@ func (m *Migrator) CheckCompatibility(ctx context.Context, opts Options, csv *op | |||||
| // Dependency checks (C2 — hard block) | ||||||
| report.Checks = append(report.Checks, checkNoDependencies(bundleProperties)...) | ||||||
|
|
||||||
| // C3 (APIService definitions) was removed: OLMv1 now manages APIService objects | ||||||
| // natively via the registry+v1 renderer (OPRUN-4723). Operators with owned | ||||||
| // APIService definitions are now Eligible with no override required. | ||||||
| // APIService definitions check (C3 — hard block) | ||||||
| report.Checks = append(report.Checks, checkNoAPIServices(csv)) | ||||||
|
|
||||||
| // OperatorCondition checks (C4) | ||||||
| condCheck, err := m.checkNoOperatorConditions(ctx, opts, csv) | ||||||
|
|
@@ -194,6 +193,25 @@ func parseProperties(propertiesJSON string) ([]olmProperty, error) { | |||||
| return wrapped.Properties, nil | ||||||
| } | ||||||
|
|
||||||
| // checkNoAPIServices enforces C3 — no owned APIService definitions (hard block). | ||||||
| // OLMv1's registry+v1 renderer does not yet fully support APIService-based operators | ||||||
| // end-to-end. The underlying implementation exists in operator-controller as infrastructure | ||||||
| // but is not yet wired into the Boxcutter rendering path. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| func checkNoAPIServices(csv *operatorsv1alpha1.ClusterServiceVersion) CheckResult { | ||||||
| if len(csv.Spec.APIServiceDefinitions.Owned) > 0 { | ||||||
| return CheckResult{ | ||||||
| Name: "No APIService definitions", | ||||||
| Passed: false, | ||||||
| Message: "CSV has spec.apiservicedefinitions.owned set; OLMv1 does not yet fully support APIService-based operators", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
| } | ||||||
| return CheckResult{ | ||||||
| Name: "No APIService definitions", | ||||||
| Passed: true, | ||||||
| Message: "CSV does not define owned APIServices", | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| // checkNoDependencies enforces C2 — no olm.package.required or olm.gvk.required (hard block). | ||||||
| func checkNoDependencies(propertiesJSON string) []CheckResult { | ||||||
| if propertiesJSON == "" { | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.