Skip to content

🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge)#2486

Open
camilamacedo86 wants to merge 9 commits intooperator-framework:mainfrom
camilamacedo86:deps-up
Open

🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge)#2486
camilamacedo86 wants to merge 9 commits intooperator-framework:mainfrom
camilamacedo86:deps-up

Conversation

@camilamacedo86
Copy link
Contributor

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings February 5, 2026 13:15
@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 Feb 5, 2026
@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 4ce7ef4
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/69852dee70458d0008bcbb59
😎 Deploy Preview https://deploy-preview-2486--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@openshift-ci
Copy link

openshift-ci bot commented Feb 5, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign grokspawn for approval. 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

Copilot AI review requested due to automatic review settings February 5, 2026 13:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…0.23.0

controller-runtime v0.23.0 introduced type-safe webhook builders using generics.
Webhook methods now receive typed objects directly instead of runtime.Object,
eliminating the need for type assertions and providing compile-time type safety.

Changes:
- Update ClusterCatalog webhook Default method to use *ocv1.ClusterCatalog
- Update SetupWebhookWithManager to pass type to NewWebhookManagedBy
- Simplify tests to leverage type safety (no type assertion tests needed)


Assisted-by: Cursor/Claude
@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 31.57895% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.16%. Comparing base (910fa59) to head (4ce7ef4).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
test/utils.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2486      +/-   ##
==========================================
+ Coverage   69.73%   73.16%   +3.42%     
==========================================
  Files         102      102              
  Lines        8471     8480       +9     
==========================================
+ Hits         5907     6204     +297     
+ Misses       2091     1798     -293     
- Partials      473      478       +5     
Flag Coverage Δ
e2e 45.97% <100.00%> (-0.31%) ⬇️
experimental-e2e 53.52% <100.00%> (+40.53%) ⬆️
unit 57.75% <26.31%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings February 5, 2026 15:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 5, 2026 15:59
@camilamacedo86 camilamacedo86 changed the title WIP: 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 5, 2026
@camilamacedo86 camilamacedo86 changed the title 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) WIP 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

camilamacedo86 and others added 6 commits February 5, 2026 16:46
controller-runtime v0.23.0 changed test environment teardown timing behavior.
Direct calls to testEnv.Stop() can fail intermittently due to graceful shutdown timing,
requiring retry logic to ensure proper cleanup.

Changes:
- Add StopWithRetry helper function to test/utils.go with retry logic
- Wrap testEnv.Stop() calls with retry helper (1-minute timeout, 1-second interval)
- Add error logging for each retry attempt to aid debugging
- Update api/v1/suite_test.go to use test.StopWithRetry
- Update internal/operator-controller/controllers/suite_test.go to use test.StopWithRetry

This shared utility follows DRY principle and ensures consistent teardown behavior
across all test suites, preventing flaky test failures during teardown.

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	api/v1/suite_test.go
#	internal/operator-controller/controllers/suite_test.go
…v0.23.0

controller-runtime v0.23.0 added Apply method to the StatusWriter interface
for server-side apply support on status subresources.

Changes:
- Add Apply method to statusWriterMock to satisfy StatusWriter interface
- Method signature: Apply(context.Context, runtime.ApplyConfiguration, ...SubResourceApplyOption)


Assisted-by: Cursor/Claude
The client.Apply patch type constant is deprecated in controller-runtime v0.23.0+
in favor of typed Apply methods that require generated apply configurations.

However, server-side apply with field ownership management is essential for this
controller to properly manage ClusterExtensionRevision lifecycle. The deprecated
client.Apply provides:
- Field ownership via client.FieldOwner()
- Force ownership via client.ForceOwnership
- Automatic create-or-update semantics

Alternative approaches (MergeFrom, StrategicMerge) lack field management support,
causing upgrade test failures where ownership conflicts prevent proper updates during
controller upgrades.

Changes:
- Keep client.Apply usage with comprehensive nolint explanation
- Document why server-side apply semantics are required
- Note migration path: generate apply configurations project-wide

This ensures controllers work correctly during upgrades while documenting the
technical debt for future migration.

Assisted-by: Cursor/Claude
The fake.NewSimpleClientset is deprecated in client-go in favor of
fake.NewClientset which provides better support for field management
and server-side apply testing.

The migration is straightforward for tests that don't require apply
configurations - simply replace NewSimpleClientset() with NewClientset().
The new implementation works seamlessly with existing reactor-based mocking.

Changes:
- Replace fake.NewSimpleClientset() with fake.NewClientset()
- Remove nolint suppression comment
- All tests pass without modifications

Assisted-by: Cursor/Claude
Address code review feedback by making the Apply method implementation
more defensive:

- Add applyCalled tracking field to statusWriterMock
- Return error if Apply is unexpectedly called during tests
- This ensures tests fail immediately if the code starts using Apply,
  rather than silently passing with incorrect assumptions

The error message clearly indicates this method is not expected to be
used, making debugging easier if the interface usage changes in the future.

Assisted-by: Cursor/Claude
Controller-runtime v0.23.1+ has faster leader election startup, causing timing
issues with the upgrade e2e tests that watch pod logs for leader election messages.

The log watching approach fails because it uses Follow=true which only streams NEW
logs, missing messages emitted before the test starts watching. With faster startup
in v0.23.1+, leader election often completes before the test begins watching.

Changes:
- Replace log watching with direct lease object checking
- Poll lease.Spec.HolderIdentity to confirm leader election occurred
- More reliable than log watching, independent of timing
- Add k8s.io/utils/ptr import for log options

This approach is timing-independent and directly verifies the desired state
rather than relying on log message observation.

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>
…ernetes v1.35

Kubernetes v1.35 changed CEL validation error message format to include
the actual validated value instead of just the type ("string" or "object").
This provides more helpful error messages for debugging validation failures.

This commit was accidentally dropped during interactive rebase.

Changes:
- Update test expectations to include actual values in error messages
- Change from 'Invalid value: "string"' to 'Invalid value: "actual-value"'
- Update 20+ test cases in TestImageSourceCELValidationRules and related tests
- Fix indentation consistency across all test cases

Assisted-by: Cursor/Claude
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings February 5, 2026 23:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Track in a future issue: "Generate apply configurations and migrate to typed Apply methods"
//
// nolint:staticcheck // SA1019: server-side apply required, needs generated apply configurations
return bc.Client.Patch(ctx, rev, client.Apply, client.FieldOwner(bc.FieldOwner), client.ForceOwnership)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: Lets looking on that in a follow up shows very complex to go in this PR

@camilamacedo86 camilamacedo86 changed the title WIP 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) 🌱 chore(deps): upgrade k8s to 1.35 and Go dependencies (edge) Feb 6, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant