Skip to content

FINERACT-1492: Hikari configuration based on application properties#2024

Merged
vidakovic merged 1 commit intoapache:developfrom
vidakovic:feature/1492
Feb 7, 2022
Merged

FINERACT-1492: Hikari configuration based on application properties#2024
vidakovic merged 1 commit intoapache:developfrom
vidakovic:feature/1492

Conversation

@vidakovic
Copy link
Contributor

Description

Hikari configuration based entirely on application.properties. Tuning can be done via environment variables without recompiling. I got also rid unnecessary configuration classes and environment variables. No additional environment variables for the tenant databases; everything necessary is discovered via the Hikari configuration.

@vidakovic
Copy link
Contributor Author

@awasum could you have a look at this please and approve? Simplifies configuration. Thanks in advance :-)

@ptuomola
Copy link
Contributor

ptuomola commented Jan 21, 2022 via email

@francisguchie
Copy link
Contributor

@ptuomola @vidakovic - if you read FINERACT-1115, you can see the dilemma that you just solved. In my simple understanding, I agree to removal of recompilation.

@vidakovic
Copy link
Contributor Author

@ptuomola ... valid point... how about this: I'll add a easily removable compatibility - java - configuration that is activated only if these old (deprecated) configs are detected (environment variables etc.) and spins up things with a fat warning message on the console telling people to migrate their configuration?

@ptuomola
Copy link
Contributor

ptuomola commented Jan 22, 2022 via email

@vidakovic
Copy link
Contributor Author

vidakovic commented Feb 5, 2022

@ptuomola ... finally I found a quiet moment to wrap this up. While I was at it I introduced a mapping class for Fineract related properties (everything prefixed fineract.* in application.properties); those properties are mapped now to org.apache.fineract.infrastructure.core.config.FineractProperties for type safe access and avoiding all these @Value(..) annotations. Mapping the properties to a class also has advantages when doing configuration changes in a Kubernetes environment. The criteria I use to activate the backwards compatible configuration is a check on environment variable fineract_tenants_driver (if it's empty then the new configuration is assumed, if not empty then org.apache.fineract.infrastructure.core.config.CompatibilityConfig is activated. As we discussed: if the deprecated configuration is used then a warning is printed to the console.

I've added some additional hints to the README and to docker-compose.yml. The Docker Compose file is configured to use the new stuff (with more options to tweak the Hikari pool configuration).

I've tried both configs, work as advertised. Would be great if you could approve to get this stuff out of the way for the next release. Thanks again.

@vidakovic vidakovic force-pushed the feature/1492 branch 4 times, most recently from 2ce016c to d322e27 Compare February 5, 2022 20:50
@vidakovic vidakovic removed the request for review from awasum February 5, 2022 20:59
@vidakovic vidakovic requested a review from IOhacker February 5, 2022 21:32
@vidakovic vidakovic requested review from ptuomola and removed request for IOhacker and ptuomola February 7, 2022 14:46
@vidakovic vidakovic merged commit c66415d into apache:develop Feb 7, 2022
@vidakovic vidakovic deleted the feature/1492 branch February 7, 2022 15:38
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.

4 participants