-
Notifications
You must be signed in to change notification settings - Fork 329
[JDBC] : Deprecate EclipseLink #1515
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
Conversation
dimas-b
left a comment
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.
+1 to deprecate EclipseLink
nit: Eclipse-link -> EclipseLink in the title or perhaps eclipse-link Persistence?
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.
From my POV application.properties is not the best place for user-level settings. In binary distributions the default one is embedded into jar files and not directly accessible, while the optional local file is relative to the current directory, which is prone to runtime mistakes.
I'd suggest using java -D options or env. variables in user-facing docs.
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 agree, as the whole page follows the theme of setting stuff in application.prop hence i kept this, please let me know what you think considering above !
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 only read the diff, not the whole doc 😅 but I keep my point. We do not have to fix the whole doc in this PR, though.
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.
No worries , how about i add another line below that in order to use the binaries configure using -D or env props ?
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.
Yeah this doc predates quarkus. Tbh I think it's kind of problematic that we don't offer a config file where you can change things without needing to rebuild. We should fix that experience even if we first update our docs to reflect the current (bad) state
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.
In k8s it is pretty easy and natural to supply config as env. variables. However, if people like having the ability to use a local file for configuration, I guess it should not be too hard to support it with a predictable location (e.g. relative to the jar file or user's HOME dir as opposed to current dir). WDYT?
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.
In another PR, I proposed to introduce a "user facing" configuration (it's very easy to do that with Quarkus) and it's always possible to override via env variables or config maps on k8s.
Short term in this PR, I would recommend to document the env variable use, and if you think it makes sense I can revive my PR.
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.
documenting ENV vars makes sense to me, let me try doing that.
Re: if people like having the ability to use a local file for configuration
IMHO, quarkus is quite configurable and its the deployement time they would need, loading confs from file will introduce these complexity like fallbacks of loading this file from code never the less open the config override options for ex something configured in the file should override what the env specifies, by the time quarkus would get the handle of the file and apply configs, quarkus would have applied the confs to make DS ?
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.
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.
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
2f34dff to
c6890e4
Compare
|
I think we'll also have to look for other references to EclipseLink and persistence.xml, such as: polaris/helm/polaris/README.md Line 51 in 3b8aaff
|
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.
Is this because all tests currently run against the EclipseLink implementation?
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.
If we deprecate EclipseLink, why not purge it from tests too?
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 we can keep it for now (even deprecated) and remove when we remove eclipselink.
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.
Let's add a separate test profile for EclipseLink then and run maybe a sub-set of tests. How about the bootstrap test in the admin tool and the REST API test in the quarkus server?
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.
Note: removing this change actually makes all tests use JDBC, as far as I understand 🤔
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.
It might be best to keep doc changes in this PR and make application.properties and test changes in another PR.
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.
Let's add a separate test profile for EclipseLink then and run maybe a sub-set of tests. How about the bootstrap test in the admin tool and the REST API test in the quarkus server?
This profile is just used for eclipse link, the jdbc profile and lifecycle manager is is present is quarkus/test-commons. The reason why i kept both together is i we are deprecating eclipse link via doc and not via code, so hence updating default is in the same PR. Please Let me know your thoughts considering above.
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.
ok. thx for the clarification!
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
site/content/in-dev/unreleased/configuring-polaris-for-production.md
Outdated
Show resolved
Hide resolved
0ecdbc1 to
13a751b
Compare
adnanhemani
left a comment
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.
LGTM!
| -Dpolaris.persistence.eclipselink.persistence-unit=polaris \ | ||
| -jar quarkus/admin/build/polaris-quarkus-admin-*-runner.jar | ||
| ``` | ||
| used by the Polaris server. |
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.
Do users need to do any action here to make this happen? If not, would it be better to remove this line altogether?
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.
yes, but the immediate line below re-directs the user to move to metastore.md page to configure the metastore, so this was kind a redundant. Hence removed.
flyrain
left a comment
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.
Thanks a lot for working on it, @singhpk234 ! LGTM overall. Left minor comments.
| Configure the metastore by setting the following ENV variables: | ||
|
|
||
| ```properties | ||
| polaris.persistence.type=eclipse-link | ||
| polaris.persistence.eclipselink.configuration-file=/path/to/persistence.xml | ||
| polaris.persistence.eclipselink.persistence-unit=polaris | ||
| ``` | ||
| POLARIS_PERSISTENCE_TYPE=relational-jdbc | ||
| Where: | ||
| QUARKUS_DATASOURCE_DB_KIND=postgresql | ||
| QUARKUS_DATASOURCE_USERNAME=<your-username> | ||
| QUARKUS_DATASOURCE_PASSWORD=<your-password> | ||
| QUARKUS_DATASOURCE_JDBC_URL=<jdbc-url-of-postgres> | ||
| ``` |
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.
Both env variable and Quarkus application.properties work. Can we be consistent about the configuration in the doc as the metastores.md use the application.properties way? I think we can mention the application.properties way here while refer to page https://polaris.apache.org/in-dev/unreleased/configuration/ if users prefer env variable. Thoughts?
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 support consistency.
As to using application.properties, as I commented in another thread, they are relative to current dir and as such prone to errors, IMHO.
If we want to go with config files, I propose to revive @jbonofre PR on that.
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'm OK with either way. Hi @dimas-b , can you share JB's PR?
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.
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'm also supportive on JB's PR. It provides much better UX in terms of how users config Polaris server and admin tool. User can make changes to config/application.prooperties without searching for Polaris doc how to config things. We can even put certain common used configures in it, and comment them out by default, and users can uncomment them when needed.
4f7c8dd to
aa881ca
Compare

Deperecate Eclipse-link and make relational-jdbc as default
dev-list : https://lists.apache.org/thread/b2qx02hlvxl6rncb7l0xnnx0w22t3z9j