-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Upgrade to Oracle JDBC driver 23.4 #41998
Conversation
… Oracle JDBC extension
…ta with additional runtime-initialize definitions
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.
@Sanne LGTM, thanks
I sent and merged eclipse-vertx/vertx-sql-client#1448
The test suite passes and the upgrade will be present in Vert.x 4.5.10
Excellent, thanks! |
Status for workflow
|
Davide told me it's working fine with Hibernate Reactive as well: good to merge. |
Nice work! |
FYI this update seems to have quite some impact on the image size, see below
I know there is probably not much (if any) to be done, but sharing so people are aware. |
Thanks @zakkak ! Very interesting. I suspect something related to: But as you say, not much we can do about that; even if we could, they intend this to be used so I'd not take responsibility to change it, it might affect our users from being able to get support by the Oracle team. We'll let the Oracle JDBC team know. |
For our Keycloak project, removing these conditionals[1] for "native-related" operations broke our code. Some time ago I provided a PR with the necessary changes for us[2], and now it's reverted again. @Sanne We do not use native mode and executing the [1] 19d9ed1#diff-1744c4a730f826e51f66dd21c87ab13fc749bddbc011373540bcb2afd1cdd2ddR9 |
@mabartos sorry about that - could you describe what's happening in detail? Why would it break your code? It really shouldn't matter, and eventually we hope to remove all such conditionals: the "onlyIf" attribute should be deprecated as it leads to anti-patterns in extension development which is making it really hard to refactor the Quarkus core to prepare for further optimisations. So in a way it's great that we're having this conversation - sorry for the inconvenience though! cc/ @dmlloyd |
So for the I'm going to revert 19d9ed1 for now until things can be properly asserted. |
@Sanne @gsmet Thanks for addressing the issue and for the revert and sorry for quite comprehensive problem description below :) I understand your concerns about anti-patterns in extensions, but our current Keycloak use case kinda requires us to do things a little bit differently. Ignoring these build steps for a "native" executable is only the tip of the iceberg and I need to admit it's part of our "hacks" to your extensions eco-system :) StoryEDIT: mentioned term For Keycloak, we use This is an issue when using Quarkus JDBC extensions. We provide support for several JDBC drivers (h2, postgres, mariadb, oracle,...), so it means we have included their Quarkus JDBC extensions in the distribution (in To mitigate the issue, we do certain "hacks" like visible in example: if a user wants to use only PostgreSQL DB, they set Problem with Oracle JDBCTo comply with CNCF policies, we are not able to deliver Keycloak distribution with non-Apache 2.0 dependencies as stated in this issue. It means we do not include Problem with removed conditionals in the build stepsAs I've pointed out in the previous comment, it broke our codebase as during building our distribution, we do not ignore these artifacts, and build steps for Quarkus Oracle JDBC extension were executed. As we do not use native builds, these additional build steps are executed now. However, they use directly code for Oracle JDBC, but these JARs are not provided in the distribution, and the build fails. In that case, we'd like to have the condition back (at least for now) to not execute these build steps. I know it's a short-term solution, but it'll help us to save some time before there's a better approach. How Quarkus can support us?As I've mentioned, we probably use Quarkus extensions in a way that is not completely aligned with the Quarkus extensions principles, but we do not have more options right now. What could really help us would be to have some mechanism, for how we can disable Quarkus extensions even when they're present in @geoand Do you think it might be feasible in some way? Have you discussed anything like this in the past? cc: @vmuzikar |
Which
AFAIR, there has never been such a need nor has it been discussed in the past to the best of my knowledge. Maybe @aloubyansky remembers something? |
Not sure which need you're referring to, but the need to disable extensions at build time has been mentioned before, and even implemented for Hibernate extensions. There's a whole issue about making this more consistent, but I stopped after the analysis... #42244 |
How does that work? |
To me it sounds like what would be desirable is to bundle some Maven repo and resolve requested dependencies and the ApplicationModel from that before (re)augmentation. |
Yeah, it sounds like something general, not something each one extension would need to be coded against |
@geoand Ahh, sorry. It's our value for
+1 |
Perhaps the |
In this case, the conditional evaluation should be based on the removed code to actually exist. That would make more sense and also give you less-so problematic side effects should you want to build a native image. |
Yeah, I think this warrants some rethinking of the mutable-jar approach |
Currently, a I completely agree a more general approach would be better. But I'd suggest not limiting yourself to mutable jars -- disabling extensions that happen to be in the classpath in a "simple" (no reaugmentation) build can be useful too. I think the most common use case I've seen is users deploying a same application multiple times, with different profiles, where one deployment/profile uses a database but another doesn't (it disables that part of the app). |
If we can find a non intrusive way to do that that is also not a terrible user experience, it would be great |
Thanks for your input! We should create a new issue for it to have it properly traced. @aloubyansky @geoand @yrodiere @Sanne Should I create it based on our "requirements", or will you do it with your additional findings aggregated together? |
If we are considering a significantly different distribution and bootstrap for reaugmentation, I'd consider leaving the mutable-jar alone and introducing a new one to satisfy the new requirements which should be collected. |
Wouldn't be possible to first provide some mechanism to disable a Quarkus extension for IMO, it'd be a good starting point and probably would not require so much effort. WDYT? |
Helping @Felk with his PR #41949 , as native-image metadata got a bit tricky to handle.
Needs @tsegismont approval to ensure compatibility with the vert.x oracle pgclient. @DavideD could test this version too in Hibernate Reactive?