-
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
Use of quarkus-agroal with GCP CloudSQL #5901
Conversation
extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/DataSourceRuntimeConfig.java
Show resolved
Hide resolved
extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/DataSourceRuntimeConfig.java
Show resolved
Hide resolved
hey, many thanks for proposing this. It's exciting to see more support for CGP! I hope you could help me figure out if we can make it really easy and slick to run on GCP, so without needing any additional configuration flags? Please see my review comments for details. It would also be great as to not have configuration properties which only apply to a single cloud. |
Links to #5824 |
Hi, |
After this is merged, in what version will it be available ? |
throw new RuntimeException("Cloud sql instance should match the pattern project-id:zone:cloudSqlInstance"); | ||
} | ||
agroalConnectionFactoryConfigurationSupplier.jdbcUrl( | ||
MessageFormat.format("{0}?socketFactory=com.google.cloud.sql.postgres.SocketFactory&cloudSqlInstance={1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The socketFactory is bound to postgres driver and if you would like to use a different driver is not possible with current implementation. Is it possible to make this configurable from a property as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there are only two supported SGBD postgres and mysql, but yes I should make this configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think @Sanne is correct, this implementation is very GCP integrated. maybe we should switch a little bit the way we make the implementation for this.
I think the easiest way is to use the agroalConnectionFactoryConfigurationSupplier.jdbcProperty(<property_name>, <value>)
method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this but it didn't worked. I will re-take a loot at it.
In fact I think I should create a separate extension for gcp sql datasources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check: #6634 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it won't work (i tried this already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just added some ideas
extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/DataSourceRuntimeConfig.java
Outdated
Show resolved
Hide resolved
...sions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AbstractDataSourceProducer.java
Show resolved
Hide resolved
…tstrap core module
Co-authored-by: Stéphane Épardaud <[email protected]>
Co-authored-by: Stéphane Épardaud <[email protected]>
Do not enhance generic/abstract repos Use proper generics resolution when looking up the repository type arguments
This means both Servlet and standalone will both use the main thread pool, and it will avoid Vert.x blocked thread warnings. These warnings are useless as blocking IO can potentially block a thread for a long time if request or response is large and the connection is slow.
Fatal error: Failed to leave the current IsolateThread context and to detach the current thread. (code 12)
- resolves #6396 - also add TemplateData#ignoreSubclasses()
prefixes in the kubernetes extension.
openshift prefix are well respected.
This PR is invalid and contains a lot of unrelated commits. Closing. Please open a new PR to pursue this. |
This pull request contains code to ease the use of GCP CloudSQL as well as documentation to use it without any code amendments.