Skip to content

WIP:OCPSTRAT-3618: Rebase 1.37 - #2408

Open
jubittajohn wants to merge 5 commits into
openshift:masterfrom
jubittajohn:rebase-1.37
Open

WIP:OCPSTRAT-3618: Rebase 1.37#2408
jubittajohn wants to merge 5 commits into
openshift:masterfrom
jubittajohn:rebase-1.37

Conversation

@jubittajohn

@jubittajohn jubittajohn commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores

    • Updated platform and compatibility dependencies to newer versions.
    • Improved authorization integration, including clearer handling of authorization conditions and configuration errors.
    • Removed obsolete feature-gate initialization and outdated test documentation.
  • Bug Fixes

    • Improved controller test reliability by preventing repeated synchronization callbacks from causing failures.
    • Existing functionality remains unchanged aside from compatibility, authorization, and reliability improvements.

@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 Aug 5, 2026
@openshift-ci
openshift-ci Bot requested review from bertinatto and deads2k August 5, 2026 21:13
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉


Walkthrough

The change updates Go dependencies, adds condition-aware authorization methods, propagates authorization union construction errors, removes obsolete feature-gate initialization, and guards a test channel against repeated closure.

Changes

Authorization and dependency maintenance

Layer / File(s) Summary
Go dependency and module updates
go.mod
Updates direct and indirect dependencies, removes two indirect modules, and adds OpenShift API and client-go replacement directives.
Conditions-aware authorization wiring
pkg/authorization/hardcodedauthorizer/metrics.go, pkg/controller/controllercmd/builder.go
Adds condition-aware methods to the metrics authorizer. Names authorization union members and returns errors from union.New.
Feature-gate cleanup and sync safety
pkg/manifestclient/read_roundtripper.go, pkg/manifestclient/testing/list_test.go, pkg/controller/factory/factory_test.go
Removes obsolete feature-gate initialization and its stale comment. Guards controllerSynced closure with sync.Once.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 3e419

The dependency rebase still leaves Kubernetes beta modules, an affected grpc version, and non-canonical OpenShift replacements in go.mod. This creates bounded production support, security, and supply-chain concerns, so merge should wait for approved dependency updates or documented owner approval.

Suggested labels: do-not-merge/work-in-progress, jira/valid-reference

