-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Log warning when unsupported dialect version is being used #11355
Comments
This includes: - [#14635] Single message JooqLogger doesn't work
used This includes: - [#14635] Single message JooqLogger doesn't work
used This includes: - [#14635] Single message JooqLogger doesn't work
The current implementation detects when a database version is too old for the configured dialect. Might be worth logging also when a database version is too recent for the configured dialect, at least as |
For now, the "too recent" message won't be logged |
@lukaseder I get this with jOOQ
Which is, I guess, an unexpected behavior, since minimum PG version for jOOQ |
Thanks for the pointer, @monosoul. The support matrix is now updated. There was a task to fix it post release of 3.18, which was forgotten. The PG requirement of the jOOQ Open Source Edition 3.18.0 is PostgreSQL 15. |
Support matrix here: https://www.jooq.org/download/support-matrix |
Would it be possible to have a system property or other method to toggle off this warning? I am entirely aware of the support matrix; however, for my situation, JOOQ's warning happens to be redundant. The clients using my software deploy a variety of database versions, so I inspect the version myself and encourage them to upgrade. It is true that some of my clients insist on operating a RDMS with a lower version than JOOQ supports. However, every SQL query in my application is integration-tested against the swathe of database versions. Thus, even if JOOQ OSS doesn't officially support an older RDMS, I make sure that every SQL query is compatible by avoiding syntax introduced in newer RDMS versions. So you know, I gain no income or other revenue stream from this software -- it is FOSS -- and charging a JOOQ license for clients is wholly unfeasible. If, nevertheless, you are displeased by my usage of JOOQ OSS in this way, do let me know, and perhaps we can work toward a solution. I know JOOQ OSS is licensed under Apache 2, however, I would nevertheless like to confirm to the spirit and letter of JOOQ's official policy. |
Thanks for your message, @A248. You can configure your logger to have a higher threshold than warning for this message. Its name is I don't think adding additional flags per log message will scale. Loggers make this already convenient enough.
I'm not sure why you'd think so. There are no strings attached to jOOQ's ASL 2.0 license. This message helps users make more informed decisions, earlier. Few users integration test all their queries, so they might run into trouble and surprises only later on when they deploy an upgraded application. A frequent issue was MariaDB 10.5
After answering many support requests about MariaDB In the past, I've noticed that Flyway does the same thing, and thought that a majority of users will find this information useful. |
Hi Lukas. I had discovered the logger name, and I understand the warning is of much use to you in preventing unnecessary support requests. I have dealt with many support requests myself due to users relying on outdated software. However, if I allow the warning to appear, then I will receive numerous support requests from users on older RDMSes which happen to be supported by my software but not JOOQ. An unfunded OSS project cannot sustain this. Unfortunately, I am in somewhat of a predicament with respect to logging configuration. You see, I have no control over clients' logging frameworks -- they employ multiple. This compels me to resort to changing JooqLogger's global threshold to ERROR, which is prone to cause future headaches by hiding other messages. JOOQ already provides the system properties |
A fun fact. I also rely on Flyway. They do not simply log when an unsupported version is used on their OSS offering. Rather, they throw an exception. |
Can you point to a few examples of this? I would like to get a feeling of the importance of this change. Obviously, adding one more flag is little effort for jOOQ, but if we start creating precedents for people liking/disliking individual log messages and requesting more and more flags, well, you know how this won't scale.
I believe that only happens when the RDBMS is really too old, i.e. unsupported in all editions and distributions? |
OK, much rather than discussing this particular log message, why not solve this dynamically and generically for all jOOQ logs: #15050 I can definitely see doing this generic improvement, rather than adding more individual flags. |
Note, we already have a mechanism that allows users to turn off loggers using reflection. You can access the |
#15050 has been implemented for jOOQ 3.19.0. For jOOQ 3.18.0, I believe the reflection workaround should suffice. |
Hi Lukas, thanks. These solutions are quite sufficient, especially the generic system property. Very appreciated. -- A248 |
Flyway has this cool feature where a warning is logged, when an unsupported (not yet or not anymore supported) dialect version is being used. This helps better assess whether users can expect a given RDBMS version / jOOQ version combination to work, and whether they will be able to get support for it.
We can use JDBC's
DatabaseMetaData.getDatabaseMajorVersion()
andDatabaseMetaData.getDatabaseMinorVersion()
for this, or run a query against the variousv$version
or similar tables ourselves.Minor releases receiving this upgrade:
This is a codified version of our support matrix: https://www.jooq.org/download/support-matrix. As such, only versioned dialects will receive this increment, including:
The above link will be included in the warning message. If there's no warning, an info message can still be logged, confirming that the RDBMS / jOOQ version combination is supported.
The text was updated successfully, but these errors were encountered: