(feat) Add support for Hikari Datasource
Summary
This pull request introduces support for the HikariCP connection pool in the Ebean DAO implementation. The most significant changes are the addition of the HikariCP dependency and logic to handle HikariCP data sources when creating the schema evolution manager configuration.
Dependency management:
- Added
externalDependency.hikariCPto thedao-impl/ebean-dao/build.gradledependencies to enable HikariCP support.
Schema evolution manager initialization:
- Updated
EbeanLocalAccess.javato importHikariDataSourcefor type checking and extraction of connection details. - Modified the
createSchemaEvolutionManagermethod inEbeanLocalAccess.javato detect if the Ebean server is using a HikariCP data source and extract the JDBC URL, username, and password accordingly. Falls back to the existing logic if HikariCP is not used.
Testing Done
./gradlew build
Checklist
- [ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
- [ ] Links to related issues (if applicable)
- [ ] Docs related to the changes have been added/updated (if applicable)
Codecov Report
:x: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 64.57%. Comparing base (1b4e026) to head (3dfed29).
:warning: Report is 2 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...va/com/linkedin/metadata/dao/EbeanLocalAccess.java | 53.84% | 4 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #570 +/- ##
============================================
+ Coverage 64.56% 64.57% +0.01%
- Complexity 1657 1662 +5
============================================
Files 141 141
Lines 6555 6572 +17
Branches 801 805 +4
============================================
+ Hits 4232 4244 +12
- Misses 1978 1981 +3
- Partials 345 347 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.