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

refactor: add default implementation for name() #2255

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

metacosm
Copy link
Collaborator

keep name on DR node,Signed-off-by: Chris Laprun [email protected]

@metacosm metacosm requested a review from csviri February 28, 2024 13:00
@openshift-ci openshift-ci bot requested a review from adam-sandor February 28, 2024 13:01
Copy link
Collaborator

@csviri csviri left a 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

@@ -54,6 +54,9 @@ public Optional<Condition<R, P>> getReconcilePrecondition() {
return Optional.ofNullable(reconcilePrecondition);
}

public String getName() {
Copy link
Collaborator

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()

Copy link
Collaborator Author

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. :)

Copy link
Collaborator

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

Copy link
Collaborator

@csviri csviri Mar 1, 2024

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 :)

Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

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

LGTM

@csviri csviri merged commit ac93528 into aggregate-excetion-name Mar 4, 2024
2 checks passed
@csviri csviri deleted the dr-name-fix branch March 4, 2024 09:12
csviri pushed a commit that referenced this pull request Mar 4, 2024
Signed-off-by: Chris Laprun <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
csviri added a commit that referenced this pull request Mar 4, 2024
* 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]>
csviri added a commit that referenced this pull request Mar 7, 2024
* 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]>
csviri added a commit that referenced this pull request Mar 11, 2024
* 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]>
csviri added a commit that referenced this pull request Apr 10, 2024
* 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]>
metacosm added a commit that referenced this pull request Apr 10, 2024
* 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]>
metacosm added a commit that referenced this pull request Apr 11, 2024
* 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]>
csviri added a commit that referenced this pull request May 17, 2024
* 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]>
csviri added a commit that referenced this pull request May 17, 2024
* 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]>
csviri added a commit that referenced this pull request May 21, 2024
* 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]>
csviri added a commit that referenced this pull request Jun 17, 2024
* 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]>
metacosm added a commit that referenced this pull request Jul 8, 2024
* 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]>
metacosm added a commit that referenced this pull request Jul 9, 2024
* 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]>
metacosm added a commit that referenced this pull request Jul 12, 2024
* 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]>
csviri added a commit that referenced this pull request Aug 8, 2024
* 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]>
csviri added a commit that referenced this pull request Aug 15, 2024
* 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]>
metacosm added a commit that referenced this pull request Aug 29, 2024
* 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]>
csviri added a commit that referenced this pull request Sep 20, 2024
* 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]>
metacosm added a commit that referenced this pull request Oct 10, 2024
* 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]>
metacosm added a commit that referenced this pull request Nov 5, 2024
* 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]>
metacosm added a commit that referenced this pull request Nov 6, 2024
* 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]>
csviri added a commit that referenced this pull request Nov 13, 2024
* 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]>
metacosm added a commit that referenced this pull request Nov 19, 2024
* 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]>
metacosm added a commit that referenced this pull request Nov 20, 2024
* 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]>
metacosm added a commit that referenced this pull request Nov 27, 2024
* 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]>
csviri added a commit that referenced this pull request Dec 6, 2024
* 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]>
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.

2 participants