Skip to contentSkip to conversation

Remove message-id from cc list

PATCH Applied Louis Chauvet 4 participants 5 messages Aug 28, 2024 – Sep 6, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove message-id from cc list

As the algorithm to detect mails to add in CC is very simple, it also include the prerequisite-message-id to CC as they look like mails. In order to avoid this kind of issue, filter out prerequisite-message-id lines.

---
 src/b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/b4/__init__.py +1 -1
index ec230e7ace66..b0d91c0e4017 100644
@@ -1990,7 +1990,7 @@ class LoreMessage:
 
     @staticmethod
     def find_trailers(body: str, followup: bool = False) -> Tuple[List[LoreTrailer], List[str]]:
-        ignores = {'phone', 'email'}
+        ignores = {'phone', 'email', 'prerequisite-message-id'}
         headers = {'subject', 'date', 'from'}
         links = {'link', 'buglink', 'closes'}
         nonperson = links | {'fixes', 'subject', 'date', 'obsoleted-by', 'change-id', 'base-commit'}

---
base-commit: 99b128995f27cd9aa6fa8adf7588f339919ac14d
change-id: 20240828-remove-invalid-cc-eecbd7d43b3d

Best regards,

Signature · 1 line
Louis Chauvet <[email protected]>
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 28 lines · Louis Chauvet

As the algorithm to detect mails to add in CC is very simple, it also include the prerequisite-message-id to CC as they look like mails. In order to avoid this kind of issue, filter out prerequisite-message-id lines.

---
src/b4/__init__.py | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
src/b4/__init__.py +1 -2
index ec230e7ace66..b0d91c0e4017 100644
@@ -1990,7 +1990,7 @@ class LoreMessage:
 
    @staticmethod
    def find_trailers(body: str, followup: bool = False) -> Tuple[List[LoreTrailer], List[str]]:
-        ignores = {'phone', 'email'}
+        ignores = {'phone', 'email', 'prerequisite-message-id'}
        headers = {'subject', 'date', 'from'}
        links = {'link', 'buglink', 'closes'}
        nonperson = links | {'fixes', 'subject', 'date', 'obsoleted-by', 'change-id', 'base-commit'}
 
---

base-commit: 99b128995f27cd9aa6fa8adf7588f339919ac14d
change-id: 20240828-remove-invalid-cc-eecbd7d43b3d

Quoted 4 lines

Best regards,

Signature · 1 line
Louis Chauvet <[email protected]>
#2 lore raw
In reply to Louis Chauvet
Quoted 25 lines · Louis Chauvet

As the algorithm to detect mails to add in CC is very simple, it also include the prerequisite-message-id to CC as they look like mails. In order to avoid this kind of issue, filter out prerequisite-message-id lines.

---
 src/b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/b4/__init__.py +1 -2
index ec230e7ace66..b0d91c0e4017 100644
@@ -1990,7 +1990,7 @@ class LoreMessage:
 
     @staticmethod
     def find_trailers(body: str, followup: bool = False) -> Tuple[List[LoreTrailer], List[str]]:
-        ignores = {'phone', 'email'}
+        ignores = {'phone', 'email', 'prerequisite-message-id'}
         headers = {'subject', 'date', 'from'}
         links = {'link', 'buglink', 'closes'}
         nonperson = links | {'fixes', 'subject', 'date', 'obsoleted-by', 'change-id', 'base-commit'}
 
---
Quoted 2 lines

base-commit: 99b128995f27cd9aa6fa8adf7588f339919ac14d
change-id: 20240828-remove-invalid-cc-eecbd7d43b3d

I have not been able to test (yet), but I'm guessing this should fix this bug[1] I reported a couple weeks ago.

Thanks for the fix!

Kevin

[1] https://bugzilla.kernel.org/show_bug.cgi?id=219138

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 26 lines · Kevin Hilman
Quoted 24 lines · Louis Chauvet

As the algorithm to detect mails to add in CC is very simple, it also include the prerequisite-message-id to CC as they look like mails. In order to avoid this kind of issue, filter out prerequisite-message-id lines.

---
 src/b4/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/b4/__init__.py +1 -1
index ec230e7ace66..b0d91c0e4017 100644
@@ -1990,7 +1990,7 @@ class LoreMessage:
 
     @staticmethod
     def find_trailers(body: str, followup: bool = False) -> Tuple[List[LoreTrailer], List[str]]:
-        ignores = {'phone', 'email'}
+        ignores = {'phone', 'email', 'prerequisite-message-id'}
         headers = {'subject', 'date', 'from'}
         links = {'link', 'buglink', 'closes'}
         nonperson = links | {'fixes', 'subject', 'date', 'obsoleted-by', 'change-id', 'base-commit'}
Quoted 6 lines
Quoted 3 lines

---
base-commit: 99b128995f27cd9aa6fa8adf7588f339919ac14d
change-id: 20240828-remove-invalid-cc-eecbd7d43b3d

I have not been able to test (yet), but I'm guessing this should fix this bug[1] I reported a couple weeks ago.

I can now confirm that this patch fixes this bug[1].

Thanks Louis for the fix!

Kevin

P.S. is there some bugbot magic to connect this thread to an existing bug?

[1] https://bugzilla.kernel.org/show_bug.cgi?id=219138

#5 lore raw
In reply to Louis Chauvet
Quoted 6 lines · Louis Chauvet

As the algorithm to detect mails to add in CC is very simple, it also include the prerequisite-message-id to CC as they look like mails. In order to avoid this kind of issue, filter out prerequisite-message-id lines.

Applied, thanks!

[1/1] Remove message-id from cc list

      commit: 77eaedc7de548fdaa289c51f62278633bd815d01

Best regards,

Signature · 1 line
Konstantin Ryabitsev <[email protected]>