Skip to content

Add Java version - see guardian/gha-scala-library-release-workflow#36 - #209

Merged
rtyley merged 2 commits into
mainfrom
add-java-version
Jun 5, 2024
Merged

rtyley merged 2 commits into
mainfrom
add-java-version

Conversation

@rtyley

@rtyley rtyley commented May 20, 2024

Copy link
Copy Markdown
Member

See guardian/gha-scala-library-release-workflow#36 - gha-scala-library-release-workflow has moved to requiring projects to specify what version of Java they want to use to build, and this is expressed through an asdf-formatted .tool-versions file.

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-workflow to 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 scalacOptions defined in the project's build.sbt includes a -release flag, we can specify that we want the artifacts to support some older version of Java (eg -release:11 for Java 11).

@changeset-bot

changeset-bot Bot commented May 20, 2024 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5d991cc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented May 20, 2024 •

Copy link
Copy Markdown
Contributor

Comment thread .tool-versions
@@ -0,0 +1 @@
java corretto-21.0.3.9.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would we want the lambda runtime to match this version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, good point! Done with 5a95383.

@rtyley
rtyley force-pushed the add-java-version branch from 4a516e4 to 64d7a2e Compare May 24, 2024 14:16
rtyley added a commit that referenced this pull request May 24, 2024
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.
rtyley added a commit that referenced this pull request May 29, 2024
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.
@rtyley
rtyley force-pushed the add-java-version branch from 5a95383 to beabdd5 Compare May 29, 2024 10:01

@akash1810 akash1810 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

(I've not tested this on CODE though).

rtyley added 2 commits June 4, 2024 12:31
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.
@rtyley
rtyley force-pushed the add-java-version branch from beabdd5 to 5d991cc Compare June 4, 2024 11:31
@rtyley

rtyley commented Jun 4, 2024

Copy link
Copy Markdown
Member Author

LGTM!

(I've not tested this on CODE though).

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?

@akash1810

Copy link
Copy Markdown
Member

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.

image

@rtyley
rtyley merged commit 251fd58 into main Jun 5, 2024
@rtyley
rtyley deleted the add-java-version branch June 5, 2024 10:37
@rtyley

rtyley commented Jun 5, 2024

Copy link
Copy Markdown
Member Author

Below is a screenshot of the resulting logs

Looks good! Merging now.

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.

2 participants