Skip to content

fix: do not output warning when resolving a configuration #2892

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

Merged
merged 3 commits into from
Aug 13, 2025

Conversation

metacosm
Copy link
Collaborator

@metacosm metacosm commented Aug 8, 2025

Signed-off-by: Chris Laprun [email protected]

@metacosm metacosm self-assigned this Aug 8, 2025
@metacosm metacosm requested review from csviri and xstefank August 8, 2025 15:06
Copy link
Collaborator

@xstefank xstefank left a comment

Choose a reason for hiding this comment

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

I'm not sure which solution is better for this problem, but if this would go in there are a few points.

* prevent automated, on-demand creation of a reconciler's configuration, please use the
* {@link AbstractConfigurationService} implementation instead as base for your extension.
*/
@Deprecated(forRemoval = true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Somewhat strange to introduce a new usage of the method and deprecate it at the same time. How will this be handled when this method is removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current implementation uses the method but the documentation explains what should happen instead. It's only deprecated to avoid API breakage in case implementations use it but this method should really be removed, because, as far as I'm aware, there is no implementation that doesn't currently return true and the creation scenario should only be confined to this particular implementation (or its subclasses) anyway.

"Configuration for reconciler '{}' was not found. {}",
reconcilerKey,
reconcilersNameMessage);
if (!createIfNeeded()) {
Copy link
Collaborator

@csviri csviri Aug 11, 2025

Choose a reason for hiding this comment

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

what is the probelm we are solving this method evetually?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean in quarkus operator sdk

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now, the issue is preserving the possibility to log (or do something else, if needed) if the configuration doesn't exist in the abstract class, without logging when the configuration is created in BaseConfigurationService. Removing the logging and createIfNeeded methods would be API breaking changes so the goal is to have an implementation that doesn't break the existing API and doesn't log a warning when a configuration is created on-demand.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you, approved

@metacosm metacosm merged commit 60216a4 into main Aug 13, 2025
13 of 25 checks passed
@metacosm metacosm deleted the config-service branch August 13, 2025 15:53
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