Conversation
📝 WalkthroughWalkthroughThe MongoDB connector's change-stream handling was updated: full documents are no longer marshaled to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@connectors/mongo/conn.go`:
- Around line 644-654: The nil-check for change.FullDocument in the
"update"/"replace" branch is insufficient because FullDocument is a bson.Raw
(not a Go nil when Mongo returns BSON null); update the condition in the case
handling (where adiomv1.Update is constructed) to detect empty or BSON null
payloads by using len(change.FullDocument) == 0 or inspecting
change.FullDocument.Type/Lookup(), and return nil,nil when empty/null; apply the
same validation to the insert handling to ensure no null/empty bson.Raw is sent
as adiomv1.Update.Data.
330b495 to
d5ecae9
Compare
Summary by CodeRabbit