core icon indicating copy to clipboard operation
core copied to clipboard

Update Project Java Version to 21.04-ms and Ensure Successful Build and Test Completion

Open dcolina opened this issue 1 year ago • 2 comments

Parent Issue

User Story

As a developer, I need to update the Java version in our project to 21.0.4-ms. This involves building the base Java image 21.0.4-ms using the GitHub workflow 'Build SDKMan Base Java Image'. It is crucial to ensure that the project compiles correctly with the new Java version and that all integration flow tests complete successfully.

Acceptance Criteria

  • The base Java image 21.0.4-ms is successfully built using the 'Build SDKMan Base Java Image' workflow.
  • The project's Java version is updated to 21.0.4-ms.
  • Compilation of the project with the new Java version completes without errors.
  • All tests in the integration flow pass successfully.

Proposed Objective

Core Features

Proposed Priority

Priority 1 - Show Stopper

dotCMS Version

N/A

External Links

N/A

Assumptions & Initiation Needs

  • Access to the GitHub workflow configuration for 'Build SDKMan Base Java Image'.
  • Knowledge of how to update Java versions within the project and manage dependencies accordingly.

Quality Assurance Notes & Workarounds

  • Ensure that any dependencies incompatible with Java 21.04-ms are identified and addressed.
  • Monitor the integration flow tests closely to catch and rectify any issues arising from the Java update.

Sub-Tasks & Estimates

N/A

dcolina avatar Aug 21 '24 14:08 dcolina

Internal QA: Apparently some changes are missing. The latest docker image generated is running Java 11.

Besides, it seems like there are some changes missing from this PR

nollymar avatar Aug 23 '24 20:08 nollymar

The docker image created during CICD build/test is working fine but the image is regenerated in the master deployment phase, we were missing passing the build-arg to specify the base image to use in this step and it was falling back to the default in the Docker file.

We need to be more clear about what changes are missing from the PR as it is old and does not reflect some changes that have already been deployed in different ways into master. There are also some changes that were purposely not included in this PR and should be added after initial Java 21 was merged. The new garbage collection options are only supported with Java 21, the old Java 11 options may not be preferable for Java 21, and we may also have some warnings after switch over but It is preferable to have smaller PRs and to have and test a commit where we are only changing the Java version essentially a commit that is compatible with both, and then follow up with changes that are only supported in the new version. We can then also distinguish between issues that may be caused by those tomcat parameter changes from the core java change. There may be something missing from the PR we want to include but if it is not something that is going to cause things to break when running on java 21 they should be separately included.

spbolton avatar Aug 27 '24 11:08 spbolton

Passed Internal QA

  • Tested on docker image: [dotcms/dotcms:trunk_b8fe837]
  • Server: dotCMS QA Server and My Local Host

Video

Checking Build SDKMan Base Java Image Workflow and Java version in dotCMS instance

https://github.com/user-attachments/assets/fb663bbc-f980-4d74-aa2d-89b05530aac4

Checking the Java version directly in the terminal

https://github.com/user-attachments/assets/38ab2afc-60ef-44de-b2d7-61b93d26f2da

rjvelazco avatar Aug 29 '24 19:08 rjvelazco

Fixed, tested on the latest trunk // Docker // FF

bryanboza avatar Aug 29 '24 21:08 bryanboza