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

[ISSUE #4670] Docker build failed due to a low JDK version #4675

Merged
merged 13 commits into from
Dec 19, 2023

Conversation

Pil0tXia
Copy link
Member

@Pil0tXia Pil0tXia commented Dec 18, 2023

Fixes #4670.

Motivation

https://github.com/Pil0tXia/eventmesh/actions/runs/7238476046/job/19719334574

Modifications

  • Switch builder JDK version from jdk8 to jdk11 and switch container JDK version from jdk8 to jre11. Compile the code in two stages using JDK11 and JDK8, and run the container in a Java8 environment. Optionally, provide a script for running in a Java11 environment.
  • Using JRE instead of JDK as a runtime envrionment can reduce 300MB+ imgae size.
  • Modify start.sh to support selecting an available version between Java 8 and Java 11, and set the VM options accordingly.
  • Fix get_pid functionality in docker.
  • Streamline outdated Java exec locating logic.

Docker deployment & compilation documents will be updated later.

Tests

These runtime environments are tested:

Generated files were added:

image

Connectors or Jdbc Connector are not tested.

image

Using Java 11:

image

image

Using Java 8:

image

image

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@Pil0tXia
Copy link
Member Author

Docker image can be tested by docker pull pil0txia/eventmesh:v1.10.0-83.

@Pil0tXia Pil0tXia changed the title [ISSUE #4670] Support Java 11 StartUp and Fix Docker build failed due to a low JDK version [ISSUE #4670] Support Java 11 StartUp and Docker deployment Dec 18, 2023
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (65fdabf) 17.39% compared to head (0f46b6f) 17.39%.
Report is 1 commits behind head on master.

❗ Current head 0f46b6f differs from pull request most recent head e362aff. Consider uploading reports for the commit e362aff to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4675   +/-   ##
=========================================
  Coverage     17.39%   17.39%           
- Complexity     1759     1760    +1     
=========================================
  Files           797      797           
  Lines         29795    29795           
  Branches       2578     2578           
=========================================
+ Hits           5182     5184    +2     
+ Misses        24132    24131    -1     
+ Partials        481      480    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pandaapo pandaapo merged commit 2b2bf71 into apache:master Dec 19, 2023
10 checks passed
Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

Greate! LGTM

@pandaapo pandaapo changed the title [ISSUE #4670] Support Java 11 StartUp and Docker deployment [ISSUE #4670] Docker build failed due to a low JDK version Dec 19, 2023
@Pil0tXia Pil0tXia deleted the pi0txia_bug_4670 branch January 4, 2024 05:00
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.

[Bug] Docker build failed due to a low JDK version
4 participants