public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@cherry.de>
To: antonin.godard@bootlin.com, docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [docs] [PATCH v2 1/3] tools/fetch-releases-json: add to fetch and format releases.json
Date: Fri, 27 Feb 2026 11:26:16 +0100	[thread overview]
Message-ID: <38678bef-ba8f-4181-85f4-c367c3f6dc29@cherry.de> (raw)
In-Reply-To: <20260226-releases-json-v2-1-6ba4a3b37b24@bootlin.com>

Hi Antonin,

On 2/26/26 3:00 PM, Antonin Godard via lists.yoctoproject.org wrote:
> Add a simple script that can be used to fetch and format the
> releases.json file from https://dashboard.yoctoproject.org/releases.json.
> 

OK but why do we want this in the tree? It'll still be regularly outdated.

I understand not wanting to rely on a network connection, but we already 
need that for the bitbake's object.inv we download... so this ain't that 
much different.

Then, it's never outdated?

[...]

> diff --git a/documentation/tools/fetch-releases-json b/documentation/tools/fetch-releases-json
> new file mode 100755
> index 000000000..d06a1428f
> --- /dev/null
> +++ b/documentation/tools/fetch-releases-json
> @@ -0,0 +1,30 @@
> +#!/usr/bin/env python3
> +#
> +# Fetch the releases.json file from the remote endpoint and format it.
> +# Copyright Linux Foundation
> +# Author: Antonin Godard <antonin.godard@bootlin.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +import argparse
> +import json
> +
> +from pathlib import Path
> +from urllib.request import urlopen
> +
> +
> +def main():
> +
> +    parser = argparse.ArgumentParser(description="Fetch and format releases.json")
> +    parser.add_argument("output", type=Path, help="Output releases.json file")
> +    args = parser.parse_args()
> +
> +    with urlopen("https://dashboard.yoctoproject.org/releases.json") as req:
> +        releases = json.load(req)
> +        with open(args.output, "w") as f:
> +            json.dump(releases, f, indent=2)
> +

Why not updating 
https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/release-parser.py#n134 
to store with the proper indent already?

json.dumps(data, indent=2)

Then you don't need each consumer to add the indent.

Or even better... why do you even care about a reviewable diff? The diff 
doesn't matter, it's the file itself that does.

b4 shazam the patch, run the script locally/download the file, check 
that your git tree is unchanged, merge the patch?

Or even betterer like I mentioned at the beginning of the mail, don't 
even version this file to begin with.

Cheers,
Quentin


  parent reply	other threads:[~2026-02-27 10:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 14:00 [PATCH v2 0/3] set_versions.py: build with versions from releases.json Antonin Godard
2026-02-26 14:00 ` [PATCH v2 1/3] tools/fetch-releases-json: add to fetch and format releases.json Antonin Godard
2026-02-26 15:37   ` Antonin Godard
2026-02-27 10:26   ` Quentin Schulz [this message]
2026-03-03 13:14     ` [docs] " Antonin Godard
2026-03-03 14:48       ` Quentin Schulz
2026-03-03 15:04         ` Antonin Godard
2026-02-26 14:00 ` [PATCH v2 2/3] set_versions.py: build with versions from releases.json Antonin Godard
2026-02-26 14:00 ` [PATCH v2 3/3] set_versions.py: make it possible to use a different releases.json file Antonin Godard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38678bef-ba8f-4181-85f4-c367c3f6dc29@cherry.de \
    --to=quentin.schulz@cherry.de \
    --cc=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox