Closed phillip-kruger closed 1 year ago
/cc @geoand (devservices), @stuartwdouglas (devservices)
/cc @radcortez , @gsmet
@radcortez could you have a look at that one? It concerns me a bit.
Sure
The issue hero is that quarkus.datasource.jdbc.url
is read by the Agroal extension, which is not present in app dependencies, so we get the unknown warning.
The DevServices extension does set that property because you need it for the datasource, but because we don't have one here, we don't have the Agroal extension. With that said, we need to discuss how to handle this case:
We leave it as is; The warning is correct, but it isn't very clear because the user didn't set the property.
Should we start the DB DevService without Agroal? In theory, the user is not going to be able to do anything with the database and Quarkus, but I wouldn't like to limit it because there may be some use cases that we are not aware. Also, if you try to inject a Datasource
, you get a Unsatisfied dependency
coming from Arc.
Should we ignore warnings from properties set by Quarkus? While attractive, not sure if I like this either. Maybe, we need to gather additional information and detail why a property was set by us, so we can output that into warnings. I guess it would also be interesting to tell the user which extension to add in case of unknown properties.
Maybe we should just avoid adding the property if Agroal is not around. I'll have a look if it's easy to do next week.
It's fine. I can do it.
For reference the property is set here: https://github.com/quarkusio/quarkus/blob/00625d048d12ffa90b94061b19df6043e6467d8c/extensions/datasource/deployment/src/main/java/io/quarkus/datasource/deployment/devservices/DevServicesDatasourceProcessor.java#L315-L319
Describe the bug
When starting a application that use the postgress jdbc dev services and an empty application.properties, this warning is printed in the startup log:
Unrecognized configuration key "quarkus.datasource.jdbc.url" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Expected behavior
Dev Services should not set Unrecognized configuration keys or at least not show the warning
Actual behavior
User are warned about something they can not do anything about
How to Reproduce?
Reproducer: https://github.com/phillip-kruger/devui-example
1) clone the about repo and start the app, you should see the warning in the log
Output of
uname -a
orver
Linux pkruger-laptop 6.2.9-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 30 22:31:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
OpenJDK 64-Bit Server VM (Red_Hat-17.0.6.0.10-1.fc37) (build 17.0.6+10, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Additional information
As discussed here: https://github.com/quarkusio/quarkus/pull/32563#issuecomment-1505174872