fix: do not output warning when resolving a configuration#2892
fix: do not output warning when resolving a configuration#2892
Conversation
Signed-off-by: Chris Laprun <claprun@redhat.com>
xstefank
left a comment
There was a problem hiding this comment.
I'm not sure which solution is better for this problem, but if this would go in there are a few points.
...framework/src/test/java/io/javaoperatorsdk/operator/config/BaseConfigurationServiceTest.java
Outdated
Show resolved
Hide resolved
| * 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
what is the probelm we are solving this method evetually?
There was a problem hiding this comment.
I mean in quarkus operator sdk
There was a problem hiding this comment.
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.
Signed-off-by: Chris Laprun <claprun@redhat.com>
[skip-ci] Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun claprun@redhat.com