10000 Partial update to java 21 by denis-yuen · Pull Request #5805 · dockstore/dockstore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Partial update to java 21 #5805

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 12 commits into from
Feb 16, 2024
Merged

Partial update to java 21 #5805

merged 12 commits into from
Feb 16, 2024

Conversation

denis-yuen
Copy link
Member
@denis-yuen denis-yuen commented Feb 13, 2024

Description
Update to Java LTS 21, further pushing out our EOL.
For Java 17 Oracle EOL is Sept 2024, Eclipse Temurin has Oct 2027
For Java 21 Oracle EOL is Sept 2026, Eclipse Temurin has Sept 2029

Nonetheless, Java 21 is the next LTS version and should be better supported going forward.
We are also hoping for performance improvements https://minborgsjavapot.blogspot.com/2023/01/java-21-performance-improvements.html

Note: we have to add in a check for bitbucket testing (not prod code), looks like gson has some slightly different behaviour in Java 21

On close, will create an issue to switch the bytecode compilation to Java 21 and the CircleCI image as well.
Without the new issue, most tests on CircleCI run on Java 21, but the regression, language parsing, and localstack tests run in Java 17. The Docker image should use Java 21 and the github actions tests should use 21

Review Instructions
Builds should continue to function, qa should work after nightly deploy

Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-6176
Follow-up with https://ucsc-cgl.atlassian.net/browse/SEAB-6269

Security and Privacy

Should be an improvement

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that you pass the basic style checks and unit tests by running mvn clean install
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • Follow the existing JPA patterns for queries, using named parameters, to avoid SQL injection
  • If you are changing dependencies, check the Snyk status check or the dashboard to ensure you are not introducing new high/critical vulnerabilities
  • Assume that inputs to the API can be malicious, and sanitize and/or check for Denial of Service type values, e.g., massive sizes
  • Do not serve user-uploaded binary images through the Dockstore API
  • Ensure that endpoints that only allow privileged access enforce that with the @RolesAllowed annotation
  • Do not create cookies, although this may change in the future
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@denis-yuen
Copy link
Member Author

Mystery for tommorow, why on Earth do the BitBucket tests work locally but not on Circle?
Maybe the image?

Copy link
codecov bot commented Feb 13, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (316fda7) 74.44% compared to head (36a8ac0) 74.40%.
Report is 19 commits behind head on develop.

Files Patch % Lines
...store/webservice/helpers/GitHubSourceCodeRepo.java 66.66% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #5805      +/-   ##
=============================================
- Coverage      74.44%   74.40%   -0.04%     
  Complexity      5268     5268              
=============================================
  Files            365      365              
  Lines          19039    19046       +7     
  Branches        2021     2021              
=============================================
- Hits           14173    14172       -1     
- Misses          3903     3917      +14     
+ Partials         963      957       -6     
Flag Coverage Δ
bitbuckettests 27.05% <0.00%> (-0.02%) ⬇️
integrationtests 58.26% <78.57%> (+0.01%) ⬆️
languageparsingtests 10.85% <0.00%> (+<0.01%) ⬆️
localstacktests 21.49% <0.00%> (-0.01%) ⬇️
regressionintegrationtests ?
toolintegrationtests 30.40% <0.00%> (-0.01%) ⬇️
unit-tests_and_non-confidential-tests 28.73% <0.00%> (-0.01%) ⬇️
workflowintegrationtests 38.65% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@denis-yuen denis-yuen self-assigned this Feb 14, 2024
@denis-yuen
Copy link
Member Author

Well, the number of cache misses recorded in the circle ci job artifacts remains the same, so I guess we're good to go on that front

@denis-yuen
Copy link
Member Author

Will keep bytecode target as Java 17 for now, looks like CircleCI image hasn't been updated on schedule yet https://discuss.circleci.com/t/linux-machine-executor-2024-q1-update/50198/2

8000

@denis-yuen denis-yuen changed the title Feature/java 21 Partial update to java 21 Feb 14, 2024
@denis-yuen
Copy link
Member Author

If you're on Linux, recommend something like the following to switch between Java 17 and 21

$ cat ~/bin/switch_java_17.sh 
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io

set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace

sudo update-alternatives --set mvn /opt/apache-maven-3.9.2/bin/mvn
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac

$ cat ~/bin/switch_java_21.sh 
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io

set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace

# sudo update-alternatives --set mvn /opt/apache-maven-3.9.2/bin/mvn
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac

@denis-yuen denis-yuen marked this pull request as ready for review February 14, 2024 19:19
@denis-yuen denis-yuen requested review from a team, david4096, svonworl, ll5zh, coverbeck and kathy-t and removed request for a team and ll5zh February 14, 2024 19:19
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator
@coverbeck coverbeck left a comment

Choose a reason for hiding this comment

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

Will there be another PR for Whoops, left that in by accident, ignore.

@denis-yuen denis-yuen requested review from kathy-t and david4096 and removed request for kathy-t and david4096 February 15, 2024 22:00
@denis-yuen denis-yuen merged commit 0de8f19 into develop Feb 16, 2024
@denis-yuen denis-yuen deleted the feature/java_21 branch February 16, 2024 15:39
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.

4 participants
0