Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjq5e-0008Qd-Ar for pgsql-www@arkaria.postgresql.org; Wed, 16 Jan 2019 18:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjq5c-0007qB-Ih for pgsql-www@arkaria.postgresql.org; Wed, 16 Jan 2019 18:39:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjq5c-0007q4-DV for pgsql-www@lists.postgresql.org; Wed, 16 Jan 2019 18:39:00 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjq5Z-00042K-Mj; Wed, 16 Jan 2019 18:39:00 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id EC4385F79E; Wed, 16 Jan 2019 13:38:55 -0500 (EST) Date: Wed, 16 Jan 2019 13:38:55 -0500 From: Stephen Frost To: Andres Freund Cc: Magnus Hagander , "Jonathan S. Katz" , PostgreSQL WWW Subject: Re: mailing list redirect for bug numbers? Message-ID: <20190116183855.GD2528@tamriel.snowman.net> References: <20190114221809.eymqah36d6uq5nir@alap3.anarazel.de> <9cfc2880-0623-7cc3-45f4-342c3af881fe@postgresql.org> <20190115191915.eavj4i4mmf5wmoaf@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dSmtnjYPvq2P1WaU" Content-Disposition: inline In-Reply-To: <20190115191915.eavj4i4mmf5wmoaf@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --dSmtnjYPvq2P1WaU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > > 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/ > > > > > > > > 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 d= one > > > > with a prefix query that filters the sender to @postgresql.org, the= list > > > > to pgsql-bugs, and the prefix to "BUG #" 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. > >=20 > > Worth noticing is that it's also prefixed to the message-id, but that's= a > > fairly new thing. >=20 > 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 form= at > > > > (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. > >=20 > > Yeah, those would be entirely out of scope. >=20 > 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//? > >=20 > > Or would we perhaps want tp use the postgr.es urls-shorterner with just= a > > /b/ (like we have /m/ for messageids)? >=20 > 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 abo= ve > > > message beginning to -bugs. Determine if it is the first message to t= he > > > thread / bug ID is already registered. If it does not exist, record t= he > > > bug ID, message ID combo in a new table > >=20 > > 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.... >=20 > 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 --dSmtnjYPvq2P1WaU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcP3o/AAoJEO1sijiDR2RVRcoQAMiGfyu2Xi8WDgPnIInYFHhw HRfpB2+OacYRkV76odFrvwnvj5C15L/qjsXb+fb9MFDD02YE4zipq8WSYgl7mpNs 907n1CLYml1lb31pTCgXKH9+iuJi5/5gL3yBZ1N01ShaW3LToY6L7+U6voG/EjWF uWqDG+myFdWRZ11iyrlR62xxq3zTmEgtd9Sqj6/jX/jpDzLXpQhsehAgXAsP/Iub AEDQcuCIcLQj6wX6taR8sN5RwnjeRJR8z0nXLAZexMpHVHbHtm6NaW7Fc2ld4X0M aOLd35TXXJOyFzkAngBpp++WNLYwx5SLz5JLCXv4toaGzcZp/Fy42fKUpRiCuvnu bQz8wF2gPqT/OPpzdzEQRQfcw61PcRqF/d9u8r9hhcd7TlKCAEnrDBNJt9wroscJ k36Eird+X/GpCMmWBfKE14ICfBtJjjYlJpWkDDL5KBSm3fu7HTMRfhtK6HP2oiVg +CyHzflbIGdb01b1itJJQAbATFKsnRqUVWYQgIu/mPgUZTvBbWqUAnbtVhYCThjO 2q6czXglCsNJCCy/QZLBYY+ZIwGyARtxrvivnY7nnL+vvsO3jMJachEGf8PiVHzs eyb/N4LTnwOWoxLK4cfGLnf6Ym78y4xvbJauvWAdIeSow2+nGjc9bznoztKXrQhT PWR+kyCwiMCTaJUDgHHx =GSdT -----END PGP SIGNATURE----- --dSmtnjYPvq2P1WaU--