Skip to content

Conversation

@ArtyomSavchenko
Copy link
Member

No description provided.

Signed-off-by: Artem Savchenko <armisav@gmail.com>
Copy link
Contributor

Copilot AI left a 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>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
@ArtyomSavchenko ArtyomSavchenko marked this pull request as ready for review August 21, 2025 06:26
@haiodo haiodo merged commit 0161035 into develop Aug 21, 2025
15 checks passed
@haiodo haiodo deleted the UBERF-13123/fix-duble-mail branch August 21, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants