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

chore(deps): update actions/setup-java to v2.0.0 #9601

Merged

Conversation

HonkingGoose
Copy link
Collaborator

@HonkingGoose HonkingGoose commented Apr 18, 2021

Changes:

  • Update actions/setup-java to v2.0.0 from 1.4.3
  • Specify that we want to use the adopt distribution of Java (mandatory to specify this)
  • Specify that we want to use the jre Java package (optional to specify this)

Context:

Renovate Bot listed this update on the Dependency Dashboard, but we need to take manual action anyways due to some breaking changes.

The major breaking change is that we now must specify what distribution of Java we want to use.
Version 1 of the action uses the Zulu distribution, so I'm sticking with that.
We decided to go with the adopt distribution instead.

It's optional to specify what version of the Java package we use (jdk/jre), v1 uses jdk, so I'm sticking with that as well.
We decided to use the jre version.

Please read the guide here and check my work: https://github.com/actions/setup-java/blob/main/docs/switching-to-v2.md

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@HonkingGoose
Copy link
Collaborator Author

I don't know if we care about always testing on the latest version of Java?

There's a Boolean property check-latest, if we set that to true it will always fetch the latest version of Java (if that version is newer than the version of Java that comes with the action/cache). The downside is that it might take longer to run the tests, as it might need to download a newer version of Java.

Right now the "implicit" default is that check-latest is false. So currently it will only use the version of Java that comes with the action/cache.

Documentation for check-latest property: https://github.com/actions/setup-java#check-latest

viceice
viceice previously approved these changes Apr 18, 2021
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

We should test latest major lts java version

@HonkingGoose
Copy link
Collaborator Author

We should test latest major lts java version

This is what GitHub Actions comes with right now:

Version Vendor Environment Variable
8.0.282+8 Adopt OpenJDK JAVA_HOME_8_X64
11.0.10+9 (default) Adopt OpenJDK JAVA_HOME_11_X64

Source: https://github.com/actions/virtual-environments/blob/ubuntu20/20210412.1/images/linux/Ubuntu2004-README.md#java

So if we want to benefit from the GitHub Action pre-installed version of Java, maybe we should set adopt instead of zulu as our distribution?

Or we could tell the action to fetch the latest Java LTS release by setting check-latest to true instead of the current (implicit) false.

@viceice
Copy link
Member

viceice commented Apr 19, 2021

lets use adopt and java 11 for now

@HonkingGoose HonkingGoose marked this pull request as ready for review April 19, 2021 17:48
@viceice viceice enabled auto-merge (squash) April 21, 2021 04:31
@viceice viceice merged commit e4db9e5 into renovatebot:master Apr 21, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.119.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@HonkingGoose HonkingGoose deleted the chore/update-setup-java-to-v2 branch April 21, 2021 09:11
@HonkingGoose HonkingGoose mentioned this pull request Apr 21, 2021
45 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants