Skip to content
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

Quarkus datasource snippet is invalid #316

Closed
gsmet opened this issue May 4, 2020 · 0 comments · Fixed by #317
Closed

Quarkus datasource snippet is invalid #316

gsmet opened this issue May 4, 2020 · 0 comments · Fixed by #317
Assignees
Labels
bug Something isn't working good first issue Good for newcomers properties Features supported in application.properties
Milestone

Comments

@gsmet
Copy link

gsmet commented May 4, 2020

Hi,

The current datasource snippet is invalid: https://github.com/redhat-developer/quarkus-ls/blob/master/microprofile.ls/com.redhat.microprofile.ls/src/main/resources/com/redhat/quarkus/snippets/quarkus-properties.json#L5 .

quarkus.datasource.url should be quarkus.datasource.jdbc.url. Note the jdbc part. Right now you are using a mix of the new config and the old deprecated config.

If I were you, I would move to something like the following for the snippet:

quarkus.datasource.db-kind=...
quarkus.datasource.username=...
quarkus.datasource.password=...
quarkus.datasource.jdbc.url=...
quarkus.datasource.jdbc.min-size=...
quarkus.datasource.jdbc.max-size=...

The first 3 are general and common to JDBC and reactive datasources. The last 3 are specific to JDBC. Having min size and max size is a good idea IMHO. Default values of 5 and 15 would probably be OK.

Also I think I would remove the Hibernate ORM property from the snippet as it has nothing to do here and will lead to an unknown property warning if the user doesn't have the Hibernate ORM extension. Better add a specific Hibernate ORM snippet.

@fbricon fbricon added bug Something isn't working good first issue Good for newcomers properties Features supported in application.properties labels May 5, 2020
@fbricon fbricon added this to the v0.0.8 milestone May 5, 2020
datho7561 added a commit to datho7561/quarkus-ls that referenced this issue May 21, 2020
Added the suggested fields to the datasource snippet.
Moved the Hibernate ORM portion of the snippet to a separate snippet that
only shows up if Hibernate ORM is used by the Quarkus project. Fixes redhat-developer#316.

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/quarkus-ls that referenced this issue May 22, 2020
Added the suggested fields to the datasource snippet.
Removed the Hibernate ORM portion of the snippet.
Fixes redhat-developer#316.

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/quarkus-ls that referenced this issue May 25, 2020
Added the suggested fields to the datasource snippet.
Removed the Hibernate ORM portion of the snippet.
Fixes redhat-developer#316.

Signed-off-by: David Thompson <davthomp@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers properties Features supported in application.properties
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants