OCPBUGS-70182: Unify capitalization when comparing architectures for available updates#1327
OCPBUGS-70182: Unify capitalization when comparing architectures for available updates#1327DavidHurta wants to merge 3 commits intoopenshift:release-4.18from
Conversation
The osusWithSingleConditionalEdge logic was broken down into smaller parts to allow for the creation of list of test cases with expected values utilized in the added test function. Introduce a test fixture to reduce the number of return values from the osusWithSingleConditionalEdge function. Assisted-by: Claude Code
Otherwise, the following condition in cincinnati.go in MultiArch clusters:
```
if desiredArch == string(configv1.ClusterVersionArchitectureMulti) && currentArch != desiredArch {
return current, []configv1.Release{current}, nil, nil
}
```
gets evaluated to:
```
if "Multi" == string(configv1.ClusterVersionArchitectureMulti) && "multi" != "Multi" {
return current, []configv1.Release{current}, nil, nil
}
```
This will cause MultiArch clusters with a set non-empty
`ClusterVersion.Spec.DesiredUpdate.Architecture` field to indefinitely
have available updates set to `[]configv1.Release{current}` because
the `"multi" != "Multi"` logic will always match.
The commit does change the default behaviour of the `getDesiredArchitecture` method. However, the method is only used once in the `syncAvailableUpdates` method and nowhere else. The commit adds the subsequent logic for evaluating a desired architecture to the method itself and implements the `getCurrentArchitecture` method. The goal is to introduces "getters" for such values where the unified capitalization is enforced, and their return values are of the same nature (e.g., "Multi", "amd64", ...).
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DavidHurta The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira cherrypick OCPBUGS-70181 |
|
@DavidHurta: Detected clone of Jira Issue OCPBUGS-70181 with correct target version. Will retitle the PR to link to the clone. 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. |
|
@DavidHurta: This pull request references Jira Issue OCPBUGS-70182, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@DavidHurta: 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. |
A manual backport of #1291 due to conflicts in the
pkg/cvo/availableupdates_test.gofile when applying theavailableupdates_test: Add test cases for spec.DesiredUpdatecommit.