All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Derek Barbosa <debarbos@redhat.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	users@kernel.org,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: Linking Patchwork with Sashiko?
Date: Tue, 2 Jun 2026 22:29:28 +0200	[thread overview]
Message-ID: <20260602222928.51cc1063@foz.lan> (raw)
In-Reply-To: <20260602183955.GJ2487554@ziepe.ca>

On Tue, 2 Jun 2026 15:39:55 -0300
Jason Gunthorpe <jgg@ziepe.ca> wrote:

> On Tue, Jun 02, 2026 at 06:51:15PM +0200, Mauro Carvalho Chehab wrote:
> > On Tue, 2 Jun 2026 11:51:42 -0400
> > Derek Barbosa <debarbos@redhat.com> wrote:
> >   
> > > On Sat, May 30, 2026 at 08:53:51PM +0200, Mauro Carvalho Chehab wrote:  
> > > > 
> > > > In time: problematic in the sense that the first project that
> > > > picked it is likely the patch "owner": the token will require
> > > > maintainership on such project.
> > > > 
> > > > In practice it would mean that the token used on patchwork instances
> > > > with multiple Kernel projects may need maintainers permission on all
> > > > such projects, as otherwise patchwork update will fail.
> > > > 
> > > > Thanks,
> > > > Mauro
> > > >     
> > > 
> > > Hi Mauro,
> > > 
> > > Just to recap the the thread, to confirm that I am following it correctly:
> > > 
> > > - Patchwork only supports a single URL mask for message-ID lookup (lore or
> > >   sashiko). Adding a sashiko link would require diverging from upstream.  
> > 
> > Not sure what you mean.
> > 
> > AFAIKT, a RFC-822 application can have just one message-ID per message.
> > 
> > For message lookup, patchwork works using its own patch ID, or via a search
> > to the original message ID that contains the patch. So, no, it won't be lore
> > nor sashiko, as neither lore nor sashiko write e-mails ;-)  
> 
> He means the hyperlink patchworks adds, ie look here:
> 
> https://patchwork.kernel.org/project/linux-rdma/patch/20260602140453.3542427-1-arnd@kernel.org/
> 
> See the near top of the page "Message ID" section 
> 
> Message ID	20260602140453.3542427-1-arnd@kernel.org (mailing list archive)
>                                                            ^^^^^^^^^^^^^^^^^^
> 
> That hyperlink goes to lore, Kostantin set this up
> 
> What I suggested as a very basic first step is a second hyperlink to
> Sashiko, which I guess needs upstream to adjust how they generate this
> html.

If you want exactly like that, it would require patchwork changes(*), but
see that CI checks context have their own link as well, like here:

(*) to be more precise, it will require changing an html template 
    (templates/patchwork/submission.html). There it says how a patch
     is shown.

    The message ID part is like this:

	{% for sibling in submission.series.patches.all %}
            <li>
	{% if sibling == submission %}
                {{ sibling.name|default:"[no subject]"|truncatechars:100 }}
	{% else %}
              <a href="{% url 'patch-detail' project_id=project.linkname msgid=sibling.encoded_msgid %}">
                {{ sibling.name|default:"[no subject]"|truncatechars:100 }}
              </a>
	{% endif %}
            </li>

	...

    And the CI checks are:
	
	{% if checks %}
	<h2>Checks</h2>
	<table class="checks">
	<tr>  
	  <th>Context</th>
	  <th>Check</th>
	  <th>Description</th>
	</tr> 
	{% for check in checks %}
	<tr>  
	  <td>{{ check.user }}/{{ check.context }}</td>
	  <td>
	    <span title="Updated {{ check.date|naturaltime }}" class="state {{ check.get_state_display }}">
	      {{ check.get_state_display }}
	    </span>
	  </td>
	  <td>
	{% if check.target_url %}
	    <a href="{{ check.target_url }}">
	{% endif %}
	    {{ check.description }}
	{% if check.target_url %}
	    </a>
	{% endif %}
	  </td>
	</tr>
	{% endfor %}
	</table>
	{% endif %}	

Yet, if you see how the above template is parsed, here, for instance:
	https://patchwork.linuxtv.org/project/linux-media/patch/20260530143541.229628-4-phasta@kernel.org/

Btw, on media patchwork, we're using Patchwork v3.2.1 as is, with just one 
or two fix patches on the top of it (and with series patch from an upstream 
PR merged) and no template changes.

You'll see there that media-ci added 4 contexts to this patch, 
each with its own link URL (all descriptions there are "Link").
Each {target_url} field there goes directly to the media-ci logs.

My bot added just one for sashiko (and if we had LKP and/or
sysbot for the same patch, it would be shown there as well as
separate lines). 

As this came from an unsigned e-mail, I'm opting to place there
a link to lore, as it already sanitizes URLs, hopefully avoiding them
to point to some malicious site.

I might have placed instead a link to sashiko CI output, but on
such case, I would like require a gpg signature to validate the e-mail
content, as adding links received by e-mail without first validating
its origin is not good from security point of view.

> Integrating as CI reports and so on would be nice if someone can
> manage it for all the kernel.org patchworks :)

No idea what you meant as "CI reports", and what this is different
from what we have today already implemented on patchwork.

Thanks,
Mauro

  reply	other threads:[~2026-06-02 20:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260528144627.1ae09ff2@foz.lan>
     [not found] ` <1372F826-5513-4EB2-AE27-1DC0D2DE0AEB@linux.dev>
     [not found]   ` <20260529083100.6710b6cd@foz.lan>
     [not found]     ` <20260529083801.2c7e8990@foz.lan>
     [not found]       ` <ahmwUk0uXTkdwohf@debarbos-thinkpadt14gen5.rmtusma.csb>
2026-05-30  8:30         ` Linking Patchwork with Sashiko? Mauro Carvalho Chehab
2026-05-30 15:57           ` Roman Gushchin
2026-05-30 18:00             ` Mauro Carvalho Chehab
2026-05-30 18:49               ` Mauro Carvalho Chehab
2026-05-30 18:53                 ` Mauro Carvalho Chehab
2026-06-02 15:51                   ` Derek Barbosa
2026-06-02 16:51                     ` Mauro Carvalho Chehab
2026-06-02 18:39                       ` Jason Gunthorpe
2026-06-02 20:29                         ` Mauro Carvalho Chehab [this message]
2026-06-02 20:13                     ` Roman Gushchin
2026-06-02 20:39                       ` Mauro Carvalho Chehab
2026-06-02 20:44                         ` Roman Gushchin
2026-06-02 23:50                         ` Matthieu Baerts
2026-06-03  3:35                           ` Mauro Carvalho Chehab
2026-06-03  3:49                             ` Roman Gushchin
2026-06-04  6:52                           ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260602222928.51cc1063@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=debarbos@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=users@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.