Tolerate complex form parent already deleted during FwData sync#2374
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesFix and test DeleteComplexFormComponent missing parent crash
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/FwLite/FwDataMiniLcmBridge/Api/FwDataMiniLcmApi.cs`:
- Line 1092: `DeleteComplexFormComponent` has an invalid early-exit for a
`Task`-returning method: replace the bare guard return after
`EntriesRepository.TryGetObject(...)` with a completed task return so the
method’s return type stays consistent. Update the guard in
`FwDataMiniLcmApi.DeleteComplexFormComponent` to return `Task.CompletedTask`
when the entry lookup fails, and keep the rest of the method unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e4510edf-54f7-4299-9028-dc5617ddd835
📒 Files selected for processing (2)
backend/FwLite/FwDataMiniLcmBridge/Api/FwDataMiniLcmApi.csbackend/FwLite/FwLiteProjectSync.Tests/EntrySyncTests.cs
6916faf to
9d24b43
Compare
Resolves #2373
Just ran into this when trying to sync the rmunn thai-food project in prod.
This bug/exception could also be fixed by re-reading all the FwData entries before diffing/syncing complex forms and components. I.e. make the diff reflect any cascaded deletes before moving to a new phase.
Funny that we just dealt with this sort of thing in CRDT-land. But this is different, here in fwdata-land.