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

Using TCK tested OpenJDK builds of the latest LTS and fixed (major) version releases in GH Actions. #1868

Merged
merged 2 commits into from Oct 21, 2021

Conversation

carldea
Copy link
Contributor

@carldea carldea commented Oct 18, 2021

Signed-off-by: Carl Dea carldea@gmail.com

Using the latest LTS and fixed (major) versions of the OpenJDK.

The AdoptOpenJDK has been discontinued since July 2021 (https://adoptopenjdk.net). This request is to switch the distribution from adopt to Azul zulu. When using Zulu you get all the latest updated (TCK Tested) builds for all versions of OpenJDK (even archived fixed versions and early access releases).

In the workflow (GH Action) I added a fixed (major) release version such as JDK 11.0.3. This is often a good practice whenever a build triggers to help determine if the latest (JDK 11) had failed and why. Usually you're trying to figure out what happened wheter it's from the latest build vs something in your code that caused (or introduced) the issue.

For example, when building with JDK 11.0.3 (fixed version) the build/tests passes (Green) and JDK 11 fails (Red) will mean that the latest JDK 11 was the cause and not your code. Some customers/vendors typically have JDK 11.0.3 and aren't ready to move to the latest.

Note: Other distributions such as Temurin do not support archived fixed releases prior to Sept. 2021 and many of the non-LTS (long term support) releases (ie: 18-ea). This is often the case when/if you are planning to try out newer features in the Java language.
The following are benefits:

  • Ensure backwards compatibility on fixed (major) releases of OpenJDK
  • TCK tested builds of the OpenJDK
  • Get the latest of LTS and non-LTS versions, means security updates.
  • Experimentation with newer language features.

Updating 2 Github Actions (workflows)

  • Changed the distribution to use Zulu
  • Added a matrix (array) of JDK versions to provide coverage
    The following is an excerpt of the changes in the workflow maven-pr-builder.yml
   strategy:
      matrix:
        java-version: [ 11.0.3, 11, 17, 18-ea ]
        
... later in steps:

   - name: Set up JDK ${{ matrix.java-version }}
      uses: actions/setup-java@v2
      with:
        java-version: ${{ matrix.java-version }}
        distribution: 'zulu'        
        

Sonar issue.

One minor issue in my fork, is when using my SONAR_TOKEN I'm not authorized, so my workflows (fork) fails.

Thank you,
:-)

Carl

For detailed contributing instructions see https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute

Signed-off-by: Carl Dea <carldea@gmail.com>
@ohbus ohbus self-assigned this Oct 18, 2021
Copy link
Contributor

@ohbus ohbus left a comment

Choose a reason for hiding this comment

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

Let us only keep the build for 11 latest and 11.0.3 for the time being.

And also change the circleci image if necessary.

…ed 17 & 18-ea releases.

Signed-off-by: Carl Dea <carldea@gmail.com>
@carldea
Copy link
Contributor Author

carldea commented Oct 19, 2021

Let us only keep the build for 11 latest and 11.0.3 for the time being.

I made the changes (removed 17 & 18-ea).

And also change the circleci image if necessary.

Question: Is there an image using the jre instead of the jdk? (or does it matter?).
I didn't change anything.

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@ohbus ohbus left a comment

Choose a reason for hiding this comment

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

Let us only keep the build for 11 latest and 11.0.3 for the time being.

I made the changes (removed 17 & 18-ea).

And also change the circleci image if necessary.

Question: Is there an image using the JRE instead of the JDK? (or does it matter?). I didn't change anything.

No, we need the JDK, but do we really need it?

Please check and report what JDK the CircleCI image is using.

@carldea
Copy link
Contributor Author

carldea commented Oct 20, 2021

Let us only keep the build for 11 latest and 11.0.3 for the time being.

I made the changes (removed 17 & 18-ea).

And also change the circleci image if necessary.

Question: Is there an image using the JRE instead of the JDK? (or does it matter?). I didn't change anything.

No, we need the JDK, but do we really need it?

Please check and report what JDK the CircleCI image is using.

I am not really familiar with CircleCI. I believe you are referring to the file below:
https://github.com/iluwatar/java-design-patterns/blob/master/.circleci/config.yml

Docker Image Used

I did notice the config yaml file specified with the docker image: circleci/openjdk:11-node

CircleCI and Docs

Based on further research over at DockerHub and according to CircleCI they are using AdoptOpenJDK?
The sentence is under "How this image works"

I'm not sure if CircleCi may need to update their docs and/or images to support other distros (contained within their images). The AdoptOpenJDK build has been discontinued and aren't the same builds (binaries) as the Oracle's OpenJDK builds over on Docker Hub.

I'm assuming CircleCi images are a fast and convenient way to get containers with a JDK and NodeJS.

Azul Zulu Docker images

I'm not sure about CircleCi images extending NodeJS (layer), but below are the official Zulu build images that are available:
https://hub.docker.com/r/azul/zulu-openjdk

Copy link
Contributor

@ohbus ohbus left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

Thank you @carldea for the clarification!

@ohbus ohbus merged commit d1c26f9 into iluwatar:master Oct 21, 2021
@ohbus ohbus added this to the 1.25.0 milestone Oct 21, 2021
@ohbus
Copy link
Contributor

ohbus commented Oct 21, 2021

@all-contributors please add @carldea for code

@allcontributors
Copy link
Contributor

@ohbus

I've put up a pull request to add @carldea! 🎉

@carldea
Copy link
Contributor Author

carldea commented Oct 21, 2021

@all-contributors please add @carldea for code

Thank you!
👍🏻

@allcontributors
Copy link
Contributor

@carldea

@carldea already contributed before to code

RobbiNespu pushed a commit to RobbiNespu/java-design-patterns that referenced this pull request Mar 1, 2022
…1868)

* Using the latest LTS and fixed (major) versions of the OpenJDK.
Signed-off-by: Carl Dea <carldea@gmail.com>

* Using the latest LTS and fixed (major) versions of the OpenJDK. Removed 17 & 18-ea releases.
Signed-off-by: Carl Dea <carldea@gmail.com>

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants