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

From Stephen Frost
Subject Re: mailing list redirect for bug numbers?
Date
Msg-id 20190116183855.GD2528@tamriel.snowman.net
Whole thread Raw
In response to Re: mailing list redirect for bug numbers?  (Andres Freund <andres@anarazel.de>)
Responses Re: mailing list redirect for bug numbers?  (Andres Freund <andres@anarazel.de>)
List pgsql-www
Greetings,

* Andres Freund (andres@anarazel.de) wrote:
> 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:
> > > On 1/14/19 5:18 PM, Andres Freund wrote:
> > > > 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...

No, but the subject could be used, of course.

> > > > 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.

This got me wondering...  why?

This discussion is all about building a mapping between a Bug# and a
message-ID.  If we do that, why not fill it in completely?  As in, have
a Bug# for every thread on -bugs, either the one assigned by the webpage
or one which we assign when we see the email come in and then backfill
that?

We'd then need a way to display the complete mapping somewhere, but I
wouldn't think that would be terribly difficult to do..

> > 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/?

Seems like a reasonable idea to me.

> > > - 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.

That seems like it'd work for messages using the form, if we're ok with
having the mapping live on wrigleys, which would probably be fine.

For the messages sent to -bugs that don't use the form, we could either
have a cronjob that runs regularly to assign bug #s, or we could hack up
the import code as contemplated above, or have emails to -bugs also go
to another system which just assigns the ID and then creates the
mapping.  Of course, there may be other ways, these are just some that
come to mind.

Thanks!

Stephen

Attachment

pgsql-www by date:

Previous
From: Andres Freund
Date:
Subject: Re: mailing list redirect for bug numbers?
Next
From: Andres Freund
Date:
Subject: Re: mailing list redirect for bug numbers?