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

feat: fallback to "raw" endpoint for manifest when rate limit is reached #766

Merged
merged 2 commits into from Mar 26, 2024

Conversation

Shegox
Copy link
Contributor

@Shegox Shegox commented Nov 15, 2023

Description:
This PR leverages the raw endpoint (https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json) to retrieve the python manifest as a fallback mechanism. This allows GitHub Actions Runners, which have no API token and exceed the anonymous rate limit of 60 requests/hour/IP to still retrieve the manifest list without needing credentials.
This is especially helpful for GitHub Enterprise Server and self-hosted runners, as there multiple runners might share the same IP-address and quickly exceed the available rate limit. Supplying an access token for github.com is cumbersome, as it requires another technical user and the secret isn't exposed to forks, preventing builds from forks.
The implementation as a fallback mechanism minimizes the risk of breaking current workflows, as they will still use the normal API to retrieve the manifest.

Related issue:
Fixes #756

Check list:

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

Copy link

@winlover32 winlover32 left a comment

Choose a reason for hiding this comment

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

chek

@HarithaVattikuti HarithaVattikuti merged commit 10aa35a into actions:main Mar 26, 2024
240 checks passed
lambchop4prez added a commit to lambchop4prez/network that referenced this pull request Apr 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-python](https://togithub.com/actions/setup-python) |
action | major | `v4.7.0` -> `v5.1.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

###
[`v5.1.0`](https://togithub.com/actions/setup-python/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v5.0.0...v5.1.0)

#### What's Changed

- Leveraging the raw API to retrieve the version-manifest, as it does
not impose a rate limit and hence facilitates unrestricted consumption
without the need for a token for Github Enterprise Servers by
[@&#8203;Shegox](https://togithub.com/Shegox) in
[actions/setup-python#766.
- Dependency updates by
[@&#8203;dependabot](https://togithub.com/dependabot) and
[@&#8203;HarithaVattikuti](https://togithub.com/HarithaVattikuti) in
[actions/setup-python#817
- Documentation changes for version in README by
[@&#8203;basnijholt](https://togithub.com/basnijholt) in
[actions/setup-python#776
- Documentation changes for link in README by
[@&#8203;ukd1](https://togithub.com/ukd1) in
[actions/setup-python#793
- Documentation changes for link in Advanced Usage by
[@&#8203;Jamim](https://togithub.com/Jamim) in
[actions/setup-python#782
- Documentation changes for avoiding rate limit issues on GHES by
[@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) in
[actions/setup-python#835

#### New Contributors

- [@&#8203;basnijholt](https://togithub.com/basnijholt) made their first
contribution in
[actions/setup-python#776
- [@&#8203;ukd1](https://togithub.com/ukd1) made their first
contribution in
[actions/setup-python#793
- [@&#8203;Jamim](https://togithub.com/Jamim) made their first
contribution in
[actions/setup-python#782
- [@&#8203;Shegox](https://togithub.com/Shegox) made their first
contribution in
[actions/setup-python#766
- [@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) made
their first contribution in
[actions/setup-python#835

**Full Changelog**:
actions/setup-python@v5.0.0...v5.1.0

###
[`v5.0.0`](https://togithub.com/actions/setup-python/releases/tag/v5.0.0)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v4.8.0...v5.0.0)

#### What's Changed

In scope of this release, we update node version runtime from node16 to
node20
([actions/setup-python#772).
Besides, we update dependencies to the latest versions.

**Full Changelog**:
actions/setup-python@v4.8.0...v5.0.0

###
[`v4.8.0`](https://togithub.com/actions/setup-python/releases/tag/v4.8.0)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v4.7.1...v4.8.0)

#### What's Changed

In scope of this release we added support for GraalPy
([actions/setup-python#694).
You can use this snippet to set up GraalPy:

```yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4 
  with:
    python-version: 'graalpy-22.3' 
- run: python my_script.py
```

Besides, the release contains such changes as:

- Trim python version when reading from file by
[@&#8203;FerranPares](https://togithub.com/FerranPares) in
[actions/setup-python#628
- Use non-deprecated versions in examples by
[@&#8203;jeffwidman](https://togithub.com/jeffwidman) in
[actions/setup-python#724
- Change deprecation comment to past tense by
[@&#8203;jeffwidman](https://togithub.com/jeffwidman) in
[actions/setup-python#723
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.9.0 to 7.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[actions/setup-python#743
- advanced-usage.md: Encourage the use actions/checkout@v4 by
[@&#8203;cclauss](https://togithub.com/cclauss) in
[actions/setup-python#729
- Examples now use checkout@v4 by
[@&#8203;simonw](https://togithub.com/simonw) in
[actions/setup-python#738
- Update actions/checkout to v4 by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-python#761

#### New Contributors

- [@&#8203;FerranPares](https://togithub.com/FerranPares) made their
first contribution in
[actions/setup-python#628
- [@&#8203;timfel](https://togithub.com/timfel) made their first
contribution in
[actions/setup-python#694
- [@&#8203;jeffwidman](https://togithub.com/jeffwidman) made their first
contribution in
[actions/setup-python#724

**Full Changelog**:
actions/setup-python@v4...v4.8.0

###
[`v4.7.1`](https://togithub.com/actions/setup-python/releases/tag/v4.7.1)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v4.7.0...v4.7.1)

#### What's Changed

- Bump word-wrap from 1.2.3 to 1.2.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[actions/setup-python#702
- Add range validation for toml files by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-python#726

**Full Changelog**:
actions/setup-python@v4...v4.7.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/lambchop4prez/network).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
welpaolo pushed a commit to canonical/spark-k8s-toolkit-py that referenced this pull request Apr 8, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-python](https://togithub.com/actions/setup-python) |
action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

###
[`v5.1.0`](https://togithub.com/actions/setup-python/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v5.0.0...v5.1.0)

#### What's Changed

- Leveraging the raw API to retrieve the version-manifest, as it does
not impose a rate limit and hence facilitates unrestricted consumption
without the need for a token for Github Enterprise Servers by
[@&#8203;Shegox](https://togithub.com/Shegox) in
[actions/setup-python#766.
- Dependency updates by
[@&#8203;dependabot](https://togithub.com/dependabot) and
[@&#8203;HarithaVattikuti](https://togithub.com/HarithaVattikuti) in
[actions/setup-python#817
- Documentation changes for version in README by
[@&#8203;basnijholt](https://togithub.com/basnijholt) in
[actions/setup-python#776
- Documentation changes for link in README by
[@&#8203;ukd1](https://togithub.com/ukd1) in
[actions/setup-python#793
- Documentation changes for link in Advanced Usage by
[@&#8203;Jamim](https://togithub.com/Jamim) in
[actions/setup-python#782
- Documentation changes for avoiding rate limit issues on GHES by
[@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) in
[actions/setup-python#835

#### New Contributors

- [@&#8203;basnijholt](https://togithub.com/basnijholt) made their first
contribution in
[actions/setup-python#776
- [@&#8203;ukd1](https://togithub.com/ukd1) made their first
contribution in
[actions/setup-python#793
- [@&#8203;Jamim](https://togithub.com/Jamim) made their first
contribution in
[actions/setup-python#782
- [@&#8203;Shegox](https://togithub.com/Shegox) made their first
contribution in
[actions/setup-python#766
- [@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) made
their first contribution in
[actions/setup-python#835

**Full Changelog**:
actions/setup-python@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 1am and before 2am on saturday"
in timezone Etc/UTC, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/canonical/spark-k8s-toolkit-py).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Kislovskiy added a commit to Kislovskiy/talks that referenced this pull request Apr 9, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-python](https://togithub.com/actions/setup-python) |
action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

###
[`v5.1.0`](https://togithub.com/actions/setup-python/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/actions/setup-python/compare/v5.0.0...v5.1.0)

#### What's Changed

- Leveraging the raw API to retrieve the version-manifest, as it does
not impose a rate limit and hence facilitates unrestricted consumption
without the need for a token for Github Enterprise Servers by
[@&#8203;Shegox](https://togithub.com/Shegox) in
[actions/setup-python#766.
- Dependency updates by
[@&#8203;dependabot](https://togithub.com/dependabot) and
[@&#8203;HarithaVattikuti](https://togithub.com/HarithaVattikuti) in
[actions/setup-python#817
- Documentation changes for version in README by
[@&#8203;basnijholt](https://togithub.com/basnijholt) in
[actions/setup-python#776
- Documentation changes for link in README by
[@&#8203;ukd1](https://togithub.com/ukd1) in
[actions/setup-python#793
- Documentation changes for link in Advanced Usage by
[@&#8203;Jamim](https://togithub.com/Jamim) in
[actions/setup-python#782
- Documentation changes for avoiding rate limit issues on GHES by
[@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) in
[actions/setup-python#835

#### New Contributors

- [@&#8203;basnijholt](https://togithub.com/basnijholt) made their first
contribution in
[actions/setup-python#776
- [@&#8203;ukd1](https://togithub.com/ukd1) made their first
contribution in
[actions/setup-python#793
- [@&#8203;Jamim](https://togithub.com/Jamim) made their first
contribution in
[actions/setup-python#782
- [@&#8203;Shegox](https://togithub.com/Shegox) made their first
contribution in
[actions/setup-python#766
- [@&#8203;priya-kinthali](https://togithub.com/priya-kinthali) made
their first contribution in
[actions/setup-python#835

**Full Changelog**:
actions/setup-python@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Kislovskiy/talks).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
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.

Enhance setup-python Action in GitHub Enterprise Server with Raw API Fallback Mechanism
5 participants