Conversation
package.json
Outdated
| { | ||
| "name": "setup-java", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", |
There was a problem hiding this comment.
I think we need to update the version according to the next release version.
There was a problem hiding this comment.
yes, we are planning to release after this PR merge
There was a problem hiding this comment.
Could you please change version 2.0.1 to the planing one ?
There was a problem hiding this comment.
@dmitry-shibanov , please share planned version
src/util.ts
Outdated
| ); | ||
| } else { | ||
| core.warning( | ||
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' |
There was a problem hiding this comment.
Is this message accurate? It looks like cache.isFeatureAvailable() just looks for whether an environment variable is set.
There was a problem hiding this comment.
If my understanding is correct, I would say something like
| 'An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.' | |
| 'This runner is not configured to use the cache service. Caching will be skipped.' |
src/util.ts
Outdated
| ); | ||
| } else { | ||
| core.warning( | ||
| 'This runner is not configured to use the cache service. Caching will be skipped' |
There was a problem hiding this comment.
Can we update to the same thing from actions/setup-python#363?
| 'This runner is not configured to use the cache service. Caching will be skipped' | |
| 'The runner was not able to contact the cache service. Caching will be skipped' |
There was a problem hiding this comment.
Updated with correct message
|
Looks like a test is failing: https://github.com/actions/setup-java/runs/5769289844?check_suite_focus=true#step:7:461 |
Yes this is failing on master as well #309 https://github.com/actions/setup-java/runs/5773757120?check_suite_focus=true#step:7:404 Update: |
* initial changes * review comments * updated with correct message * linting * update version * updated version
Description:

This PR adds caching support in setup-java for GHES with version 3.5. It checks the presence of the Actions cache service(which is used for caching dependencies in GHES and dotcom) using the recent @actions/cache toolkit package function i.e isFeatureAvailable. This same function can be applied to dotcom scenario (github.com) so this function can be safely applied to dotcom scenario as well.
I have tested the below scenarios
on GHES
Current behaviour
With new changes. Without AC on GHES

With AC on GHES


save
restore
without choosing the cache option on GHES with AC

On dotcom
save

cache hit

without cache option

Related issue:
#307
Check list: