Skip to content

Add missing fields for releng release json api#648

Open
m1rm wants to merge 3 commits intoarchlinux:masterfrom
m1rm:add-missing-fields-for-releng-release-json-api
Open

Add missing fields for releng release json api#648
m1rm wants to merge 3 commits intoarchlinux:masterfrom
m1rm:add-missing-fields-for-releng-release-json-api

Conversation

@m1rm
Copy link

@m1rm m1rm commented Mar 22, 2026

This MR:

  • adds "pgp_fingerprint" and "wkd_email" to /releng/releases/json
  • extends the fixtures with a pgp_key

Response with new fixture:

{
    "version": 1,
    "releases": [
        {
            "release_date": "2017-06-11",
            "version": "2022.06.01",
            "kernel_version": "4.12",
            "created": "2017-06-07T19:36:49.569Z",
            "md5_sum": "f029d6004e63464b1b26c62058c4e37e",
            "sha1_sum": "2c2c8ce676e891ac354cf4a8bac3824a4aae0c90",
            "sha256_sum": "1f2ecf3eec6013c49224445c469069b269dae47efb8e161bc6334c6611c3a1ec",
            "b2_sum": "8c9ffd1f8213247004e2439bdf5688db45208a0135013c100837227cc7a38d2616888cb16bb69204def929083e749c13903bad68f47f2924204d6abd58d816b3",
            "wkd_email": "pierre@archlinux.de",
            "pgp_fingerprint": "3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C",
            "available": true,
            "iso_url": "/iso/2022.06.01/archlinux-2022.06.01-x86_64.iso",
            "magnet_uri": "magnet:?dn=archlinux-2022.06.01-x86_64.iso",
            "torrent_url": "/releng/releases/2022.06.01/torrent/",
            "info": "<p>public information</p>",
            "torrent": null
        }
    ],
    "latest_version": "2022.06.01"
}

@christian-heusel
Copy link
Member

Just out of interest, what do you plan to use this for? 😊

Also it would maybe be sensible to add these new fields to the tests in releng/tests/test_views.py:

assert release_data['pgp_fingerprint'] == '3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C'
assert release_data['wkd_email'] == 'pierre@archlinux.de

@m1rm
Copy link
Author

m1rm commented Mar 22, 2026

Just out of interest, what do you plan to use this for? 😊

Also it would maybe be sensible to add these new fields to the tests in releng/tests/test_views.py:

assert release_data['pgp_fingerprint'] == '3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C'
assert release_data['wkd_email'] == 'pierre@archlinux.de

I thought of adding tests but was not sure about it/local tryouts failed (I am a Django beginner).

When I add the assertions, the tests fail. I think I would need to add this in view_test.py to make them work:

def test_release_json(client, release, torrent_data):
    release.pgp_key = '3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C'
    release.wkd_email = 'pierre@archlinux.de'
    release.save()

another place would be conftest.py, like this:

def test_release_json(client, release, torrent_data):
    release.pgp_key = '3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C'
    release.wkd_email = 'pierre@archlinux.de'
    release.save()

and I am not sure if we want to duplicate the fixture data like this, as it also was not done with other fixture data so far (I feel like missing sth. obvious ^^")

@pierres
Copy link
Member

pierres commented Mar 22, 2026

Just out of interest, what do you plan to use this for? 😊

Primary reason was to use these information on https://www.archlinux.de/download ;-) But in addition to this, it would support any future tooling someone might come up with. It's always nice to have access to all data in a machine readable way as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants