Skip to content

fix: read oversized uv.lock files through the git blobs API - #758

Open
feanil wants to merge 4 commits into
masterfrom
feanil/large-uv-lock-blob-api
Open

feanil wants to merge 4 commits into
masterfrom
feanil/large-uv-lock-blob-api

Conversation

@feanil

@feanil feanil commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

openedx-platform's uv.lock is 1089565 bytes, and GitHub's contents API only carries file bodies up to 1MB. Above that it returns encoding: "none" with an empty body, so decoded_content raises AssertionError: unsupported encoding: none and _parse_uv dies. The weekly upgrade job has failed there since 2026-09-15. The PR still gets created, but the package comparison, the summary comment and the Ready to Merge label don't happen.

_get_file_contents now resolves the path in the git tree and reads the blob. The blobs API handles any size up to 100MB.

Tested by running pull_request_creator against openedx-platform with the real upgrade diff. It got through the failing step and posted the package comparison on openedx-platform#39138, since closed.

Version bumped to 4.1.1 so this reaches repos through PyPI.

Failing run: https://github.com/openedx/openedx-platform/actions/runs/35679465605/job/106593046814

feanil and others added 4 commits September 22, 2026 10:26
GitHub's contents API only carries the body of files up to 1MB. Above
that the response comes back with `encoding: "none"` and an empty body,
and PyGithub's `decoded_content` raises
`AssertionError: unsupported encoding: none`.

openedx-platform's `uv.lock` crossed that limit on 2026-09-14, going
from 1043933 to 1089564 bytes, and the weekly upgrade job has failed on
it every run since. The PR still gets created and the reviewers tagged,
because the crash is in `verify_upgrade_packages` which runs after that,
but the package comparison, the summary comments and the
`Ready to Merge` label never happen and the job goes red.

Read any file that comes back oversized through the git blobs API
instead, which serves base64 up to 100MB.

https://github.com/openedx/openedx-platform/actions/runs/35679465605/job/106593046814

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The upgrade workflow installs `edx-repo-tools[pull_request_creator]`
from PyPI unpinned, so the uv.lock fix only reaches the repos that need
it once a release goes out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@irfanuddinahmad irfanuddinahmad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants