[PATCH] Fix issue with delegation of patch via REST API

Stephen Finucane stephen at that.guru
Thu Sep 26 01:33:35 AEST 2019


On Tue, 2019-09-24 at 14:12 -0500, Bjorn Helgaas wrote:
> On Tue, Sep 24, 2019 at 09:45:16AM +0100, Stephen Finucane wrote:
> > On Mon, 2019-09-23 at 15:39 -0500, Bjorn Helgaas wrote:
> > > On Sat, Sep 21, 2019 at 07:30:46PM +0100, Stephen Finucane wrote:
> > > > There have been reports of people being unable to delegate patches to
> > > > themselves, despite being a maintainer or the project to which the patch
> > > > is associated.
> > > > ...
> > > I tried the instance at https://patchwork.kernel.org/project/linux-pci/list/
> > > to see if it was new enough to work without this fix.  But it also
> > > fails, slightly differently:
> > > 
> > >   $ git config -l | grep "^pw"
> > >   pw.server=https://patchwork.kernel.org/api/1.1
> > >   pw.project=linux-pci
> > >   pw.token=...
> > > 
> > >   $ git-pw patch update --delegate helgaas 11151519
> > >   More than one delegate found: helgaas
> > > 
> > > Is this another manifestation of the same bug or something else?
> > 
> > This is a different issue and, unlike the other one, is more feature
> > than bug. This is happening because the search for a particular user is
> > returning multiple matches. We match on username, first name, last name
> > and email, so I imagine you have multiple user accounts on the instance
> > and there might be a conflict between an email address of one account
> > and a username of another? (Let me know if this isn't the case). The
> > easy solution is to use a more specific match. I'd suggest just using
> > the email address associated with your user account ([1] suggests this
> > is 'bhelgaas at google.com'). We could also support lookup by user ID
> > (which would guarantee a single match) but I haven't added that to git-
> > pw yet since it didn't seem that usable.
> 
> Still no workey.  I'm cursed.  The web "Delegate to" dropdown menu
> includes "bhelgaas" and my profile seems to be associated with
> "bhelgaas" (at least, that's the name in the upper right of the web
> page when I'm logged in).
> 
>   $ git-pw patch update --delegate bhelgaas 11151519
>   {u'delegate': [u"User 'bhelgaas' is not a maintainer for project 'Linux PCI development list'"]}
>   $ git-pw patch update --delegate bhelgaas at google.com 11151519
>   {u'delegate': [u"User 'bhelgaas' is not a maintainer for project 'Linux PCI development list'"]}
>   $ git-pw patch update --delegate bjorn at helgaas.com 11151519
>   No matching delegates found: bjorn at helgaas.com
> 
> https://patchwork.kernel.org/user/ also claims I'm a maintainer for
> https://patchwork.kernel.org/project/linux-pci/list/ and shows both
> bhelgaas at google.com and bjorn at helgaas.com as email addresses.

I'll have a look into this but I've no ideas off the top of my head. If
you're comfortable with Python, could you add a couple of print
statements to log what we're requesting from the API and what we're
getting back and share them here? If not, I'll try look into this next
week.

Stephen

> > [1] https://patchwork.kernel.org/project/linux-pci/



More information about the Patchwork mailing list