setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Add support for locally hosted GHES instances to reduce rate limiting

Open C1ARKGABLE opened this issue 2 years ago • 4 comments

Description: Rate limiting, while necessary, can be frustrating to deal with. The work around is not always a viable solution. No company wants to rely solely on a single employee's GitHub.com PAT for significant internal projects. This attempts to resolve rate limiting errors by allowing users to internally host a copy of actions/python-versions and specify their GHES api endpoint instead of the GitHub.com endpoint being hardcoded.

##[error]API rate limit exceeded for YOUR_IP. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Related issue: https://github.com/actions/setup-python/issues/683 https://github.com/actions/setup-python/issues/638 https://github.com/actions/setup-python/issues/666 https://github.com/actions/setup-python/pull/316

https://github.com/actions/setup-python/pull/443#issuecomment-1206776401

https://docs.github.com/en/enterprise-server/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access

Check list:

  • [x] Mark if documentation changes are required.
  • [ ] Mark if tests were added or updated to cover the changes.

C1ARKGABLE avatar Aug 23 '23 22:08 C1ARKGABLE

Guidance + suggestions are welcome!

C1ARKGABLE avatar Aug 23 '23 23:08 C1ARKGABLE

@e-korolevskii @dmitry-shibanov This also affects a GHE instance I use.

bhundven avatar Sep 29 '23 21:09 bhundven

Without any changes to installCpythonFromRelease the action will download the release from github.com. Further work is needed here.

jhaxon avatar Oct 10 '23 21:10 jhaxon

Converted to a draft until I can work on this further

C1ARKGABLE avatar Oct 10 '23 23:10 C1ARKGABLE