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: clean up informer configuration classes #2470

Merged
merged 12 commits into from
Aug 9, 2024
Merged

Conversation

metacosm
Copy link
Collaborator

  • refactor: move @InformerConfig to more appropriate package
  • refactor: move InformerConfigHolder to appropriate package
  • chore: remove unneeded code & dependencies
  • refactor: InformerConfiguration to InformerEventSourceConfiguration
  • refactor: rename inner InformerConfigurationBuilder to simply Builder
  • refactor: rename InformerConfig and associated field to Informer
  • refactor: rename InformerConfigHolder to InformerConfiguration

@metacosm metacosm self-assigned this Jul 12, 2024
@metacosm metacosm requested a review from csviri July 12, 2024 14:12
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 12, 2024

private ControllerConfigurationOverrider(ControllerConfiguration<R> original) {
this.finalizer = original.getFinalizerName();
this.generationAware = original.isGenerationAware();
this.config = InformerConfigHolder.builder(original.getResourceClass())
this.config = InformerConfiguration.builder(original.getResourceClass())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't be it confusing that there is now an InformerEventSourceConfiguration renamed from InformerConfiguration, but there is now a new InformerConfiguration for something else?
Also an @Informer that is basically the new InformerConfiguration just represented by annotation?

Not what would be better, just might be confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We would definitely need to document it and add it to the javadoc as well so that the information is available contextually. I think this cleans things nicely this way, though, because having multiple things names InformerConfig-something was getting quite confusing, especially when some of them were not even related to informers at all…

@metacosm metacosm marked this pull request as ready for review August 8, 2024 16:39
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 8, 2024
csviri and others added 12 commits August 8, 2024 21:19
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Fixes #2424.

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 9, 2024
@metacosm metacosm merged commit a6621c2 into next Aug 9, 2024
20 checks passed
@metacosm metacosm deleted the rename-infoconfig branch August 9, 2024 13:35
csviri added a commit that referenced this pull request Aug 15, 2024
* chore: set version to 5.0.0-SNAPSHOT (#2200)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* improve: replace current formatting plugins with spotless plugin  (#2302)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* fix: format after rebase

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* bump: chore use slf4j v2 (#2406)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* feat: allow returning additional information from conditions (#2426)

Fixes #2424.

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move @InformerConfig to more appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move InformerConfigHolder to appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* chore: remove unneeded code & dependencies

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: InformerConfiguration to InformerEventSourceConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename inner InformerConfigurationBuilder to simply Builder

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfig and associated field to Informer

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfigHolder to InformerConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
metacosm added a commit that referenced this pull request Aug 29, 2024
* chore: set version to 5.0.0-SNAPSHOT (#2200)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* improve: replace current formatting plugins with spotless plugin  (#2302)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* fix: format after rebase

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* bump: chore use slf4j v2 (#2406)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* feat: allow returning additional information from conditions (#2426)

Fixes #2424.

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move @InformerConfig to more appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move InformerConfigHolder to appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* chore: remove unneeded code & dependencies

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: InformerConfiguration to InformerEventSourceConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename inner InformerConfigurationBuilder to simply Builder

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfig and associated field to Informer

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfigHolder to InformerConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
csviri added a commit that referenced this pull request Sep 20, 2024
* chore: set version to 5.0.0-SNAPSHOT (#2200)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* improve: replace current formatting plugins with spotless plugin  (#2302)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* fix: format after rebase

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* bump: chore use slf4j v2 (#2406)

Signed-off-by: Attila Mészáros <csviri@gmail.com>

* feat: allow returning additional information from conditions (#2426)

Fixes #2424.

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move @InformerConfig to more appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: move InformerConfigHolder to appropriate package

Signed-off-by: Chris Laprun <claprun@redhat.com>

* chore: remove unneeded code & dependencies

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: InformerConfiguration to InformerEventSourceConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename inner InformerConfigurationBuilder to simply Builder

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfig and associated field to Informer

Signed-off-by: Chris Laprun <claprun@redhat.com>

* refactor: rename InformerConfigHolder to InformerConfiguration

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Attila Mészáros <csviri@gmail.com>
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