-
Notifications
You must be signed in to change notification settings - Fork 216
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
refactor: add default implementation for name() #2255
Conversation
Signed-off-by: Chris Laprun <[email protected]>
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.
Added to minor things to discuss otherwise looks good to me
...rc/main/java/io/javaoperatorsdk/operator/processing/dependent/AbstractDependentResource.java
Show resolved
Hide resolved
@@ -54,6 +54,9 @@ public Optional<Condition<R, P>> getReconcilePrecondition() { | |||
return Optional.ofNullable(reconcilePrecondition); | |||
} | |||
|
|||
public String getName() { |
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 not very good practice in my opinion, it kinda implies that it's the name of the dependent node not the dependent resource. I would either remove this, and always access the name though DependentResource or rename this to getDependentResourceName()
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.
DependentResourceNode
is an internal class so I'd argue that it doesn't really matter and since Dependent Resources always have names now, the name of the node is the name of the associated dependent, which this method captures. This certainly could be reverted but, to me, it's pretty clear that the name of the DRN is the name of the associated DR. :)
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.
pls do, when started looking it was kinda confusing now, what now we are talking about
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 really small thing, at least for me it is much easier to jump to a conclusion with that pattern :)
Signed-off-by: Chris Laprun <[email protected]>
…ethod Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Chris Laprun <[email protected]>
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.
LGTM
Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
* feat: move name is directly to dependent resource - use this name when throwing aggregate exception Signed-off-by: Attila Mészáros <[email protected]> * refactor to use a dedicated interface for setting the name Signed-off-by: Attila Mészáros <[email protected]> * refactor: add default implementation for name() (#2255) Signed-off-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]> --------- Signed-off-by: Attila Mészáros <[email protected]> Signed-off-by: Chris Laprun <[email protected]> Co-authored-by: Chris Laprun <[email protected]> Signed-off-by: Attila Mészáros <[email protected]>
keep name on DR node,Signed-off-by: Chris Laprun [email protected]