-
Notifications
You must be signed in to change notification settings - Fork 1.7k
UBERF-13123: Fix mail message duplicates #9684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Artem Savchenko <armisav@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a solution to prevent mail message duplicates by introducing an LRU cache to track sent messages and improve Message-ID handling. The fix addresses the UBERF-13123 issue by ensuring messages are only sent once and implementing proper email Message-ID generation and parsing.
Key changes include:
- Added LRU cache in MailWorker to track sent messages and prevent duplicates
- Implemented proper email Message-ID generation and parsing utilities
- Enhanced message handling to use standardized Message-ID format
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/mail/pod-mail-worker/src/mailWorker.ts | Added LRU cache for duplicate detection and enhanced message sending logic |
| services/mail/pod-mail-worker/src/handlerMta.ts | Refactored to use new MailHeader enum and email ID generation utilities |
| services/mail/pod-mail-worker/package.json | Added lru-cache dependency |
| services/mail/mail-common/src/utils.ts | Implemented email Message-ID conversion utilities and helper functions |
| services/mail/mail-common/src/types.ts | Added MailHeader enum and updated MessageData interface |
| services/mail/mail-common/src/message.ts | Updated message creation to use new ID conversion logic |
| services/mail/mail-common/src/tests/utils.test.ts | Added comprehensive test coverage for new utility functions |
| services/gmail/pod-gmail/src/message/v2/send.ts | Updated to use new Message-ID generation utility |
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
…nto UBERF-13123/fix-duble-mail
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
No description provided.