Skip to content

bump crossplane-runtime to v2.2.0#602

Merged
erhancagirici merged 6 commits intocrossplane:mainfrom
fernandezcuesta:fix-runtime
Mar 18, 2026
Merged

bump crossplane-runtime to v2.2.0#602
erhancagirici merged 6 commits intocrossplane:mainfrom
fernandezcuesta:fix-runtime

Conversation

@fernandezcuesta
Copy link
Contributor

@fernandezcuesta fernandezcuesta commented Feb 19, 2026

Update generated webhook registration to match controller-runtime v0.20+ API

Description of your changes

Motivation: The controller-runtime library changed the NewWebhookManagedBy API. Prior to this change, provider-pagerduty (where I first found out this issue) generated by Upjet v2.2 fail to compile against current versions of controller-runtime.

Relevant version upgrades (one leading to the other):

  • crossplane-runtime to v2.2.0
  • controller-runtime to v0.23.3
  • k8s.io/* v0.35.2
  • go 1.25.8

Update the controller template to use the new ctrl.NewWebhookManagedBy(mgr, object) signature, replacing the deprecated ctrl.NewWebhookManagedBy(mgr).For(object) builder pattern, as per controller-runtime documentation.

No other issues found from controller-runtime v0.19.0 -> v0.23.1 (actually, GetEventRecorderFor in favor of GetEventRecorder is blocked by crossplane-runtime).

Also, due to the indirect upgrade to k8s.io/* to v0.35.0, test fake structs were annotated (json: tags annotations) to maintain compatibility.

Fixes #604

I have:

  • Read and followed Upjet's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Built a rc for provider-pagerduty using these fixes, currently running with no issues in a staging cluster.

Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
@fernandezcuesta fernandezcuesta force-pushed the fix-runtime branch 2 times, most recently from d943cd8 to 9da8978 Compare February 23, 2026 21:30
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Copy link
Collaborator

@erhancagirici erhancagirici left a comment

Choose a reason for hiding this comment

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

@fernandezcuesta thanks for the PR! Looks good already, just some minor polishing requests:
To keep the PR scope focused, could you rebase your PR and exclude golangci-lint related changes? #576 was merged to handle changes related to linter.

@erhancagirici erhancagirici changed the title fix: update controller runtime bump crossplane-runtime to v2.2.0 Mar 10, 2026
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
@fernandezcuesta
Copy link
Contributor Author

@fernandezcuesta thanks for the PR! Looks good already, just some minor polishing requests: To keep the PR scope focused, could you rebase your PR and exclude golangci-lint related changes? #576 was merged to handle changes related to linter.

@erhancagirici merged from main and bumped up go to the latest 1.25 minor revision.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f0156a71-9ef0-4699-846f-8d6c4a0f77b1

📥 Commits

Reviewing files that changed from the base of the PR and between c46846a and 4fee739.

⛔ Files ignored due to path filters (4)
  • go.mod is excluded by none and included by none
  • go.sum is excluded by !**/*.sum and included by none
  • pkg/pipeline/templates/controller.go.tmpl is excluded by none and included by none
  • pkg/resource/fake/terraformed.go is excluded by !**/fake/** and included by **/*.go
📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The Go toolchain version in the CI/CD configuration has been updated from 1.24 to 1.25.8, changing the GO_VERSION environment variable that is referenced throughout the CI pipeline for build and test operations.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/ci.yml
Updated GO_VERSION environment variable from "1.24" to "1.25.8" to specify the Go toolchain version for CI pipeline steps.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 inconclusive)

Check name Status Explanation Resolution
Configuration Api Breaking Changes ❌ Error PR introduces breaking changes to Configuration API without required 'breaking-change' label. Public struct fields are unexported and renamed, affecting downstream providers. Add 'breaking-change' label and update PR description with migration guidance for downstream providers using new getter/setter methods.
Title check ❓ Inconclusive The PR title 'bump crossplane-runtime to v2.2.0' is descriptive and directly related to the primary change objective, though the actual code changes focus on updating the Go toolchain version and webhook API compatibility. The title references crossplane-runtime upgrade but the raw summary shows only Go version changes (1.24→1.25.8). Clarify whether this PR's main change is the runtime version bump or Go toolchain update.
Out of Scope Changes check ❓ Inconclusive The PR includes changes to CI configuration (Go version bump to 1.25.8) that appear tangential to the primary webhook API update objective stated in the description and linked issue. The Go version change in .github/workflows/ci.yml should be verified as intentional and scoped to the crossplane-runtime v2.2.0 compatibility objective, or moved to a separate PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset, explaining API changes in controller-runtime, the need for webhook registration updates, and the motivation behind the upgrade.
Linked Issues check ✅ Passed The PR addresses issue #604's objective to upgrade crossplane-runtime to v2.2 and update generated providers accordingly. The changes update webhook registration to match new controller-runtime APIs as required.
Generated Code Manual Edits ✅ Passed PR modifies only CI configuration, dependency management, generator template, and test code—no generated files matching zz_*.go pattern.
Template Breaking Changes ✅ Passed The custom check warns about modifications to pkg/controller/external*.go templates. Investigation reveals these files are newly added (status "A"), not modified. The only substantive change is the Go version update in .github/workflows/ci.yml (1.24 → 1.25.8). The template file already contains the updated webhook registration pattern required for controller-runtime v0.23.1 compatibility, aligning with PR objectives to support crossplane-runtime v2.2.0. No breaking template modifications are being introduced.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

Signed-off-by: Erhan Cagirici <erhan@upbound.io>
Copy link
Collaborator

@erhancagirici erhancagirici left a comment

Choose a reason for hiding this comment

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

@fernandezcuesta thanks for handling this! LGTM

@erhancagirici erhancagirici merged commit 7329586 into crossplane:main Mar 18, 2026
8 checks passed
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.

Upgrade crossplane-runtime to v2.2

2 participants