Skip to content

Conversation

@singhpk234
Copy link
Contributor

@singhpk234 singhpk234 commented May 2, 2025

Deperecate Eclipse-link and make relational-jdbc as default

dev-list : https://lists.apache.org/thread/b2qx02hlvxl6rncb7l0xnnx0w22t3z9j

Copy link
Contributor

@dimas-b dimas-b left a 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?

Comment on lines 140 to 141
Copy link
Contributor

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.

Cf. https://quarkus.io/guides/config-reference

Copy link
Contributor Author

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 !

Copy link
Contributor

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.

Copy link
Contributor Author

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 ?

Copy link
Contributor

@eric-maynard eric-maynard May 3, 2025

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

Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor Author

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is how it looks :
Screenshot 2025-05-05 at 10 56 42 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singhpk234 singhpk234 changed the title [JDBC] : Deprecate Eclipse-link [JDBC] : Deprecate EclipseLink May 3, 2025
@singhpk234 singhpk234 force-pushed the feature/deprecate-eclipselink branch from 2f34dff to c6890e4 Compare May 3, 2025 00:49
@eric-maynard
Copy link
Contributor

I think we'll also have to look for other references to EclipseLink and persistence.xml, such as:

When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:

Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor

@dimas-b dimas-b May 5, 2025

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?

Copy link
Contributor

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 🤔

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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!

@singhpk234 singhpk234 requested a review from HonahX as a code owner May 5, 2025 17:54
@singhpk234 singhpk234 force-pushed the feature/deprecate-eclipselink branch from 0ecdbc1 to 13a751b Compare May 5, 2025 17:56
Copy link
Contributor

@adnanhemani adnanhemani left a 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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@flyrain flyrain left a 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.

Comment on lines +142 to +151
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>
```
Copy link
Contributor

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?

Copy link
Contributor

@dimas-b dimas-b May 5, 2025

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.

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

@singhpk234 singhpk234 force-pushed the feature/deprecate-eclipselink branch from 4f7c8dd to aa881ca Compare May 5, 2025 22:36
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board May 6, 2025
@flyrain flyrain merged commit 40aea3a into apache:main May 6, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants