-
Notifications
You must be signed in to change notification settings - Fork 409
feature: clean reconcilers casting to types #3288
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
Comments
/assign |
Hi I'd like to take this issue up. As you mentioned, I think as well that a shared utils package would make sense here. wdyt about Moreover, while navigating the codebase, I got curious around the significance of the package |
Hi all! Jumping into the discussion because I would like to contribute 😄 Since those casting are in many parts of the codebase and the resulting PR can be quite big, I am wondering whether it should be divided into smaller ones. Does it make sense? If so, which are the high priority controllers to adapt to this? @mjudeikis Also, does this code fall under the modifications indicated by this issue?
Here there is no check on the success of the cast, should we enforce it? |
Hi folks! @yashvardhan-kukreja are you still working on this?
My take on this is that it should be in
I would say start with whatever looks good to you. As soon as we have established a package for this, we can incrementally migrate basically whatever controllers are low hanging fruits. |
And apologies for the lack of replies on this issue, we very much appreciate external contributions and hope to enable you to become kcp contributors here! |
Feature Description
We have bunch of reconcilers doing these castings:
or
We been standartizing around:
where
Meaning this makes it safer casting and makes it less boilerpaltes.
Would be good to find shared place for
func objOrTombstone[T runtime.Object](obj any) T
as now we copy it around. I don't like shared utils packages but maybe this one would be fine?Proposed Solution
fix as above ^
Alternative Solutions
No response
Want to contribute?
Additional Context
No response
The text was updated successfully, but these errors were encountered: