[WIP] Write failed JSON to Document parsing to DLQ and catch NPE exceptions#3749
[WIP] Write failed JSON to Document parsing to DLQ and catch NPE exceptions#3749le-michael wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
Conversation
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 improves the reliability of the MongoDB to Firestore data pipeline by introducing a more resilient error handling mechanism. By decoupling the parsing logic from the bulk write operation, the system can now identify and isolate malformed records, routing them to a DLQ rather than allowing them to cause pipeline failures or runtime exceptions. 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 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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces error handling for MongoDB document parsing by capturing failures and routing them to a Dead Letter Queue (DLQ). It refactors processBatch and processBatchFinish to use a new lazy-parsing mechanism in MongoDbChangeEventContext and adds validation to Utils.jsonToDocument. Review feedback points out that FailsafeElement lacks a setException method, suggests a standard approach for stack trace formatting, and recommends refactoring duplicated logic into a shared helper method.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (5.17%) 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 #3749 +/- ##
==========================================
Coverage 53.06% 53.07%
- Complexity 6026 6439 +413
==========================================
Files 1072 1072
Lines 64967 64979 +12
Branches 7198 7199 +1
==========================================
+ Hits 34477 34489 +12
- Misses 28172 28176 +4
+ Partials 2318 2314 -4
🚀 New features to boost your workflow:
|
No description provided.