indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.71k stars 107 forks source link

Publish release index on github pages to avoid api limits #637 #138

Closed konstin closed 1 year ago

konstin commented 1 year ago

I'm using the standalone python builds in my code (and it's a pleasure to use), where i try to pick the latest matching cpython build for the users platform and python version from the releases page. However in github action i occasionally get a "https://api.github.com/repos/indygreg/python-build-standalone/releases/latest: status code 403", i think because i hit some github api limit. Would it be possible to publish the PyOxy release index somewhere else, e.g. as json file(s) on github pages? This would imho be nicer than hardcoding releases and thereby getting outdated cpython minor versions

indygreg commented 1 year ago

Thanks for the report.

I was thinking that we could publish an e.g. artifacts.json in the release artifacts to provide a well-known URL describing each release. But I guess you still have the problem of needing to look up what the most recent release is.

I'd strongly prefer for any solution here to be hosted by GitHub, as I want GitHub to eat the network egress costs :)

Let me think about potential solutions...

indygreg commented 1 year ago

I think I implemented a working solution. Please see the referenced commit in this issue's timeline for details. Feel free to reopen if this is not a sufficient solution.

konstin commented 1 year ago

unfortunately, that doesn't solve the problem: i still have to call https://github.com/indygreg/python-build-standalone/releases/tag/20221002 (or its api equivalent) and github will 403 if i do that too often. What i'd need would be something like

{
    "release": "2022-10-02",
    "files": [
         "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7+20221002-aarch64-apple-darwin-debug-full.tar.zst",
         "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7+20221002-aarch64-apple-darwin-install_only.tar.gz",
         [...]
    ]
}

I'd strongly prefer for any solution here to be hosted by GitHub, as I want GitHub to eat the network egress costs :)

putting the most recent release with its files and the index json on github pages might also help. probably from a separate repo though so the git clone doesn't become very slow