Skip to content

feat: expose some driver settings#3739

Draft
fbiville wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
fbiville:neo4j/driver_settings
Draft

feat: expose some driver settings#3739
fbiville wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
fbiville:neo4j/driver_settings

Conversation

@fbiville
Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces the ability to configure Neo4j driver connection pool settings, specifically maxConnectionLifetimeMillis and connectionLivenessCheckTimeoutMillis. This enhancement allows users to fine-tune the behavior of Neo4j connections, improving stability and resource management for long-running data pipelines by exposing these critical parameters through the connection configuration.

Highlights

  • Exposed Neo4j Driver Settings: The pull request exposes two new Neo4j driver connection pool settings: maxConnectionLifetimeMillis and connectionLivenessCheckTimeoutMillis, allowing for more granular control over connection behavior.
  • Connection Parameters Model Update: The ConnectionParams abstract class and all its concrete subclasses (Basic, Bearer, Custom, Kerberos, NoAuth) were updated to include and manage the new connection pool settings.
  • JSON Schema Extension: The connection.v1.0.json schema was extended to formally define the new max_connection_lifetime_millis and connection_liveness_check_timeout_millis properties.
  • Neo4j Connection Logic: The Neo4jConnection class was modified to read and apply these new settings when building the Neo4j driver configuration, with fallback to default values if not explicitly provided.
  • Comprehensive Test Updates: Existing unit tests for ConnectionParams parsing were updated to reflect the new constructor signatures and JSON properties, ensuring proper handling of the added settings.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 28.57143% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.04%. Comparing base (00480ab) to head (6273a2b).

Files with missing lines Patch % Lines
...ud/teleport/v2/neo4j/database/Neo4jConnection.java 0.00% 12 Missing ⚠️
...rt/v2/neo4j/model/connection/ConnectionParams.java 27.27% 3 Missing and 5 partials ⚠️

❌ Your patch check has failed because the patch coverage (28.57%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3739      +/-   ##
============================================
- Coverage     53.06%   53.04%   -0.03%     
+ Complexity     6429     6018     -411     
============================================
  Files          1070     1070              
  Lines         64941    64957      +16     
  Branches       7193     7197       +4     
============================================
- Hits          34463    34455       -8     
- Misses        28163    28185      +22     
- Partials       2315     2317       +2     
Components Coverage Δ
spanner-templates 72.82% <ø> (-0.04%) ⬇️
spanner-import-export 68.52% <ø> (-0.11%) ⬇️
spanner-live-forward-migration 80.98% <ø> (ø)
spanner-live-reverse-replication 77.19% <ø> (ø)
spanner-bulk-migration 91.13% <ø> (ø)
gcs-spanner-dv 85.81% <ø> (ø)
Files with missing lines Coverage Δ
.../neo4j/model/connection/BasicConnectionParams.java 26.31% <100.00%> (ø)
...neo4j/model/connection/BearerConnectionParams.java 31.25% <100.00%> (ø)
...neo4j/model/connection/CustomConnectionParams.java 33.33% <100.00%> (ø)
...o4j/model/connection/KerberosConnectionParams.java 31.25% <100.00%> (ø)
...neo4j/model/connection/NoAuthConnectionParams.java 33.33% <100.00%> (ø)
...rt/v2/neo4j/model/connection/ConnectionParams.java 35.29% <27.27%> (-3.17%) ⬇️
...ud/teleport/v2/neo4j/database/Neo4jConnection.java 66.94% <0.00%> (-7.37%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant