-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add runtime configuration property quarkus.datasource.active
#38108
Conversation
/cc @gsmet (hibernate-orm) |
🙈 The PR is closed and the preview is expired. |
5c7d067
to
a4a58e4
Compare
quarkus.datasource.active
a4a58e4
to
01e63ec
Compare
This comment has been minimized.
This comment has been minimized.
01e63ec
to
8586896
Compare
This comment has been minimized.
This comment has been minimized.
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.
Looks good. I think I spotted a small typo in the doc, could you have a look?
you can select a persistence unit/datasource at runtime simply by passing | ||
xref:config-reference.adoc#multiple-profiles[setting configuration property `quarkus.profile`]: |
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.
simply by passing setting configuration property
quarkus.profile
sounds weird?
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.
Right. I rephrased to:
simply by setting
quarkus.profile
(and I did the same for the other occurrence)
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! I addressed your comment and rebased on main
.
you can select a persistence unit/datasource at runtime simply by passing | ||
xref:config-reference.adoc#multiple-profiles[setting configuration property `quarkus.profile`]: |
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.
Right. I rephrased to:
simply by setting
quarkus.profile
(and I did the same for the other occurrence)
8586896
to
4f63e89
Compare
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. You can consult the Develocity build scans. |
Fixes #37265
Creating as draft, because this is based on #38106 , which should be merged first.=> DoneI tried to explain the feature in the documentation: see changes to
docs/src/main/asciidoc/datasource.adoc
anddocs/src/main/asciidoc/hibernate-orm.adoc
. Please let me know if something is not clear.Best reviewed commit-by-commit: I split the implementation and tests. Tests are numerous, part because of the widespread impact of disabling a datasource (on flyway, metrics, health, ...), part because of the duplication of SQL client (needs one test per DB vendor).