You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading to crossplane-runtime 2.2.0 in one of our providers, we noticed new linter violations. Example:
internal/controller/config/config.go:43:52: SA1019: mgr.GetEventRecorderFor is deprecated: this uses the old events API and will be removed in a future release. Please use GetEventRecorder instead. (staticcheck)
providerconfig.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))
This seems to happen because controller-runtime has started migration to the new K8s events API: events.k8s.io.
The only workaround available right now appears to suppress the lint error. It would be nice if crossplane-runtime provided a migration path to the new K8s events API
Thanks for pointing this out @erikgb! I think this is something @adamwg ran into during the v2.2 release, see crossplane/crossplane#7150. We are doing a nolint for these right now as well 😣
We have tracking issues for two of flavors of these changes from controller-runtime we have no linted:
So I think we have this issue covered already with crossplane/crossplane#7152 - I'll close as dupe and feel free to help contribute a fix PR! Thank you! 🙇♂️
Activity
jbw976 commentedon Mar 2, 2026
Thanks for pointing this out @erikgb! I think this is something @adamwg ran into during the v2.2 release, see crossplane/crossplane#7150. We are doing a
nolintfor these right now as well 😣We have tracking issues for two of flavors of these changes from controller-runtime we have no linted:
Applymethod in controller-runtime clients crossplane#7151So I think we have this issue covered already with crossplane/crossplane#7152 - I'll close as dupe and feel free to help contribute a fix PR! Thank you! 🙇♂️