Suggested reviewers: bertinatto, deads2k

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the tracked issue and the primary rebase and compatibility-maintenance purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only Go test setup and removes a comment; no Ginkgo title calls or test-name additions appear in the changed test files.
Test Structure And Quality ✅ Passed The PR changes no Ginkgo tests or It blocks; the only test logic change is a sync.Once guard in a standard Go test, which retains cancellation and a 30-second timeout.
Microshift Test Compatibility ✅ Passed The PR adds no Ginkgo e2e tests. Its only test changes are Go unit tests, and the diff adds no MicroShift-incompatible API or feature usage.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The diff adds no Ginkgo e2e tests or It/Describe/Context/When declarations; changed tests are existing Go unit tests, and the factory change only prevents double channel closure.
Topology-Aware Scheduling Compatibility ✅ Passed The merge-base diff changes only dependencies, authorization wiring, manifest-client cleanup, and tests; it adds no deployment manifests or topology-sensitive scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The PR adds no stdout writes or suite setup code; its only init change removes feature-gate initialization, and builder changes only construct the named authorizer union.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The review-range diff adds no files and changes only two existing unit tests; no new Ginkgo e2e tests or IPv4 or external-connectivity assumptions were introduced.
No-Weak-Crypto ✅ Passed The PR adds no weak-crypto APIs or comparisons; x/crypto changes are comment-only, and existing SHA1/3DES code is identical at the PR base and HEAD.
Container-Privileges ✅ Passed The PR changes only Go modules, Go source/tests, and vendored code; no container/K8s manifest changed and no listed privilege setting was added.
No-Sensitive-Data-In-Logs ✅ Passed The cumulative diff adds no first-party logging calls or sensitive fields; changed code covers authorization, feature gates, and test synchronization. New vendor logs have no first-party production...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Around line 41-49: Replace the Kubernetes v0.37.0-beta.0 dependencies in
go.mod, including the modules shown around k8s.io/api and related packages, with
approved stable versions and synchronize vendor/modules.txt. If a beta
dependency is intentionally retained, document the approved exception and ensure
this dependency graph is excluded from production builds.
- Around line 153-155: Remove the non-canonical github.com/openshift/api and
github.com/openshift/client-go replace directives so canonical OpenShift modules
are used. If fork usage is explicitly approved, retain them only with documented
owner approval and verified commits, module declarations, go.sum hashes,
licensing, OSV status, SBOM provenance, and signed artifacts.
- Line 140: Upgrade the google.golang.org/grpc dependency from v1.81.1 to
v1.82.1 or later, ensuring the module graph does not downgrade it. Refresh the
corresponding go.sum entries and vendor/modules.txt metadata to match the
upgraded dependency.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread go.mod Outdated
Comment thread go.mod Outdated
Comment thread go.mod Outdated
Comment on lines +153 to +155
replace (
github.com/openshift/api => github.com/jacobsee/openshift-api v0.0.0-20260723063153-cebda3324a87
github.com/openshift/client-go => github.com/jubittajohn/client-go v0.0.0-20260805200440-5e8c00d8a4c0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

go list -m -json github.com/openshift/api github.com/openshift/client-go
go mod graph | rg 'github.com/(openshift|jacobsee|jubittajohn)'
test -f go.sum
go mod verify

Repository: openshift/library-go

Length of output: 21922


Security Misconfiguration (CWE-829): Inclusion of Functionality from Untrusted Control Sphere

Remove or formally approve the non-canonical OpenShift module replacements.

These replace directives make builds consume external fork modules while retaining canonical github.com/openshift/... imports. Restore the canonical modules unless explicit owner approval exists. Otherwise, document the justification and verify the pinned commits, module declarations, go.sum hashes, license compatibility, OSV status, SBOM provenance, and signed artifacts. go mod verify does not establish fork ownership or supply-chain provenance.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 153 - 155, Remove the non-canonical
github.com/openshift/api and github.com/openshift/client-go replace directives
so canonical OpenShift modules are used. If fork usage is explicitly approved,
retain them only with documented owner approval and verified commits, module
declarations, go.sum hashes, licensing, OSV status, SBOM provenance, and signed
artifacts.

Source: Path instructions

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/authorization/hardcodedauthorizer/metrics.go (1)

35-42: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add regression coverage for conditions-aware authorization. TestAuthorizer only calls Authorize. Test ConditionsAwareAuthorize with allow and no-opinion attributes, and test EvaluateConditions for DecisionDeny, an empty reason, and authorizer.ErrorConditionEvaluationNotSupported.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/authorization/hardcodedauthorizer/metrics.go` around lines 35 - 42, Add
regression tests for metricsAuthorizer.ConditionsAwareAuthorize using both allow
and no-opinion attributes, verifying the corresponding conditions-aware
decisions. Add coverage for EvaluateConditions asserting DecisionDeny, an empty
reason, and authorizer.ErrorConditionEvaluationNotSupported.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/authorization/hardcodedauthorizer/metrics.go`:
- Around line 35-42: Add regression tests for
metricsAuthorizer.ConditionsAwareAuthorize using both allow and no-opinion
attributes, verifying the corresponding conditions-aware decisions. Add coverage
for EvaluateConditions asserting DecisionDeny, an empty reason, and
authorizer.ErrorConditionEvaluationNotSupported.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 172763d3-c758-4e40-aabe-3f83abc170b2

📥 Commits

Reviewing files that changed from the base of the PR and between 96c45c3 and 5080e73.

📒 Files selected for processing (4)
  • pkg/authorization/hardcodedauthorizer/metrics.go
  • pkg/controller/controllercmd/builder.go
  • pkg/manifestclient/read_roundtripper.go
  • pkg/manifestclient/testing/list_test.go
💤 Files with no reviewable changes (2)
  • pkg/manifestclient/testing/list_test.go
  • pkg/manifestclient/read_roundtripper.go

@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
go.mod (2)

140-140: ⚠️ Potential issue | 🟠 Major

Upgrade google.golang.org/grpc before merge.

Line 140 selects v1.81.1. GO-2026-6061 affects versions before v1.82.1 and covers the HTTP/2 transport and xDS RBAC packages. (osv.dev) Upgrade to v1.82.1 or later, then refresh go.sum and vendored metadata.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 140, Upgrade the google.golang.org/grpc dependency from
v1.81.1 to v1.82.1 or later, then regenerate go.sum and all vendored metadata to
match the selected version.

Source: Linters/SAST tools


41-49: ⚠️ Potential issue | 🟠 Major

Do not merge the Kubernetes beta dependencies without an approved exception.

The module graph selects v0.37.0-beta.0 for multiple Kubernetes modules, including k8s.io/streaming. Replace these versions with approved stable releases, or document an approved exception and prevent this graph from entering production builds.

Also applies to: 146-146

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 41 - 49, Replace the v0.37.0-beta.0 Kubernetes
dependencies in go.mod, including the selected k8s.io/streaming version, with
approved stable releases across the module graph. If beta versions are required,
document the approved exception and add a production-build safeguard preventing
this dependency graph from being used.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Around line 153-155: Remove the non-canonical replace directives for
github.com/openshift/api and github.com/openshift/client-go from the go.mod
replace block; if they are required, obtain formal owner approval and document
the requested provenance, licensing, vulnerability, hash, SBOM, and signature
verification before retaining them.

---

Duplicate comments:
In `@go.mod`:
- Line 140: Upgrade the google.golang.org/grpc dependency from v1.81.1 to
v1.82.1 or later, then regenerate go.sum and all vendored metadata to match the
selected version.
- Around line 41-49: Replace the v0.37.0-beta.0 Kubernetes dependencies in
go.mod, including the selected k8s.io/streaming version, with approved stable
releases across the module graph. If beta versions are required, document the
approved exception and add a production-build safeguard preventing this
dependency graph from being used.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread go.mod Outdated
Comment on lines +153 to +155
replace (
github.com/openshift/api => github.com/jacobsee/openshift-api v0.0.0-20260806204542-cfe07ec0f95b
github.com/openshift/client-go => github.com/jubittajohn/client-go v0.0.0-20260806210316-cf531a43afcf

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove or formally approve the non-canonical module replacements.

These directives redirect canonical OpenShift imports to external fork modules. Remove them before merge, or document owner approval and verify commit provenance, module declarations, licenses, OSV status, hashes, SBOM provenance, and artifact signatures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 153 - 155, Remove the non-canonical replace directives
for github.com/openshift/api and github.com/openshift/client-go from the go.mod
replace block; if they are required, obtain formal owner approval and document
the requested provenance, licensing, vulnerability, hash, SBOM, and signature
verification before retaining them.

Source: Path instructions

@bertinatto

Copy link
Copy Markdown
Member

/assign

@jubittajohn jubittajohn changed the title WIP: Rebase 1.37 WIP:OCPSTRAT-3618: Rebase 1.37 Aug 18, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 18, 2026

Copy link
Copy Markdown

@jubittajohn: This pull request references OCPSTRAT-3618 which is a valid jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Chores
  • Completed routine platform maintenance and compatibility updates across supported infrastructure components.
  • Improved authorization integration and handling for compatibility with newer platform capabilities.
  • Enhanced handling of authorization conditions and configuration errors.
  • Removed obsolete feature-gate initialization and outdated test documentation.
  • No new user-facing features were added; existing functionality remains unchanged aside from improved compatibility and error handling.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci

openshift-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jubittajohn
Once this PR has been reviewed and has the lgtm label, please ask for approval from bertinatto. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@jubittajohn

Copy link
Copy Markdown
Contributor Author

/test unit

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Signed-off-by: jubittajohn <jujohn@redhat.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
…nges in k8s 1.37

Signed-off-by: jubittajohn <jujohn@redhat.com>
The feature gate graduated to GA and was removed in k8s 1.37. LabelSelector is now populated unconditionally in RequestInfo.

Signed-off-by: jubittajohn <jujohn@redhat.com>
The testControllerWithInformer helper uses defer close(controllerSynced) in the sync function, which panics if sync runs more than once. The k8s 1.37 rebase changed informer event dispatch timing in client-go (shared_informer.go, controller.go), widening the window where a second work item can be processed before the controller fully shuts down. This causes a "close of closed channel" panic that crashes the test binary with exit code 2. Fix by wrapping the channel close in sync.Once so it executes exactly once regardless of how many times sync is called.

Signed-off-by: jubittajohn <jujohn@redhat.com>
@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@jubittajohn: 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.

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

Labels

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.

3 participants