-
Notifications
You must be signed in to change notification settings - Fork 219
refactor: isolate bulk dependent resource handling more #1530
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
Conversation
e5e2bf3
to
bfe3e67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went through this briefly, tbh I have mixed feelings. I agree that this is kinda more structured, but also was much harder to follow the flow of the execution, since bidirectional references etc. There are some parts that is not entirely clear for me, will take a deeper look on that tomorrow.
} | ||
} | ||
|
||
private static class UpdatableBulkDependentResourceInstance<R, P extends HasMetadata> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why this is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed so that we can have the exact same interface for a "single" or bulk dependent in AbstractDependentResource
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More specifically, this is needed to be able to do this: https://github.com/java-operator-sdk/java-operator-sdk/pull/1530/files#diff-0d27f73ffef40826943dbbef3e9a2a1e74e2a10341627042ffa5a792d03c3638R39. In order to do it this way, the objects we iterate over need to be AbstractDependentResources
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a comment where it is not clear to me why that is needed. But otherwise although it makes it harder imho to read/follow the flow of the exection, it seprates the two type of logic, let's see how it work out.
Kudos, SonarCloud Quality Gate passed! |
No description provided.