public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* Forbidden requests for kernel.org/releases.json
@ 2025-04-10  8:05 Daniel Gomez
  2025-04-10 10:30 ` Borislav Petkov
  2025-04-10 12:45 ` Konstantin Ryabitsev
  0 siblings, 2 replies; 23+ messages in thread
From: Daniel Gomez @ 2025-04-10  8:05 UTC (permalink / raw)
  To: users; +Cc: Luis Chamberlain, Chuck Lever, kdevops

We've started encountering "HTTP Error 403: Forbidden" errors in kdevops
when querying https://www.kernel.org/releases.json from our CI environments/
deployments. We're using a Python script with the urllib library to fetch the
latest kernel release information [1].

As a temporary workaround [2], we are testing a User-Agent header to mimic a
browser request. To solve this properly, we have the following questions:

* What is the recommended approach for automated tools to access
kernel.org/releases.json?

* Are there any rate limits we should be aware of?

* Would it be possible to serve releases.json from a CDN-backed subdomain to
reduce load on the main site? We could mirror the subdomain directory and
enable pointers for our datacenter network.

[1] https://github.com/linux-kdevops/kdevops/blob/main/scripts/generate_refs.py#L300
[2] add User-Agent headers to query kernel.org/releases.json:

diff --git a/scripts/generate_refs.py b/scripts/generate_refs.py
index 5171414..41011cf 100755
--- a/scripts/generate_refs.py
+++ b/scripts/generate_refs.py
@@ -302,7 +302,9 @@ def kreleases(args) -> None:

     reflist = []
     if _check_connection("kernel.org", 80):
-        with urllib.request.urlopen("https://www.kernel.org/releases.json") as url:
+        _url = "https://www.kernel.org/releases.json"
+        req = urllib.request.Request(_url, headers={"User-Agent": "Mozilla/5.0"})
+        with urllib.request.urlopen(req) as url:
             data = json.load(url)

             for release in data["releases"]:

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-10-14 16:10 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10  8:05 Forbidden requests for kernel.org/releases.json Daniel Gomez
2025-04-10 10:30 ` Borislav Petkov
2025-04-10 12:09   ` Daniel Gomez
2025-04-11 20:54   ` Konstantin Ryabitsev
2025-04-15  9:01     ` Borislav Petkov
2025-10-13 13:15       ` Borislav Petkov
2025-10-13 15:19         ` Theodore Ts'o
2025-10-14 16:10           ` Kees Cook
2025-04-10 12:45 ` Konstantin Ryabitsev
2025-04-11 14:18   ` Theodore Ts'o
2025-04-11 15:25     ` Konstantin Ryabitsev
2025-04-11 16:48       ` James Bottomley
2025-04-11 16:59         ` Laurent Pinchart
2025-04-11 17:00         ` Konstantin Ryabitsev
2025-04-11 17:13           ` James Bottomley
2025-04-11 20:38             ` Konstantin Ryabitsev
2025-04-12  2:19               ` Theodore Ts'o
2025-04-11 20:56           ` Luis Chamberlain
2025-04-11 21:04             ` Konstantin Ryabitsev
2025-04-11 23:37               ` Luis Chamberlain
2025-04-11 20:08         ` Jonathan Corbet
2025-04-11 17:09       ` Theodore Ts'o
2025-04-11 18:23   ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox