Re: mailing list redirect for bug numbers? - Mailing list pgsql-www

From Andres Freund
Subject Re: mailing list redirect for bug numbers?
Date
Msg-id 20190115191915.eavj4i4mmf5wmoaf@alap3.anarazel.de
Whole thread Raw
In response to Re: mailing list redirect for bug numbers?  (Magnus Hagander <magnus@hagander.net>)
Responses Re: mailing list redirect for bug numbers?  (Stephen Frost <sfrost@snowman.net>)
List pgsql-www
Hi,

On 2019-01-15 11:57:21 +0100, Magnus Hagander wrote:
> On Tue, Jan 15, 2019 at 11:43 AM Jonathan S. Katz <jkatz@postgresql.org>
> wrote:
> 
> > Hi Andres,
> >
> > On 1/14/19 5:18 PM, Andres Freund wrote:
> > > Hi,
> > >
> > > How hard would it be to have a redirect similar to
> > > https://www.postgresql.org/message-id/<id>
> > >
> > > that accepted bug numbers instead of message ids?  I don't know the
> > > precise database schema of the archives, but I assume it could be done
> > > with a prefix query that filters the sender to @postgresql.org, the list
> > > to pgsql-bugs, and the prefix to "BUG #<bugno>" or such.
> >
> > The bug ID numbers are generated from pgweb using:
> >
> >         SELECT nextval('bug_id_seq')
> >
> > And then prefixed to the email thread as per the above.
> >
> 
> Worth noticing is that it's also prefixed to the message-id, but that's a
> fairly new thing.

So we can't rely on that for reconstructing the historic mapping...


> > > It'd be neat to link to bugs from commit messages in a clearer format
> > > (i.e. to the bug number, rather than it being one of potentially
> > > multiple message ids), and it also makes manual lookup nicer.
> >
> > Agreed, that sounds like a nicer UX.
> >
> > The only big catch I see is that if someone emails -bugs directly, no
> > number is assigned, so we would have to leave that be.
> 
> Yeah, those would be entirely out of scope.

Agreed. I previously wished there were an email based interface to
submitting a bug, but that'd just be that, a new interface for
submitting a bug.

> I don't know if we would want to use "/message-id/" as the parent URL,
> > just in case someone sent a message with an ID of just digits (for
> > whatever reason). Dare I suggest something like "/bugs/<id>/?
> >
> 
> Or would we perhaps want tp use the postgr.es urls-shorterner with just a
> /b/ (like we have /m/ for messageids)?

Both? postgr.es/b/ redirects to the /bugs/ address, similar to /m/
redirecting to /message-id/?


> > - Adjust the message import script to parse inbound messages with above
> > message beginning to -bugs. Determine if it is the first message to the
> > thread / bug ID is already registered. If it does not exist, record the
> > bug ID, message ID combo in a new table
> >
> 
> That would suddenly put a very hard coded assumption into the archives code
> about this format, which I think is a bad idea in general since the
> archives code is not specific to the pgsql list usage *at all* today....

Couldn't the bug form instead just insert the message id it got from the
email it sent into the mapping database?  That ought to be pretty easy,
and would make the redirect dirt-cheap.  And reconstructing the historic
mapping shouldn't be more than one or two slow queries over the archive.

Greetings,

Andres Freund


pgsql-www by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: mailing list redirect for bug numbers?
Next
From: Stephen Frost
Date:
Subject: Re: mailing list redirect for bug numbers?