MCO-2114: allow OSStream in OKD#2749
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@cheesesashimi: This pull request references MCO-2114 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Hello @cheesesashimi! Some important instructions when contributing to openshift/api: |
📝 WalkthroughWalkthroughThis pull request enables the OSStreams feature for OKD environments and extends the MachineConfigPool custom resource definition. Changes include updating the OSStreams feature gate logic to include OKD activation conditions, moving OSStreams from disabled to enabled status in OKD-specific feature gate configurations, adding osImageStream fields to MachineConfigPool CRD spec and status sections, and updating the OSImageStreams CRD feature-set annotation to include OKD. Documentation is updated to reflect the new enabled status across multiple environments. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Review Summary by QodoEnable OSStreams feature support for OKD
WalkthroughsDescription• Enable OSStreams feature gate for OKD platform • Add osImageStream field to MachineConfigPool spec and status • Update feature set annotations to include OKD support • Reorganize feature gate entries in OKD manifests Diagramflowchart LR
A["OSStreams Feature Gate"] -->|"enable inOKD()"| B["OKD Support"]
C["MachineConfigPool CRD"] -->|"add osImageStream field"| D["Pool-level OS Stream Selection"]
E["Feature Set Annotations"] -->|"include OKD"| F["OKD Manifest Compatibility"]
B --> G["OKD Clusters"]
D --> G
F --> G
File Changes1. features/features.go
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
features/features.go (1)
981-986:⚠️ Potential issue | 🟠 Major
inOKD()enables a broader API surface than the stated OKD scope.The
OSStreamsgate also guardsMachineConfigPool.spec.osImageStream, and that source type explicitly allows per-pool overrides away from the cluster default (machineconfiguration/v1/types.go:456-469). That is a multi-stream API surface. If OKD is only meant to support a single OSStream initially, this gate is too coarse and will publish unsupported semantics in the OKD CRDs.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@features/features.go` around lines 981 - 986, FeatureGateOSStreams currently enables broad multi-stream semantics in OKD via inOKD(), but MachineConfigPool.spec.osImageStream allows per-pool overrides (multi-stream) and that should not be exposed in OKD; remove inOKD() from the enable(...) chain on FeatureGateOSStreams (or replace it with an OCP-only predicate such as inOCPOnly() / omit OKD predicate) so the gate is not turned on for OKD, or alternatively split this into two gates (one for single-stream OKD and one for multi-stream OCP) and adjust callers that reference FeatureGateOSStreams accordingly; locate the enable(...) call on FeatureGateOSStreams and update it to stop enabling the multi-stream behavior for inOKD().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@features/features.go`:
- Around line 981-986: FeatureGateOSStreams currently enables broad multi-stream
semantics in OKD via inOKD(), but MachineConfigPool.spec.osImageStream allows
per-pool overrides (multi-stream) and that should not be exposed in OKD; remove
inOKD() from the enable(...) chain on FeatureGateOSStreams (or replace it with
an OCP-only predicate such as inOCPOnly() / omit OKD predicate) so the gate is
not turned on for OKD, or alternatively split this into two gates (one for
single-stream OKD and one for multi-stream OCP) and adjust callers that
reference FeatureGateOSStreams accordingly; locate the enable(...) call on
FeatureGateOSStreams and update it to stop enabling the multi-stream behavior
for inOKD().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro
Run ID: dd49a350-57ee-4d44-97e2-83809990f914
⛔ Files ignored due to path filters (2)
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigpools-OKD.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_osimagestreams.crd.yamlis excluded by!**/zz_generated.crd-manifests/*
📒 Files selected for processing (6)
features.mdfeatures/features.gopayload-manifests/crds/0000_80_machine-config_01_machineconfigpools-OKD.crd.yamlpayload-manifests/crds/0000_80_machine-config_01_osimagestreams.crd.yamlpayload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yamlpayload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
|
@cheesesashimi: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
yuqi-zhang
left a comment
There was a problem hiding this comment.
Functionally lgtm, does this require any other PRs to merge first to ensure OKD doesn't break (openshift/release#75759?)
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yuqi-zhang 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 |
It will eventually become essential for OKD to be compatible with the OSStream feature. The key difference is that, for now, OKD will only support a single OSStream as opposed to having multiple options as OCP does.