Skip to content
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

feat: Upgrade controller-runtime to v0.19.0 #760

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

MisterMX
Copy link
Contributor

Description of your changes

This upgrades sigs.k8s.io/controller-runtime to v0.19.0. Since this library is prone to breaking changes some adjustments are made to apply to some changed interfaces. There should be no breaking changes for programs using only crossplane-runtime.

I have:

Need help with this checklist? See the cheat sheet.

@MisterMX MisterMX requested a review from a team as a code owner August 21, 2024 09:22
@MisterMX MisterMX requested a review from negz August 21, 2024 09:22
@MisterMX MisterMX requested a review from phisco August 21, 2024 09:23
@@ -181,7 +181,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reco
if err := r.client.Delete(ctx, pcu); resource.IgnoreNotFound(err) != nil {
log.Debug(errDeletePCU, "error", err)
r.record.Event(pc, event.Warning(reasonAccount, errors.Wrap(err, errDeletePCU)))
return reconcile.Result{RequeueAfter: shortWait}, nil //nolint:nilerr // Returning err would make us requeue instantly.
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like golangci-lint still wanted this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it. Seems there was a mismatch between the CI and my local linter.

Adjust code to apply to breaking changes in controller-runtime. There
should be no breaking changes for programs using crossplane-runtime.

Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>
@MisterMX MisterMX force-pushed the feat/controller-runtime-v0.19.0 branch from 123124e to 3b73e8e Compare August 26, 2024 09:49
addProviderConfig(evt.Object, q)
}

// Generic adds a NamespacedName for the supplied GenericEvent if its Object is
// a ProviderConfigReferencer.
func (e *EnqueueRequestForProviderConfig) Generic(_ context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 Aren't these breaking changes? I guess it's fine though

Copy link
Contributor

@phisco phisco left a comment

Choose a reason for hiding this comment

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

overall looks good, not super opinionated on the type aliases, leaving the last call to @negz 🙏

Comment on lines +28 to +32
// BucketRateLimiter for a standard crossplane reconciler.
type BucketRateLimiter = workqueue.TypedBucketRateLimiter[string]

// RateLimiter for a standard crossplane reconciler.
type RateLimiter = workqueue.TypedRateLimiter[string]
Copy link
Member

Choose a reason for hiding this comment

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

Are these type aliases necessary, or just for readability?

I think I like them - just curious.

Copy link
Member

@negz negz left a comment

Choose a reason for hiding this comment

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

Sorry for the delay - I've been out sick.

@negz negz merged commit 08da772 into crossplane:main Sep 17, 2024
9 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.

3 participants