Re: Introduce contributor badges

From: Christoph Berg <myon(at)debian(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-www(at)lists(dot)postgresql(dot)org, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, PostgreSQL Contributors <contributors(at)lists(dot)postgresql(dot)org>
Subject: Re: Introduce contributor badges
Date: 2026-09-25 15:46:20
Message-ID: araXTIuHpGxWIWHf@msg.df7cb.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hi,

thanks Magnus for the in-depth patch review during the Lowlands PGday.

I'm attaching v11.

> I also note that patch 2 doesn't have the changes that went into pgeu. We should probably merge patches 1 and 2 as a single "import frm pgeu-system" and just grab the current head there, since it has progressed since. I can do that when the time comes.

I merged the two patches into 0001, but I don't see any new pgeu
changes that would affect this. What am I missing?

> Is there a reason that OneToOne change to the User model can't be done as a separate thing before this? In the interest of keeping things into easily reviewable pieces?

This is 0002 now.

> nitpick is you can save a bunch of html padding by not adding badges-cell to each cell and instead just use a css rule anchored in badges-grid I think, similar to how you're already doing it for the img just one step higher.
> and since some of these pages can get large quickly...

Done. Please check if I understood that correctly and did the correct
change, though :)

> Patch also contains 73aab7456 which has already been applied... So needs some rebasing.

That should have resolved itself.

> Queries for badges should avoid reading the imagedata in every query that doesn't need it. Using defer — probably by defining a default defer.

Fixed.

> UserModelMultipleChoiceField seems to be a bad name for something that checks Contributors, not Users?

Changed.

> Purging definitely needs to be more specific, we don't want to purge everything including all the images when a contributor is edited.

Also done. Since purges can be limited to specific pages by '...$', I
did not move any URLs around.

> (sprite discussion, will do that one in person )

I took a mental note of the problem - we'll revisit that once we have
too many badges (or better a bit before that).

> For the "list all people" view if we don't want to do pagination at this time can we at least put a temporary ceiling on it so we don't generate an absolutely ginormous page. as in only show the first 500 or something. It'll take time to reach that point, but it will get increasingly painful on the way there.

There's limits now, but I went with 2000. There are 1700 distinct
names mentioned in the release notes since PG10 and I think we would
hit 500 rather quickly.

Christoph

Attachment Content-Type Size
v11-0001-Cherry-pick-ImageBinaryField-and-related-from-pg.patch.gz application/gzip 3.6 KB
v11-0002-Turn-Contributor.user-into-a-OneToOneField.patch.gz application/gzip 1.3 KB
v11-0003-Introduce-contributor-badges.patch.gz application/gzip 11.9 KB
v11-0004-Make-contributor-badges-discoverable.patch.gz application/gzip 1.8 KB

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Kirill Reshke 2026-09-27 01:45:18 Wiki write access request
Previous Message Daniel Gustafsson 2026-09-25 07:26:08 Re: [PATCH] Daily mbox download link