Comments (2)
Adding a check to see if the desired version is pre-installed could make sense,a nd may reduce traffic for many common cases (latest 8, 11, 13) for several weeks at a time. But it's important to keep in mind that java packages get updated quite frequently, and potentially more frequently than the OS images do, and that in the days or weeks immediately following a Java quarterly update, the OS-image-pre-installed java update versions is unlikely to match what e.g. "11", "8.0.x", "13", or "14" mean in semver terms: E.g. 7.0.262, 8.0.252, 11.0.7, 13.0.3, and 14.0.1 all came out on April 14, 2020, and they will all rev again on July 14 at the latest...
We could try to separate the specific version determination from the download of the determined bits. E.g. once the desired version has been determined (by scanning the CDN for semver-matching things and choosing one), we could see if the exact same package we want is already in /usr/ib/jvm, and skip the download if it is... This would certainly help reduce download bandwidth if the OS images get updated with versions from the same CDN in a timely manner, but will also likely leave traffic spikes in the days that follow each quarterly update, until the OS image catches up. It also has the downside of not addressing older versions (many tests like to nail down a specific update version to test against consistently) and rapidly changing versions (e.g. the EA builds that rev as often as once a week).
An alternative (and more time-robust approach IMO) is to look to incorporate actions/cache in some way. This would create much more consistent caching (which would work even in the days following a quarterly update, and even for rapidly changing packages like the current 15-ea packages), and would likely reduce the download traffic loads during peak times (right after updates) better than an attempt to sync up the contents of the OS images would. It would be great if action/cache was directly leverageable from other actions in some way. But until it is, we can either make direct use of the cache package in the toolkit.
from setup-java.
Hello everyone. We moved our precached java versions to /opt/hostedtoolcache/Java_Adopt_jdk
directory on hosted runners. Recently we released setup-java@v2
and new task version will be able to consume pre-installed java version. You can see migration guide from v1
to v2
here. If you have any concerns feel free to reopen the issue.
from setup-java.
Related Issues (20)
- Support a server for the dependency-check-plugin HOT 1
- `java-version-file` with `asdf`'s `.tool-versions` fails for Corretto, also non-strict semver versions HOT 5
- Proper way of using a Maven toolchain? HOT 10
- Need to update some @action/cache dependencies HOT 1
- GPG Key import successfully, but "No secret key" when maven deploy HOT 7
- Maven Failed to deploy artifacts: Could not find artifact "self" in github (https://maven.pkg.github.com/ORG/REPO) HOT 6
- `actions/setup-java` is flaky HOT 2
- Cache is reported as found and restored, but artifacts are still being downloaded HOT 4
- Can't install temurin java 8 for macos HOT 6
- java.lang.IllegalAccessError: superclass access check failed with `setup-java@v4` HOT 4
- `setup-java@v4` setup for sbt failing on macOS with `line 1: sbt: command not found` HOT 9
- Azul distribution support HOT 4
- GPG-Signing of maven artifacts fails on Windows runners with `actions/setup-java@v4` and `maven-gpg-plugin` `v3.2.4` HOT 6
- setup java: Would be nice if there was an option to set the locale via ability to pass system properties to jdk launched
- Support env setting of AGENT_TOOLSDIRECTORY as in the setup-python action HOT 1
- [email protected] redownloading jdk on every run HOT 18
- Gradle caching post-task consistently fails on Windows with "device or resource busy" HOT 6
- Allow differentiating Zulu releases with/without CRaC HOT 1
- Ignore certificate HOT 1
- Unable to parse Java version on Ubuntu runner HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setup-java.