Navigation Menu

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

Pass the token input through on GHES for Microsoft Build of OpenJDK #395

Conversation

dmitry-shibanov
Copy link
Contributor

Description:
In scope of this pull request we fix issue with passing token to download manifest.

Related issue:
https://github.com/actions/runner-images-internal/issues/4479

Check list:

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

@dmitry-shibanov dmitry-shibanov requested a review from a team October 17, 2022 11:05
java-version: '11'
```

If the runner is not able to access github.com, any Go versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If the runner is not able to access github.com, any Go versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.
If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information.

@@ -80,6 +80,22 @@ steps:
- run: java -cp java HelloWorldApp
```

### Using Microsoft distribution on GHES

`setup-java` comes pre-installed on the appliance with GHES if Actions is enabled. When dynamically downloading Microsoft Build of OpenJDK distribution, `setup-java` makes request to `actions/setup-java` to get available versions on github.com (outside of the appliance). These calls to `actions/setup-java` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then you will start to see rate-limit errors during downloading that looks like: `##[error]API rate limit exceeded for...`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`setup-java` comes pre-installed on the appliance with GHES if Actions is enabled. When dynamically downloading Microsoft Build of OpenJDK distribution, `setup-java` makes request to `actions/setup-java` to get available versions on github.com (outside of the appliance). These calls to `actions/setup-java` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then you will start to see rate-limit errors during downloading that looks like: `##[error]API rate limit exceeded for...`.
`setup-java` comes pre-installed on the appliance with GHES if Actions is enabled. When dynamically downloading the Microsoft Build of OpenJDK distribution, `setup-java` makes a request to `actions/setup-java` to get available versions on github.com (outside of the appliance). These calls to `actions/setup-java` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then you will start to see rate-limit errors during downloading that looks like: `##[error]API rate limit exceeded for...`.

action.yml Outdated
@@ -59,8 +59,8 @@ inputs:
description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting'
default: ${{ job.status }}
token:
description: Used to pull java versions from setup-java. Since there is a default value, token is typically not supplied by the user.
default: ${{ github.token }}
description: Used to pull java versions from setup-java. Since there is a default value, token is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: Used to pull java versions from setup-java. Since there is a default value, token is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
description: The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dmitry-shibanov dmitry-shibanov merged commit bf2f02c into actions:main Nov 18, 2022
Yash-Garg pushed a commit to Yash-Garg/qBittorrent-Manager that referenced this pull request Dec 1, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-java](https://togithub.com/actions/setup-java) | action
| minor | `v3.6.0` -> `v3.7.0` |

---

### Release Notes

<details>
<summary>actions/setup-java</summary>

###
[`v3.7.0`](https://togithub.com/actions/setup-java/releases/tag/v3.7.0)

[Compare
Source](https://togithub.com/actions/setup-java/compare/v3.6.0...v3.7.0)

In scope of this release we added support for Oracle JDK
([actions/setup-java#401).
Besides, we added logic to Pass the token input through on GHES for
Microsoft Build of OpenJDK
([actions/setup-java#395)
and updated
[minimatch](https://togithub.com/actions/setup-java/pull/413)
dependency.

```yaml
steps:
  - name: Checkout
    uses: actions/checkout@v3
  - name: Setup-java
    uses: actions/setup-java@v3
    with:
      distribution: oracle
      java-version: 17
```

##### Supported distributions

Currently, the following distributions are supported:

| Keyword | Distribution | Official site | License
|-|-|-|-|
| `temurin` | Eclipse Temurin | [Link](https://adoptium.net/) |
[Link](https://adoptium.net/about.html)
| `zulu` | Azul Zulu OpenJDK |
[Link](https://www.azul.com/downloads/zulu-community/?package=jdk) |
[Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/)
|
| `adopt` or `adopt-hotspot` | AdoptOpenJDK Hotspot |
[Link](https://adoptopenjdk.net/) |
[Link](https://adoptopenjdk.net/about.html) |
| `adopt-openj9` | AdoptOpenJDK OpenJ9 |
[Link](https://adoptopenjdk.net/) |
[Link](https://adoptopenjdk.net/about.html) |
| `liberica` | Liberica JDK | [Link](https://bell-sw.com/) |
[Link](https://bell-sw.com/liberica_eula/) |
| `microsoft` | Microsoft Build of OpenJDK |
[Link](https://www.microsoft.com/openjdk) |
[Link](https://docs.microsoft.com/java/openjdk/faq)
| `corretto` | Amazon Corretto Build of OpenJDK |
[Link](https://aws.amazon.com/corretto/) |
[Link](https://aws.amazon.com/corretto/faqs/)
| `oracle` | Oracle JDK |
[Link](https://www.oracle.com/java/technologies/downloads/) |
[Link](https://java.com/freeuselicense)

</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://app.renovatebot.com/dashboard#github/Yash-Garg/qBittorrent-Manager).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC40NC4wIiwidXBkYXRlZEluVmVyIjoiMzQuNDQuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
hankem added a commit to TNG/ArchUnit that referenced this pull request Dec 9, 2022
Bumps [actions/setup-java](https://github.com/actions/setup-java) from
3.6.0 to 3.8.0.

from [actions/setup-java's releases](https://github.com/actions/setup-java/releases):

> # v3.8.0
> 
> In scope of this release we added logic to pass the token input through on GHES for Microsoft Build of OpenJDK ([actions/setup-java#395](https://github-redirect.dependabot.com/actions/setup-java/pull/395)) and updated [minimatch](https://github-redirect.dependabot.com/actions/setup-java/pull/413) dependency.

Commits

*   [`c3ac5dd`](actions/setup-java@c3ac5dd) Revert "Add support for Oracle JDK ([#401](https://github-redirect.dependabot.com/actions/setup-java/issues/401))" ([#421](https://github-redirect.dependabot.com/actions/setup-java/issues/421))
*   [`dcd29da`](actions/setup-java@dcd29da) Fix typo in README.md ([#419](https://github-redirect.dependabot.com/actions/setup-java/issues/419))
*   [`19eeec5`](actions/setup-java@19eeec5) Update to latest `actions/publish-action` ([#411](https://github-redirect.dependabot.com/actions/setup-java/issues/411))
*   [`bd7e5d2`](actions/setup-java@bd7e5d2) Update minimatch to 3.1.2 ([#413](https://github-redirect.dependabot.com/actions/setup-java/issues/413))
*   [`6cdf39a`](actions/setup-java@6cdf39a) Add support for Oracle JDK ([#401](https://github-redirect.dependabot.com/actions/setup-java/issues/401))
*   [`7db6b45`](actions/setup-java@7db6b45) Eclipse Temurin instead of Adopt OpenJDK ([#398](https://github-redirect.dependabot.com/actions/setup-java/issues/398))
*   [`bf2f02c`](actions/setup-java@bf2f02c) Pass the token input through on GHES for Microsoft Build of OpenJDK ([#395](https://github-redirect.dependabot.com/actions/setup-java/issues/395))
*   See full diff in [compare view](actions/setup-java@v3.6.0...v3.8.0)
yeikel pushed a commit to yeikel/setup-java that referenced this pull request Feb 12, 2023
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.

None yet

5 participants