GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support for locally hosted GHES instances to reduce rate limiting by C1ARKGABLE · Pull Request #720 · actions/setup-python

Conversation

@C1ARKGABLE

@C1ARKGABLE C1ARKGABLE commented Aug 23, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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:
#683
#638
#666
#316

#443 (comment)

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:

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bhundven, andrewsomething, and bob-bins reacted with thumbs up emoji pharindoko reacted with heart emoji
All reactions
  • 👍 3 reactions
  • ❤️ 1 reaction
Gable Gable
Add support for locally hosted GHES instances to reduce rate limiting
b82c468
@C1ARKGABLE
C1ARKGABLE requested a review from a team as a code owner August 23, 2023 22:37
@C1ARKGABLE

C1ARKGABLE commented Aug 23, 2023

Copy link
Copy Markdown
Author

Guidance + suggestions are welcome!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@C1ARKGABLE
Get from inputs
3910d26
@C1ARKGABLE
C1ARKGABLE force-pushed the rate_limit branch from 33b9032 to 2ae5c28 Compare August 24, 2023 07:24
Gable Gable
npm run build
17f8fc0
@C1ARKGABLE
C1ARKGABLE force-pushed the rate_limit branch from 2ae5c28 to 17f8fc0 Compare August 24, 2023 07:24
Gable Gable
typo removed repos
23e715c
@bhundven

bhundven commented Sep 29, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jhaxon
jhaxon reviewed Oct 9, 2023
View reviewed changes
Comment thread dist/setup/index.js
}
exports.findAllVersions = findAllVersions;
function getManifestFromRepo(owner, repo, auth, branch = 'master') {
function getManifestFromRepo(owner, repo, auth, branch = 'master', serverUrl = 'https://api.github.com') {

@jhaxon jhaxon Oct 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

getManifestFromRepo() is a function from a library imported at the top of src/install-python.ts. The code here in dist/* is generated from that library at compile time, so your changes will be overwritten.

For reference, here is the source of the library function. If you truly intend to reuse the library function you'll first need to merge a PR changing its signature here.

In order for this PR to work you need to limit your changes to the src/*.ts files.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

C1ARKGABLE reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
jhaxon
jhaxon reviewed Oct 9, 2023
View reviewed changes
Comment thread src/install-python.ts
const MANIFEST_REPO_BRANCH = 'main';
export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`;
const API_URL = core.getInput('github_api_url');
const GITHUB_API_URL = API_URL ? 'https://api.github.com' : API_URL;

@jhaxon jhaxon Oct 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

truthy and falsey expressions are backwards here, should be API_URL ? API_URL : ...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

C1ARKGABLE reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@C1ARKGABLE C1ARKGABLE Oct 10, 2023

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good catch

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jhaxon jhaxon Oct 10, 2023

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The unit tests caught this! ;)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jhaxon
jhaxon reviewed Oct 9, 2023
View reviewed changes
Comment thread src/install-python.ts
const API_URL = core.getInput('github_api_url');
const GITHUB_API_URL = API_URL ? 'https://api.github.com' : API_URL;
const RAW_URL = core.getInput('github_raw_url');
const GITHUB_RAW_URL = RAW_URL ? 'https://raw.githubusercontent.com' : RAW_URL;

@jhaxon jhaxon Oct 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

truthy and falsey expressions are backwards here, should be RAW_URL ? RAW_URL : ...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

C1ARKGABLE reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@jhaxon

jhaxon commented Oct 10, 2023

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@C1ARKGABLE
C1ARKGABLE marked this pull request as draft October 10, 2023 23:17
@C1ARKGABLE

C1ARKGABLE commented Oct 10, 2023

Copy link
Copy Markdown
Author

Converted to a draft until I can work on this further

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Shegox Shegox mentioned this pull request Oct 31, 2023
Enhance setup-python Action in GitHub Enterprise Server with Raw API Fallback Mechanism #756
Closed
@v-priyagupta108

v-priyagupta108 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@C1ARKGABLE,
Thanks for the PR! We’ve since merged and released #766, which addressed the GHES rate-limiting problem via the raw-URL fallback.
Could you clarify whether there’s still a gap or issue that this PR would address?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@v-priya-kinthali

v-priya-kinthali commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Hello @C1ARKGABLE 👋, As we didn't hear back on whether there's a remaining gap this PR would still cover, and given that the underlying problem is now resolved on main, we're going to close this PR. Thanks again for your contribution!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@v-priya-kinthali v-priya-kinthali closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@jhaxon jhaxon jhaxon left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@C1ARKGABLE @bhundven @jhaxon @v-priyagupta108 @v-priya-kinthali
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.