-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Dev Services not enabled given Installed features: [cdi, jdbc-postgresql, kotlin, rest, smallrye-context-propagation, vertx] #43428
Comments
/cc @FroMage (context-propagation), @Ladicek (arc,smallrye), @barreiro (jdbc), @geoand (devservices,kotlin), @jmartisk (smallrye), @manovotn (arc,context-propagation), @mkouba (arc), @phillip-kruger (smallrye), @radcortez (smallrye), @stuartwdouglas (devservices), @yrodiere (jdbc) |
Perhaps this is only done when we detect that Hibernate runs, which is only done when we have at least one |
Try injecting the |
The dev services are provided only when
Now, why do you even need to run this? Well, weirdly, quarkus/extensions/jdbc/jdbc-postgresql/runtime/pom.xml Lines 20 to 24 in 50b35a1
So goes for at least some (probably all) other drivers -- I checked h2. I am unsure if there is a reason for that -- do we want to provide a way for people to use JDBC drivers without defining datasources? Does that even make sense? I would personally be in favor of adding a mandatory dependency to Agroal in all our JDBC driver extensions, because I am not aware of any documented use case for using JDBC drivers without Agroal. If, on the other hand, we leave things as they are, I think we should update the documentation (https://quarkus.io/guides/datasource, https://quarkus.io/guides/databases-dev-services) to mention that most of those guides assume that you use Agroal when you use JDBC drivers. Good luck explaining that concisely and in such a way that nobody will miss it :/ |
Yeah, I stumbled upon this recently too and found the behavior surprising. I wanted to discuss it with you and then forgot. I think the initial intent was that you might want to use the JDBC drivers with other connection pooling solutions (HikariCP comes to mind). I'm not really sure how practical it would be for someone to come up with an extension for another pooling solution in the Quarkiverse. If we are already too tied to Agroal for it to happen, we could probably go one step further. |
FWIW a quick search through the Quarkiverse org didn't reveal any DB connection pool. Anyway, I'm pretty sure the dependency to Agroal is all over the place; the Hibernate ORM extension for example has hard dependencies on Agroal. So, unless someone objects, +1 to depend on Agroal from JDBC driver extensions. |
Nice catch guys ;) thank you For more context information : I'm using quarkus + DuckDB. Duck does not require a postgres JDBC driver, it uses libpq C driver. However, Duck can attach to postgres, which is my use case. as in https://duckdb.org/2024/01/26/multi-database-support-in-duckdb.html. pooling is in, its pooling is handheld in https://github.com/duckdb/postgres_scanner/blob/main/src/storage/postgres_connection_pool.cpp I was expecting a postgres dev service to boot up simply to avoid booting one up using a dedicated docker-compose yaml under dev or test. Sadly HikariCP has no quarkiverse extension obv. because Quarkus is tied to Agroal, plus people switching from other fwks (where either Hikari or legacy C3PO were used), well, migrate the pooling to Agroal. |
…o be fire up when any JDBC driver is provided
…o be fire up when any JDBC driver is provided
…o be fire up when any JDBC driver is provided
…o be fire up when any JDBC driver is provided fix H2 cycling dep and graph for other rdbms do not let quarkus-reactive-oracle-client pull agroal by itself Update extensions/reactive-oracle-client/deployment/pom.xml Co-authored-by: Yoann Rodière <yoann@hibernate.org>
Describe the bug
Hello
I'm using straight SQL statements and resultsets using direct JDBC driver queries : no JOOQ, no Hibernate, no Panache, etc.
I was expecting quarkus dev to use a dev service when I added the quarkus-jdbc-extension per https://quarkus.io/guides/databases-dev-services.
My application.properties is empty per
cat src/main/resources/application.properties
has no JDBC URL configured so I believe it should have started a dev services container.It did not.
Expected behavior
a postgres dev services container should have started when quarkus dev was launched
Actual behavior
per dev UI : You do not have any Dev Services running.
per docker ps : no postgres testcontainers container started
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
java 21
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: