fix(federation): keep failed matrix messages staged - #42021
fix(federation): keep failed matrix messages staged#42021devanshpandey-08 wants to merge 5 commits into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 829a162 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. WalkthroughThe Matrix message handler now rethrows errors from ChangesMatrix message retry handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Failed Matrix federation message saves now propagate rather than being treated as handled, preserving retry eligibility for transient media failures. The focused behavior test passed, and no current merge-blocking risk remains. Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The change correctly rethrows message-processing errors and adds a regression test, which prevents failed events from being treated as handled. The linked issue also requires transient-status retry behavior, retry limits, placeholder persistence, and consistent media endpoint logging, none of which are shown in this changeset. Resolution Implement or provide verified coverage for the linked issue requirements: retry eligible 404, 408, 429, and 5xx failures with existing limits and backoff; preserve staged events while retries remain; persist a placeholder message when required; and log all attempted media endpoints and failures.
Warning Errors were encountered while retrieving linked issues. Errors (1)
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.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
What
Keep failed Matrix message processing staged when saving the message fails.
Why
A transient media download failure is currently logged by the listener and the event can be treated as handled. Rethrowing the error keeps the event eligible for retry.
Closes #41848
Testing
yarn workspace @rocket.chat/federation-matrix test --runInBand src/events/message.spec.ts— passed@rocket.chat/models.Summary by CodeRabbit