Title: `setup-python` silently exits 0 when GitHub returns a truncated `versions-manifest.json` · Issue #1318 · actions/setup-python · GitHub
Open Graph Title: `setup-python` silently exits 0 when GitHub returns a truncated `versions-manifest.json` · Issue #1318 · actions/setup-python
X Title: `setup-python` silently exits 0 when GitHub returns a truncated `versions-manifest.json` · Issue #1318 · actions/setup-python
Description: Description: When actions/setup-python fetches versions-manifest.json from actions/python-versions and GitHub's API returns a truncated body, the action parses it as an empty release list and exits 0 without installing Python. The step i...
Open Graph Description: Description: When actions/setup-python fetches versions-manifest.json from actions/python-versions and GitHub's API returns a truncated body, the action parses it as an empty release list and exits...
X Description: Description: When actions/setup-python fetches versions-manifest.json from actions/python-versions and GitHub's API returns a truncated body, the action parses it as an empty release list and e...
Opengraph URL: https://github.com/actions/setup-python/issues/1318
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`setup-python` silently exits 0 when GitHub returns a truncated `versions-manifest.json`","articleBody":"**Description:**\nWhen `actions/setup-python` fetches `versions-manifest.json` from `actions/python-versions` and GitHub's API returns a truncated body, the action parses it as an empty release list and **exits 0 without installing Python**. The step is reported successful, and subsequent job steps run against whatever `python` happens to be on `PATH` (if any) - which makes the real cause harder to find.\n\n**Action version:**\nv6.2.0 (also affects earlier versions - the manifest-fetch logic is unchanged regarding such edge cases).\n\n**Platform:**\n- [x] Ubuntu\n- [x] macOS\n- [x] Windows\n\n**Runner type:**\n- [x] Hosted\n- [x] Self-hosted\n\n**Tools version:**\nAll Python versions - the failure is in the manifest fetch, before any version-specific logic runs.\n\n**Repro steps:**\nHard to reproduce on demand now that the upstream GitHub-side issue appears to be resolved, but here is what I saw last week:\n\n1. The action fetches the manifest in two calls:\n - `GET https://api.github.com/repos/actions/python-versions/git/trees/main` to find the blob URL for `versions-manifest.json`.\n - `GET \u003cthat blob URL\u003e` with `Accept: application/vnd.github.VERSION.raw` to get the manifest body.\n2. Sporadically, the second call returned a **truncated body** - HTTP 200, but the JSON was cut off mid-object and unparseable. **I captured 3 separate examples (attached - please see them at the bottom).**\n3. Two odd characteristics of the bad responses:\n - A **~30 second server-side delay** before any bytes came back.\n - Only reproduced on **authenticated** requests. Anonymous requests always returned the full manifest - but the 60 req/hour anon limit is too low for real CI use (authenticated is 5000/hour).\n\n**Expected behavior:**\nIf the manifest body is empty, truncated, or not a valid releases array, the action should **fail loudly** (**ideally after a few retries with backoff**), not exit 0 without installing Python. Suggested fix:\n\n1. After fetching, validate that the body parses as JSON **and** is a non-empty array of releases.\n2. Retry with backoff on failure - these truncations were intermittent and a retry would almost certainly succeed.\n3. If retries are exhausted, `core.setFailed()` with a clear \"manifest fetch/parse failed\" message.\n\n**Actual behavior:**\nA truncated manifest response is silently swallowed: it does not install Python, and exits 0. The job continues against the system `python` (or fails much later in a confusing way), and there is no signal in the `setup-python` step that anything went wrong.\n```\n* Installed versions\n ##[debug]Semantic version spec of 3.11 - 3.13 is 3.11 - 3.13\n ##[debug]isExplicit: \n ##[debug]explicit? false\n ##[debug]evaluating 0 versions\n ##[debug]match not found\n Version 3.11 - 3.13 was not found in the local cache\n ##[debug]Getting manifest from actions/python-versions@main\n ##[debug]set auth\n ##[debug]Node Action run completed with exit code 0\n ##[debug]Finishing: Setup python\n```\n\n**Captured truncated `versions-manifest.json` from last week:**\n[20260522T135554Z-manifest.json](https://github.com/user-attachments/files/28303804/20260522T135554Z-manifest.json)\n[20260522T134810Z-manifest.json](https://github.com/user-attachments/files/28303802/20260522T134810Z-manifest.json)\n[20260522T125459Z-manifest.json](https://github.com/user-attachments/files/28303803/20260522T125459Z-manifest.json)","author":{"url":"https://github.com/zdravko-axelera","@type":"Person","name":"zdravko-axelera"},"datePublished":"2026-05-27T10:24:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1318/setup-python/issues/1318"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cf747394-c1b7-ac0f-96db-ee5fbc502050 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A532:EB829:E1C8CA:136DE99:6A625901 |
| html-safe-nonce | 1997d30c9aca3d157f377f2946a3fb2df8096eb8f582ce8935dcaf90a4b81660 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTMyOkVCODI5OkUxQzhDQToxMzZERTk5OjZBNjI1OTAxIiwidmlzaXRvcl9pZCI6IjMzMzE0MjU0NjAwODEzNTkzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5744607274cbca440351ab143a3deb754c202fa4e8d79b48c089292a660f1984 |
| hovercard-subject-tag | issue:4531578849 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-python/1318/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cc4b9d2e1ed470fe48bf3639e5b38d4964f856b0dca81af0bd45d1e6e6ec2dd3/actions/setup-python/issues/1318 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cc4b9d2e1ed470fe48bf3639e5b38d4964f856b0dca81af0bd45d1e6e6ec2dd3/actions/setup-python/issues/1318 |
| og:image:alt | Description: When actions/setup-python fetches versions-manifest.json from actions/python-versions and GitHub's API returns a truncated body, the action parses it as an empty release list and exits... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zdravko-axelera |
| hostname | github.com |
| expected-hostname | github.com |
| None | b928dd27bb9305f313c737471c216297e218430ec505d064cf33d7d74af9bf89 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-python git https://github.com/actions/setup-python.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 192625525 |
| octolytics-dimension-repository_nwo | actions/setup-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 192625525 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6f728c3f39985ee4d171ffdd5591d8d2652392d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width