Skip to content

chore (deps) : bump controller-runtime to v0.18.7 #1435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rohanKanojia
Copy link
Contributor

@rohanKanojia rohanKanojia commented May 19, 2025

What does this PR do?

Bump controller-runtime dependency to v0.18.7

There are lots of changes in controller-runtime since last upgrade. They're listed below:

  • Port removed from controller Options, we now have to create a separate WebhookServer object and add it to manager

  • Add new argument ctx.Context in Watch handler method

  • source.Kind not available in latest versions anymore, use directly type instead in Watch()

  • MetricsBindAddress no longer available in controller Options, use Metrics object instead.

  • cache.SelectorsByObject no longer present in cache package, users are advised to use ByObject inside cache Options instead

  • cache.BuilderWithOptions no longer present in controller-runtime, use inline method in return instead.

  • fake.NewFakeClientWithScheme not available anymore, use fake.NewClientBuilder() instead

  • Replace corev1.ResourceRequirements with corev1.VolumeResourceRequirements

  • Specify finalizers in finalize_test wherever DeletionTimestamp is provided to avoid error thrown by test for missing finalizers

  • admission.Decoder is an interface now, previously it was a concrete type.

  • The runtime injection functionality has been deprecated since Controller Runtime 0.10; all of the above fields can be passed from the Manager to structs or interfaces that need them.

Signed-off-by: Rohan Kumar rohaan@redhat.com

What issues does this PR fix or reference?

Related to #1343

Is it tested? How?

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Copy link

openshift-ci bot commented May 19, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

openshift-ci bot commented May 19, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch 6 times, most recently from b6a9bd0 to f8be1e8 Compare May 19, 2025 17:01
@rohanKanojia
Copy link
Contributor Author

/ok-to-test

@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch 2 times, most recently from fd3ece6 to 3367e00 Compare May 20, 2025 08:08
@rohanKanojia
Copy link
Contributor Author

/ok-to-test

@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch from 3367e00 to 4d146d8 Compare May 20, 2025 11:59
Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 29.09091% with 39 lines in your changes missing coverage. Please review.

Project coverage is 39.61%. Comparing base (efb5ad6) to head (4d146d8).

Files with missing lines Patch % Lines
webhook/main.go 0.00% 15 Missing ⚠️
pkg/cache/cache.go 40.00% 9 Missing ⚠️
main.go 0.00% 7 Missing ⚠️
webhook/workspace/config.go 0.00% 3 Missing ⚠️
...ollers/cleanupcronjob/cleanupcronjob_controller.go 0.00% 2 Missing ⚠️
controllers/workspace/devworkspace_controller.go 85.71% 0 Missing and 1 partial ⚠️
webhook/workspace/mutate.go 0.00% 1 Missing ⚠️
webhook/workspace/validate.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1435      +/-   ##
==========================================
- Coverage   39.66%   39.61%   -0.06%     
==========================================
  Files         160      160              
  Lines       13139    13143       +4     
==========================================
- Hits         5211     5206       -5     
- Misses       7551     7560       +9     
  Partials      377      377              

☔ 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.

@rohanKanojia
Copy link
Contributor Author

/ok-to-test

@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch from 4d146d8 to 95cf08f Compare May 20, 2025 16:59
@rohanKanojia
Copy link
Contributor Author

/ok-to-test

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch from 95cf08f to d203b5e Compare May 21, 2025 06:22
Updated CRD manifests in deploy/ directory to include new requirements
in controller-runtime upgrade

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch from d203b5e to 74dcefa Compare May 21, 2025 06:34
@rohanKanojia
Copy link
Contributor Author

/ok-to-test

Bump devfile/api/v2 dependency to pinned commit as per latest main
branch at this time.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia rohanKanojia force-pushed the pr/bump-controller-runtime branch from 1caae53 to 792275d Compare May 22, 2025 04:46
@rohanKanojia
Copy link
Contributor Author

/ok-to-test

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

Successfully merging this pull request may close these issues.

1 participant