8000 Rework Java installation by viren-nadkarni · Pull Request #11139 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Rework Java installation #11139

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

Merged
merged 22 commits into from
Sep 12, 2024
Merged

Rework Java installation #11139

merged 22 commits into from
Sep 12, 2024

Conversation

viren-nadkarni
Copy link
Member
@viren-nadkarni viren-nadkarni commented Jul 4, 2024

Background

LocalStack Docker image currently installs JRE 11 from the Temurin Docker build. This is used as the default JRE installation for the LS environment.

We have a need for more flexibility around having multiple JRE installations. Certain components demand an older or a new version of JRE and currently there is no mechanism to achieve this.

Changes

This PR adds a java LPM package that supports all three Java LTS releases (8, 11, 21).

As before, we preinstall JRE 11 during the Docker build process. The java package installer is based on the Ext version. It was refactored to use ArchiveDownloadAndExtractInstaller instead of OSPackageInstaller.

The install source is changed but we use the same jlink-based optimisation. Post-install disk footprint is more or less the same (~70M) except for Java 8 which does not have jlink.

In follow up PRs, the specific Java requirement explicit in all community (DDB, Opensearch, etc.) and ext LPM packages. The default system-wide Java installation made during Docker build will also be removed.

It should be safe to merge this without the companion PR. Tested with AWS / Ext Integration Tests # 778

@viren-nadkarni viren-nadkarni self-assigned this Jul 4, 2024
@viren-nadkarni viren-nadkarni added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Jul 4, 2024
@viren-nadkarni viren-nadkarni changed the title Use Java 21 Update JRE to 21 Jul 4, 2024
@viren-nadkarni viren-nadkarni added this to the Playground milestone Jul 22, 2024
@viren-nadkarni viren-nadkarni changed the title Update JRE to 21 Rework Java installation Jul 31, 2024
Copy link
github-actions bot commented Jul 31, 2024

LocalStack Community integration with Pro

    2 files      2 suites   1h 37m 37s ⏱️
3 426 tests 3 027 ✅ 399 💤 0 ❌
3 428 runs  3 027 ✅ 401 💤 0 ❌

Results for commit 680a58a.

♻️ This comment has been updated with latest results.

@viren-nadkarni viren-nadkarni marked this pull request as ready for review July 31, 2024 13:23
Copy link
Member
@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Wow, this is a great step forward to upgrading Java, and maybe in the future really just installing it on demand for the few services that depend on it!
I think we need to find a solution for the pretty big size increase of the image due to the change, and I added some comments to other things we could maybe optimize from the beginning (for example using latest patch versions).

@viren-nadkarni viren-nadkarni marked this pull request as draft August 2, 2024 12:49
@viren-nadkarni viren-nadkarni marked this pull request as ready for review September 3, 2024 11:57
@viren-nadkarni viren-nadkarni marked this pull request as draft September 3, 2024 12:44
@viren-nadkarni viren-nadkarni marked this pull request as ready for review September 3, 2024 14:14
@localstack localstack deleted a comment from localstack-bot Sep 9, 2024
Copy link
Member
@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Thanks a lot for addressing all the comments and for cleaning up along the way (f.e. by removing the docker-java-home)!
The changes are looking great! Especially the automatic latest-version lookup! 💯
I only had one minor nitpick / question concerning the user-agent, but nothing blocking a release.

8000
Copy link

S3 Image Test Results (AMD64 / ARM64)

  2 files  ±0    2 suites  ±0   4m 13s ⏱️ +35s
423 tests ±0  369 ✅ ±0   54 💤 ±0  0 ❌ ±0 
846 runs  ±0  738 ✅ ±0  108 💤 ±0  0 ❌ ±0 

Results for commit 680a58a. ± Comparison against base commit 04cfa50.

@viren-nadkarni viren-nadkarni merged commit 68366d1 into master Sep 12, 2024
41 checks passed
@viren-nadkarni viren-nadkarni deleted the update-java-21 branch September 12, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0