Skip to content

OCPBUGS-70182: Unify capitalization when comparing architectures for available updates#1327

Open
DavidHurta wants to merge 3 commits intoopenshift:release-4.18from
DavidHurta:backport-OCPBUGS-57646-to-4-18
Open

OCPBUGS-70182: Unify capitalization when comparing architectures for available updates#1327
DavidHurta wants to merge 3 commits intoopenshift:release-4.18from
DavidHurta:backport-OCPBUGS-57646-to-4-18

Conversation

@DavidHurta
Copy link
Contributor

A manual backport of #1291 due to conflicts in the pkg/cvo/availableupdates_test.go file when applying the availableupdates_test: Add test cases for spec.DesiredUpdate commit.

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", ...).
@DavidHurta DavidHurta changed the title Backport ocpbugs 57646 to 4 18 Unify capitalization when comparing architectures for available updates Feb 25, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 25, 2026
@DavidHurta
Copy link
Contributor Author

/jira cherrypick OCPBUGS-70181

@openshift-ci-robot
Copy link
Contributor

@DavidHurta: Detected clone of Jira Issue OCPBUGS-70181 with correct target version. Will retitle the PR to link to the clone.
/retitle OCPBUGS-70182: Unify capitalization when comparing architectures for available updates

Details

In response to this:

/jira cherrypick OCPBUGS-70181

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.

@openshift-ci openshift-ci bot changed the title Unify capitalization when comparing architectures for available updates OCPBUGS-70182: Unify capitalization when comparing architectures for available updates Feb 25, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 25, 2026
@openshift-ci-robot
Copy link
Contributor

@DavidHurta: This pull request references Jira Issue OCPBUGS-70182, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

A manual backport of #1291 due to conflicts in the pkg/cvo/availableupdates_test.go file when applying the availableupdates_test: Add test cases for spec.DesiredUpdate commit.

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.

@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

@DavidHurta: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@DavidHurta
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 25, 2026
@openshift-ci-robot
Copy link
Contributor

@DavidHurta: This pull request references Jira Issue OCPBUGS-70182, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-70181 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-70181 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @jiajliu

Details

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from jiajliu February 25, 2026 16:29
@dis016
Copy link

dis016 commented Feb 26, 2026

The same reason with #1255 (comment)
/verified later @dis016

@openshift-ci-robot openshift-ci-robot added verified-later verified Signifies that the PR passed pre-merge verification criteria labels Feb 26, 2026
@openshift-ci-robot
Copy link
Contributor

@dis016: This PR has been marked to be verified later by @dis016.

Details

In response to this:

The same reason with #1255 (comment)
/verified later @dis016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants