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

Rename quarkus.hibernate-search-orm.enabled to quarkus.hibernate-search-orm.active and repurpose quarkus.hibernate-search-orm.enabled to disable Hibernate Search at build time #26840

Merged
merged 2 commits into from Jul 26, 2022

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Jul 20, 2022

The motivation is two-fold:

  • I've been made aware that other extensions use .enabled to enable/disable an extension at build time, but Hibernate Search was using it to disable the extension at runtime. This PR restores consistency
  • We still need something to disable Hibernate Search at runtime, because that's what was requested in the original use case. .active solves that.

I'm not very enthusiastic about the name of the property quarkus.hibernate-search-orm.started, but that's the best I could come up with. I'm open to suggestions, keeping in mind that quarkus.hibernate-search-orm.enabled is not an option since it has a different purpose. => Renamed to .active, a bit better.

This is related to a conversation we had on the Quarkus mailing list: https://groups.google.com/g/quarkus-dev/c/rfWe_jrSzJY/m/u5282G-SEAAJ?utm_medium=email&utm_source=footer

For context, the conversation branched from there: https://groups.google.com/g/quarkus-dev/c/o8gtDJoV7VY/m/R9ub7DPqAgAJ?utm_medium=email&utm_source=footer

For the migration guide:

## `quarkus.hibernate-search-orm.enabled` was renamed to `quarkus.hibernate-search-orm.active`

If you were previously using the configuration property `quarkus.hibernate-search-orm.enabled` to enable/disable Hibernate Search at runtime (by setting the config in deployment configuration files, environment variables or commandline parameters), then you should use the configuration property `quarkus.hibernate-search-orm.active` instead.

`quarkus.hibernate-search-orm.enabled` is now aligned with Quarkus conventions and disables the extension at *build time*, which cannot be reverted at runtime.

Creating as draft because this PR is based on #26838 , which should be merged first.

@Sanne
Copy link
Member

Sanne commented Jul 20, 2022

+1 to restore consistency with other extensions - and it's nice to have the ability to disble it at build time.

Like you, I'm also not very happy with the .started suggestion. .active could fit better?

@yrodiere
Copy link
Member Author

yrodiere commented Jul 21, 2022

Like you, I'm also not very happy with the .started suggestion. .active could fit better?

It's confusingly close to enabled in my opinion, but it's probably a bit better than started indeed. I'll wait for others to chime in and will rewrite everything accordingly :)

@gsmet, any opinion?

@yrodiere yrodiere changed the title Rename quarkus.hibernate-search-orm.enabled to quarkus.hibernate-search-orm.started and repurpose quarkus.hibernate-search-orm.enabled to disable Hibernate Search at build time Rename quarkus.hibernate-search-orm.enabled to quarkus.hibernate-search-orm.active and repurpose quarkus.hibernate-search-orm.enabled to disable Hibernate Search at build time Jul 25, 2022
…ch-orm.active

1. For consistency with other extensions where "enabled" is a build-time
   switch, e.g. micrometer.
2. To introduce an "enabled" build-time switch.

See the conversation here: https://groups.google.com/g/quarkus-dev/c/rfWe_jrSzJY/m/u5282G-SEAAJ
@yrodiere yrodiere marked this pull request as ready for review July 25, 2022 11:22
@yrodiere
Copy link
Member Author

Renamed .started to .active. Unless someone has a better idea, that's the name we'll keep, and that's what I'll use when implementing the same for Hibernate ORM / Envers.

@yrodiere yrodiere requested a review from Sanne July 25, 2022 11:24
@gsmet gsmet merged commit 7fac557 into quarkusio:main Jul 26, 2022
@quarkus-bot quarkus-bot bot added this to the 2.12 - main milestone Jul 26, 2022
@yrodiere yrodiere deleted the hsearch-enabled-started branch August 2, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-search Hibernate Search / Elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants