Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Support PAT to avoid "API rate limit exceeded" #167997

Closed
2 tasks done
Dragon1573 opened this issue Aug 16, 2024 · 1 comment · Fixed by #168384
Closed
2 tasks done

[Feature Request]: Support PAT to avoid "API rate limit exceeded" #167997

Dragon1573 opened this issue Aug 16, 2024 · 1 comment · Fixed by #168384
Labels
In-PR Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.

Comments

@Dragon1573
Copy link
Contributor

Dragon1573 commented Aug 16, 2024

Description of the new feature/enhancement

I'm currently using Tools/SandboxTest.ps1 for testing manifests locally. Sometimes I will trigger an error as follows.

Note

Real IP address is masked for privacy. Just use 127.0.0.1 as a placeholder.

Invoke-RestMethod: C:\Repository\winget-pkgs\Tools\SandboxTest.ps1:86:26
Line |
  86 |  … IResponse = Invoke-RestMethod 'https://api.github.com/repos/microsoft …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |  {   "message": "API rate limit exceeded for 127.0.0.1. (But here\u0027s the good news: Authenticated requests get a higher rate limit. Check out the documentation
     | for more details.)",   "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting" }

Proposed technical implementation details (optional)

Upgrade Tools/SandboxTest.ps1 and other Powershell scripts, so they can support loading PAT from environment variables or Windows Credential Manager. PAT authentication can get grant higher rate limitations for developers and avoid seeing this "limit exceeded" error.

Tasks

  1. Project-File
    Dragon1573 stephengillie
  2. Moderator-Approved Project-File
    Trenly stephengillie
@Dragon1573 Dragon1573 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Aug 16, 2024
@stephengillie
Copy link
Collaborator

This is one of the many reasons that I use Hyper-V VMs instead of the sandbox. Another is that I can run multiple VMs side-by-side, but can only run 1 sandbox at a time. The sandbox seems like it should be useful, but is missing key pieces (including the PAT credential loading suggested by this issue) needed to be compelling solution.

@stephengillie stephengillie removed the Needs-Triage This work item needs to be triaged by a member of the core team. label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Projects
None yet
2 participants