Message ID | 20240209143041.1688862-1-tgamblin@baylibre.com |
---|---|
State | Accepted, archived |
Commit | 465c25ce2ddb310b6faf7fc27ab6caa2934337ee |
Headers | show |
Series | patchtest-send-results: Add 'References' header | expand |
I'm also seeing in google mail web client that patchtest responses aren't threaded with the original patch; will this address it? Alex On Fri, 9 Feb 2024 at 15:30, Trevor Gamblin <tgamblin@baylibre.com> wrote: > > 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 <tgamblin@baylibre.com> > --- > scripts/patchtest-send-results | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results > index 075b60d8f7d..9fd24c9b959 100755 > --- a/scripts/patchtest-send-results > +++ b/scripts/patchtest-send-results > @@ -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: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 2024-02-09 09:32, Alexander Kanavin wrote: > 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 > > Alex > > On Fri, 9 Feb 2024 at 15:30, Trevor Gamblin<tgamblin@baylibre.com> wrote: >> 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<tgamblin@baylibre.com> >> --- >> scripts/patchtest-send-results | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results >> index 075b60d8f7d..9fd24c9b959 100755 >> --- a/scripts/patchtest-send-results >> +++ b/scripts/patchtest-send-results >> @@ -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:openembedded-core+owner@lists.openembedded.org >> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=- >>
diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results index 075b60d8f7d..9fd24c9b959 100755 --- a/scripts/patchtest-send-results +++ b/scripts/patchtest-send-results @@ -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'
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 <tgamblin@baylibre.com> --- scripts/patchtest-send-results | 5 +++++ 1 file changed, 5 insertions(+)