Re: Add versions.json endpoint with latest release information

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>, Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
Cc: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Add versions.json endpoint with latest release information
Date: 2021-04-30 13:11:44
Message-ID: 2093c3bc-5d9e-ed0d-fbba-878bcd193e31@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On 4/30/21 2:58 AM, Magnus Hagander wrote:
> On Wed, Apr 28, 2021 at 3:29 PM Sehrope Sarkuni <sehrope(at)jackdb(dot)com> wrote:
>>
>> On Tue, Apr 27, 2021 at 5:09 PM Jonathan S. Katz <jkatz(at)postgresql(dot)org> wrote:
>>>
>>> I would suggest modeling the query after what we are doing with the RSS
>>> feed[2].
>>
>>
>> Done. Updated patch is attached.
>>
>> It also renames some output fields ("tree" as "major" and "latestminor" as "minor") and adds a sort order on the JSON fields to ensure stable output.
>>
>> $ curl -s http://localhost:8000/versions.json | jq last
>> {
>> "current": false,
>> "eoldate": "2014-07-01",
>> "major": "8.4",
>> "minor": 0,
>> "reldate": "2009-07-01",
>> "supported": true
>> }
>
> I like the idea, btu a few comments:
>
> * Why do we care about sorting the keys? Not that it matters much, but
> it mostly seems a bit silly, but if there is a reasoning behind it
> there's no problem -- I'd just like to know what the reasoning is.
>
> * It reports major version as "13.0", not "13". It's correct for
> versions prior to 10.

Then this needs to be corrected:

https://www.postgresql.org/support/versioning/

"Minor releases are numbered by increasing the last part of the version
number. Beginning with PostgreSQL 10, this is the second part of the
version number, e.g. 10.0 to 10.1; for older versions this is the third
part of the version number, e.g. 9.5.3 to 9.5.4."

>
> * In the XML/RSS feed we include a link to the release notes for the
> version. Do we want to do that here as well? I'm thinking probably not
> because (1) the RSS needs a clickable link, that's probably the only
> reason it's there, and (2) release notes can now be found at
> /docs/release/<version>/, which was not the case at the time of the
> RSS feed being created. But I wanted to raise it for discussion in
> case people would find it useful?
>
> * I'm thinking the orignal name "latestminor" is actually better than
> "minor" -- the previous minor releases still exist after all.
>
> * Would it make sense to have an actual query parameter like
> "?current=1" or something that would give you *just* the current
> version? To avoid having to download all? And maybe also
> "?supported=1" to get just supported versions? To avoid having to do
> those filterings client side?
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message arslan.whitehat 2021-04-30 17:36:34 Any Update on Reported Vulnerability
Previous Message Sehrope Sarkuni 2021-04-30 11:05:50 Re: Add versions.json endpoint with latest release information