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

Usage of raw quarkus runtime properties without a build #10968

Closed
DGuhr opened this issue Mar 28, 2022 · 1 comment · Fixed by #10969
Closed

Usage of raw quarkus runtime properties without a build #10968

DGuhr opened this issue Mar 28, 2022 · 1 comment · Fixed by #10969
Assignees
Labels
area/dist/quarkus kind/enhancement Categorizes a PR related to an enhancement
Milestone

Comments

@DGuhr
Copy link
Contributor

DGuhr commented Mar 28, 2022

Description

At the moment, all quarkus properties are handled as "build" options in keycloak. This leads to a few corner cases:

  1. Quarkus has capabilities we don't wrap / maintain (e.g. using syslog logging). In this case, e.g. a syslog server property is environment dependant (think: dev/stage/prod/whatever). At the moment this would always require a rebuild, though the actual quarkus property is a runtime property.

  2. Same applies for the runtime datasource properties for additional datasources, as we use (or will use) e.g. here: JDBC-URL, Username, Password are runtime properties in quarkus, so we want to have them runtime config in keycloak, too.

This issue should provide the following capabilities:

  • when a quarkus property is a runtime property, but not included in our configuration, it should still be handled as if it is a runtime configuration, so without a rebuild needed. (e.g. syslog properties)
  • when a quarkus property is a buildtime property, but not included in our configuration, a build has to be run before starting keycloak for the build property to apply. If no build is done beforehand, the standard quarkus build/runtime mismatch warning is shown. (e.g. quarkus.hibernate.metrics-enabled at the time of writing is not used by us but available as buildtime property in quarkus)
  • Auto-build would not trigger a build automatically on quarkus build properties not used in keycloak, because at the time of writing there is no possibility for us to check the general quarkus config if a property there is build- or runtime. (auto-build is a concept that is keycloak-specific, and does not exist in quarkus). I raised this discussion in quarkus for this issue, so it may be changed in quarkus in the future.
  • an exception for auto-build compatibility is made for raw quarkus buildtime properties we use for the new UserStorageProvider implementation to add additional datasources (see here), namely quarkus.datasource.<pattern>.db-kind, quarkus.jdbc.<pattern>.jdbc.driver, quarkus.jdbc.<pattern>.jdbc.transactions, quarkus.jdbc.<pattern>.jdbc.enable-metrics (comp. https://quarkus.io/guides/datasource#jdbc-configuration ). When these properties are available in the quarkus.properties file, a build is automatically triggered by our ruleengine. For all other properties, point 2 applies and the standard quarkus warning for the mismatch is shown. The environment-dependant runtime properties for additional datasources like jdbc-url, db-username, db-password etc. would not require a build.

Discussion

No response

Motivation

No response

Details

No response

@DGuhr DGuhr added kind/enhancement Categorizes a PR related to an enhancement area/dist/quarkus status/triage labels Mar 28, 2022
@DGuhr DGuhr added this to the 18.0.0 milestone Mar 28, 2022
@DGuhr DGuhr self-assigned this Mar 28, 2022
DGuhr added a commit to DGuhr/keycloak that referenced this issue Mar 30, 2022
…in keycloak

Changes behaviour to:
- all raw quarkus config properties are handled as runtime config in keycloak, with the exception of raw properties we need for additional datasources, there we check for build- vs runtime
- unknown quarkus buildtime properties require a build first or the usual quarkus warning is shown
- wrapped quarkus properties still get ignored / overwritten by our configuration layer (no change in behaviour here)

Closes keycloak#10968
pedroigor pushed a commit that referenced this issue Mar 30, 2022
…in keycloak

Changes behaviour to:
- all raw quarkus config properties are handled as runtime config in keycloak, with the exception of raw properties we need for additional datasources, there we check for build- vs runtime
- unknown quarkus buildtime properties require a build first or the usual quarkus warning is shown
- wrapped quarkus properties still get ignored / overwritten by our configuration layer (no change in behaviour here)

Closes #10968
@sschu
Copy link
Contributor

sschu commented Mar 31, 2022

Thanks @DGuhr !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dist/quarkus kind/enhancement Categorizes a PR related to an enhancement
Projects
Development

Successfully merging a pull request may close this issue.

3 participants