Repository navigation
Conversation
Only pass the connection reference (a GCS URI or a Secret Manager secret id) through the pipeline, and read, validate and map the connection JSON on first use in worker setup. The launcher no longer needs GCS or Secret Manager access to submit the job, and resolved credentials (passwords/tokens) are no longer captured by serializable suppliers and embedded in the serialized DoFns.
Summary of ChangesHello, 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 optimizes Neo4j connection handling by shifting the resolution of connection settings from the job launcher to the worker nodes. By passing only the connection reference (GCS URI or Secret Manager ID) through the pipeline, the changes prevent sensitive credentials from being embedded into serialized Dataflow objects, thereby improving security and reducing the operational requirements for the launcher. Highlights
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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
|
There was a problem hiding this comment.
Code Review
This pull request refactors the Neo4j connection resolution to occur lazily on the Dataflow workers rather than at pipeline launch time. By introducing ConnectionParamsProvider, a SerializableSupplier, the actual connection credentials are resolved on-demand from Secret Manager or GCS on the worker, preventing sensitive information from being serialized into the pipeline. Additionally, ActionContext has been converted to a record containing this provider. The feedback highlights a potential serialization issue in CypherActionFn where the lambda captures the entire ActionContext object, and suggests using a static helper method to avoid capturing non-serializable fields.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (22.50%) 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 #4639 +/- ##
=============================================
+ Coverage 37.79% 59.71% +21.92%
- Complexity 521 7924 +7403
=============================================
Files 197 1124 +927
Lines 12031 72740 +60709
Branches 1238 8852 +7614
=============================================
+ Hits 4547 43438 +38891
- Misses 7110 26399 +19289
- Partials 374 2903 +2529
🚀 New features to boost your workflow:
|
Only pass the connection reference (a GCS URI or a Secret Manager secret id) through the pipeline, and read, validate and map the connection JSON on first use in worker setup.
The launcher no longer needs GCS or Secret Manager access to submit the job, and resolved credentials (passwords/tokens) are no longer captured by serializable suppliers and embedded in the serialized DoFns.