Repository navigation
Add Java version - see guardian/gha-scala-library-release-workflow#36 - #209
Conversation
|
| @@ -0,0 +1 @@ | |||
| java corretto-21.0.3.9.1 | |||
There was a problem hiding this comment.
Would we want the lambda runtime to match this version?
As suggested in #209 (comment), we want the Lambda runtime to match the Java version used by developers. I've also updated CI to use Java 21. Ideally, we wouldn't have to do this separately anymore, as setup-java has added partial support for asdf's .tool-versions file with actions/setup-java#606, but unfortunately actions/setup-java#615 means that it won't work with Corretto version numbers.
As suggested in #209 (comment), we want the Lambda runtime to match the Java version used by developers. I've also updated CI to use Java 21. Ideally, we wouldn't have to do this separately anymore, as setup-java has added partial support for asdf's .tool-versions file with actions/setup-java#606, but unfortunately actions/setup-java#615 means that it won't work with Corretto version numbers.
akash1810
left a comment
There was a problem hiding this comment.
LGTM!
(I've not tested this on CODE though).
As suggested in #209 (comment), we want the Lambda runtime to match the Java version used by developers. I've also updated CI to use Java 21. Ideally, we wouldn't have to do this separately anymore, as setup-java has added partial support for asdf's .tool-versions file with actions/setup-java#606, but unfortunately actions/setup-java#615 means that it won't work with Corretto version numbers.
Am I ok to merge this PR? I currently don't have Janus Dev credentials for the Deploy Tools AWS account - which I guess I would probably need to properly evaluate its deployment? |
Ah, hadn't considered that! I've deployed to CODE and tested it now. Below is a screenshot of the resulting logs.
|
Looks good! Merging now. |

See guardian/gha-scala-library-release-workflow#36 -
gha-scala-library-release-workflowhas moved to requiring projects to specify what version of Java they want to use to build, and this is expressed through anasdf-formatted.tool-versionsfile.This allows individual projects to experiment with later (or even earlier) versions of Java if they wish, without requiring all other projects using
gha-scala-library-release-workflowto upgrade their version of Java at the same time."But maybe we need to support older versions of Java!"
Note that, although this PR specifies Java 21 (the latest LTS release of Java, which apparently has several performance benefits) for the library build, the artifacts released by the project do not need to require Java 21 - so long as the
scalacOptionsdefined in the project'sbuild.sbtincludes a-releaseflag, we can specify that we want the artifacts to support some older version of Java (eg-release:11for Java 11).