Skip to content

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

Merged
negz merged 1 commit intocrossplane:mainfrom
MisterMX:feat/controller-runtime-v0.19.0
Sep 17, 2024
Merged

feat: Upgrade controller-runtime to v0.19.0#760
negz merged 1 commit intocrossplane:mainfrom
MisterMX:feat/controller-runtime-v0.19.0

Conversation

@MisterMX
Copy link
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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

// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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