Skip to content

Conversation

@liouk
Copy link
Member

@liouk liouk commented Oct 14, 2025

The CVO looks at the auth ClusterOperator's manifest and determines which versions are expected in the operator's status; if any of those are missing from the operator's status, it enters a waiting state where it waits for the operator to update that version.

However, in OIDC this breaks currently, because the defined oauth-openshift version will not exist. This PR removes that version from the operator's manifest.

This PR is currently WIP in order to investigate the repercussions of removing that version from the manifest.

liouk added 2 commits October 14, 2025 11:35
This will prevent the CVO to consider it an expected version at all times, which
breaks when OIDC is configured and that version does not exist anymore.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 14, 2025
@openshift-ci-robot
Copy link
Contributor

@liouk: This pull request explicitly references no jira issue.

In response to this:

The CVO looks at the auth ClusterOperator's manifest and determines which versions are expected in the operator's status; if any of those are missing from the operator's status, it enters a waiting state where it waits for the operator to update that version.

However, in OIDC this breaks currently, because the defined oauth-openshift version will not exist. This PR removes that version from the operator's manifest.

This PR is currently WIP in order to investigate the repercussions of removing that version from the manifest.

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 14, 2025
@liouk
Copy link
Member Author

liouk commented Oct 14, 2025

For testing purposes, I have manually pulled the fix from #798.

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 14, 2025
@openshift-ci openshift-ci bot requested a review from ibihim October 14, 2025 09:40
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liouk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 Oct 14, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Removed the oauth-openshift version entry from the ClusterOperator manifest and enabled version removal in the OAuth API server status syncer by adding an option during operator startup.

Changes

Cohort / File(s) Summary
ClusterOperator manifest
manifests/08_clusteroperator.yaml
Deleted oauth-openshift entry from status.versions (name: oauth-openshift, version: 0.0.1-snapshot_openshift). No other manifest sections changed.
Operator startup/status sync
pkg/operator/starter.go
Appended a status controller option to enable version removal on the OAuth API server StatusSyncer during operator preparation, before constructing the APIServer controller set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The PR title includes noise in the form of “WIP: NO-JIRA:” flags and does not succinctly summarize the primary change; while it references updating the ClusterOperator manifest versions, it’s cluttered with workflow tags and should be streamlined. Remove the “WIP: NO-JIRA:” prefix and rephrase the title to concisely reflect the key change, for example “Remove oauth-openshift version from authentication ClusterOperator manifest”.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed The description clearly explains the issue with the CVO waiting on a missing oauth-openshift version, the rationale for removing that version, and the current WIP status to investigate repercussions, all of which directly relate to the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkg/operator/starter.go (1)

479-481: Add inline documentation explaining the version removal.

Consider adding a comment above this code block to explain:

  • Why version removal is needed (OIDC scenario causing oauth-openshift version absence)
  • Which version(s) are being removed
  • Reference to the related PR objectives or documentation

Apply this diff to add explanatory comments:

+	// Enable version removal for oauth-openshift to prevent CVO from waiting
+	// when the oauth-openshift version doesn't exist in OIDC scenarios.
+	// See: related changes in manifests/08_clusteroperator.yaml
 	statusControllerOptions = append(statusControllerOptions, func(ss *status.StatusSyncer) *status.StatusSyncer {
 		return ss.WithVersionRemoval()
 	})
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 215805c and f64ab6d.

📒 Files selected for processing (2)
  • manifests/08_clusteroperator.yaml (0 hunks)
  • pkg/operator/starter.go (1 hunks)
💤 Files with no reviewable changes (1)
  • manifests/08_clusteroperator.yaml

Comment on lines +479 to +481
statusControllerOptions = append(statusControllerOptions, func(ss *status.StatusSyncer) *status.StatusSyncer {
return ss.WithVersionRemoval()
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify that version removal targets only the oauth-openshift version.

The addition of WithVersionRemoval() enables version removal functionality on the StatusSyncer, but it's unclear from this code which versions will be removed and under what conditions. Given the PR objective to remove the oauth-openshift version in OIDC scenarios, please verify that:

  1. The WithVersionRemoval() method implementation correctly identifies and removes only the oauth-openshift version
  2. The removal logic properly handles both OIDC and non-OIDC scenarios
  3. Other versions (e.g., for different components) are not inadvertently affected

Since the PR is marked WIP while investigating repercussions, it would be helpful to understand what concerns or edge cases are being investigated.

Run the following script to examine the WithVersionRemoval() implementation and verify its behavior:


🏁 Script executed:

#!/bin/bash
# Description: Examine the WithVersionRemoval implementation and its usage

# Find the WithVersionRemoval method definition
echo "=== WithVersionRemoval method definition ==="
ast-grep --pattern $'func ($_ *StatusSyncer) WithVersionRemoval() $_ {
  $$$
}'

echo ""
echo "=== Usage of WithVersionRemoval in codebase ==="
rg -n 'WithVersionRemoval' -A 3 -B 3

echo ""
echo "=== Related manifest changes ==="
# Check if manifests/08_clusteroperator.yaml exists and contains relevant changes
fd -t f '08_clusteroperator.yaml' --exec cat {}

Length of output: 3628


Guard version removal behind OIDC mode

Unconditionally enabling WithVersionRemoval() will strip all missing versions, not just oauth-openshift. Wrap this option in the OIDC-specific path (or equivalent flag) to avoid unintended removal elsewhere, add an inline comment clarifying the scope, and ensure tests cover both OIDC and non-OIDC scenarios.

🤖 Prompt for AI Agents
In pkg/operator/starter.go around lines 479–481, the call that unconditionally
appends ss.WithVersionRemoval() must be guarded so version removal only happens
in OIDC mode; change the code to append that option only when the
OIDC/oauth-openshift mode flag or configuration is true (e.g., if oIDCEnabled {
statusControllerOptions = append(...)}), add an inline comment explaining this
is OIDC-specific behavior to avoid stripping missing versions for other auth
modes, and update/add unit/integration tests to assert WithVersionRemoval is
applied when OIDC is enabled and not applied when OIDC is disabled.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2025

@liouk: all tests passed!

Full PR test history. Your PR dashboard.

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.

@liouk
Copy link
Member Author

liouk commented Oct 14, 2025

Closing in favor of #798.

/close

@openshift-ci openshift-ci bot closed this Oct 14, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2025

@liouk: Closed this PR.

In response to this:

Closing in favor of #798.

/close

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.

@liouk liouk deleted the update-co-manifest-versions branch October 15, 2025 12:19
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants