patchtest-send-results: Add 'References' header
PATCH 1/1 patchtest-send-results: Add 'References' header
Based on https://www.rfc-editor.org/rfc/rfc2822#section-3.6.4, to get proper threading there should be a 'References' field defined in Patchtest's response headers if its replies are going to thread properly on Patchwork. This wasn't there before, hence why were were seeing the responses in the right place on the mailing list but not Patchwork.
Since we only want Patchtest to reply directly to the tested patch, the 'References' field should only need to contain the same ID as the 'In-Reply-To' one.
--- scripts/patchtest-send-results | 5 +++++ 1 file changed, 5 insertions(+)
scripts/patchtest-send-results +5 -0
@@ -81,9 +81,14 @@ if has_a_failed_test(testresult): reply_contents = greeting + testresult + suggestions ses_client = boto3.client('ses', region_name='us-west-2') + + # Construct the headers for the email. We only want to reply + # directly to the tested patch, so make In-Reply-To and References + # the same value. raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \ '\nCC: ' + cc_address + '\nSubject:' + subject_line + \ '\nIn-Reply-To:' + in_reply_to + \ + '\nReferences:' + in_reply_to + \ '\nMIME-Version: 1.0" + \ "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \ reply_contents + '\n\n--NextPart'
Signature · 1 line
2.43.0
I'm also seeing in google mail web client that patchtest responses aren't threaded with the original patch; will this address it?
Alex
Quoted 47 lines · Trevor Gamblin
Based on https://www.rfc-editor.org/rfc/rfc2822#section-3.6.4, to get proper threading there should be a 'References' field defined in Patchtest's response headers if its replies are going to thread properly on Patchwork. This wasn't there before, hence why were were seeing the responses in the right place on the mailing list but not Patchwork.
Since we only want Patchtest to reply directly to the tested patch, the 'References' field should only need to contain the same ID as the 'In-Reply-To' one.
Signed-off-by Trevor Gamblin <[email protected]>--- scripts/patchtest-send-results | 5 +++++ 1 file changed, 5 insertions(+)scripts/patchtest-send-results +5
-1@@ -81,9 +81,14 @@ if has_a_failed_test(testresult): reply_contents = greeting + testresult + suggestions ses_client = boto3.client('ses', region_name='us-west-2') + + # Construct the headers for the email. We only want to reply + # directly to the tested patch, so make In-Reply-To and References + # the same value. raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \ '\nCC: ' + cc_address + '\nSubject:' + subject_line + \ '\nIn-Reply-To:' + in_reply_to + \ + '\nReferences:' + in_reply_to + \ '\nMIME-Version: 1.0" + \ "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \ reply_contents + '\n\n--NextPart' --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195220): https://lists.openembedded.org/g/openembedded-core/message/195220
Mute This Topic: https://lists.openembedded.org/mt/104259219/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 2 lines · Alexander Kanavin
I'm also seeing in google mail web client that patchtest responses aren't threaded with the original patch; will this address it?
It should. I went and compared Patchtest's responses to emails versus users' in threads (actually, one of yours!) and that was the main difference. It lines up with what the RFC says, too:
The "In-Reply-To:" and "References:" fields are used when creating a
reply to a message. They hold the message identifier of the original message and the message identifiers of other messages (for example, in the case of a reply to a message which was itself a reply). The "In-Reply-To:" field may be used to identify the message (or messages) to which the new message is a reply, while the "References:" field may be used to identify a "thread" of conversation.
and
Note: Some implementations parse the "References:" field to display
the "thread of the discussion". These implementations assume that each new message is a reply to a single parent and hence that they can walk backwards through the "References:" field to find the parent of each message listed there. Therefore, trying to form a "References:" field for a reply that has multiple parents is discouraged and how to do so is not defined in this document.
- Trevor
Quoted 50 lines
Alex
Quoted 46 lines · Trevor Gamblin
Based onhttps://www.rfc-editor.org/rfc/rfc2822#section-3.6.4, to get proper threading there should be a 'References' field defined in Patchtest's response headers if its replies are going to thread properly on Patchwork. This wasn't there before, hence why were were seeing the responses in the right place on the mailing list but not Patchwork.
Since we only want Patchtest to reply directly to the tested patch, the 'References' field should only need to contain the same ID as the 'In-Reply-To' one.
Signed-off-by Trevor Gamblin<[email protected]>--- scripts/patchtest-send-results | 5 +++++ 1 file changed, 5 insertions(+)scripts/patchtest-send-results +5
-1@@ -81,9 +81,14 @@ if has_a_failed_test(testresult): reply_contents = greeting + testresult + suggestions ses_client = boto3.client('ses', region_name='us-west-2') + + # Construct the headers for the email. We only want to reply + # directly to the tested patch, so make In-Reply-To and References + # the same value. raw_data = 'From: ' + from_address + '\nTo: ' + reply_address + \ '\nCC: ' + cc_address + '\nSubject:' + subject_line + \ '\nIn-Reply-To:' + in_reply_to + \ + '\nReferences:' + in_reply_to + \ '\nMIME-Version: 1.0" + \ "\nContent-type: Multipart/Mixed;boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\n' + \ reply_contents + '\n\n--NextPart' --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#195220):https://lists.openembedded.org/g/openembedded-core/message/195220 Mute This Topic:https://lists.openembedded.org/mt/104259219/1686489
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-