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

Compatible with (but not mandatory) Java 21 #293

Merged
merged 31 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
71f0cab
java 21 compatibility
denis-yuen Aug 13, 2024
6315860
add build for Java 21
denis-yuen Aug 13, 2024
69e685e
trim required java version
denis-yuen Aug 13, 2024
392259b
test with Java 21
denis-yuen Aug 13, 2024
b1d29bc
copy https://github.com/dockstore/dockstore/pull/5961/files
denis-yuen Aug 13, 2024
798b253
syntax
denis-yuen Aug 13, 2024
c1548de
add option for java 21
denis-yuen Aug 13, 2024
2fdfd24
jacoco upgrade for java 21?
denis-yuen Aug 13, 2024
a0d8b0e
anything special about order?
denis-yuen Aug 14, 2024
5a40563
try this
denis-yuen Aug 14, 2024
1a9f299
Merge branch 'develop' into feature/java_21
denis-yuen Dec 5, 2024
9080cd9
bad merge
denis-yuen Dec 5, 2024
7067b6f
fix java version
denis-yuen Dec 5, 2024
4de8628
upgrade cwltool version
denis-yuen Dec 5, 2024
c84e75e
switch to pipx
denis-yuen Dec 5, 2024
a5a64b6
match quickstart more closely
denis-yuen Dec 5, 2024
cdfa850
ensurepath?
denis-yuen Dec 6, 2024
6c8d7cf
Add schema salad
denis-yuen Dec 6, 2024
149b426
sigh, specific version of schema salad
denis-yuen Dec 6, 2024
a8c2523
cwlref-runner
denis-yuen Dec 6, 2024
1469ef7
redirect jelte Docker images to fork
denis-yuen Dec 9, 2024
dfded62
mocked IT seems to work fine with this version locally
denis-yuen Dec 9, 2024
6d6fa4b
bump things along and re-test
denis-yuen Dec 9, 2024
8da34b3
finish for the day with newer Ubuntu/Java and disable mockito
denis-yuen Dec 9, 2024
1fa891f
sigh@python Toil install
denis-yuen Dec 9, 2024
9de2336
junit 4?
denis-yuen Dec 9, 2024
dddc979
Update install-tests.sh
denis-yuen Dec 10, 2024
fa84e68
may have been for powermock?
denis-yuen Dec 10, 2024
1364f7f
Merge remote-tracking branch 'refs/remotes/origin/feature/java_21' in…
denis-yuen Dec 10, 2024
e095d09
Revert "may have been for powermock?"
denis-yuen Dec 10, 2024
e628a28
extend comment
denis-yuen Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
parameters:
java-tag:
type: string
default: "17.0.3"
default: "21.0.5"
run_against_develop_core:
type: boolean
default: false
Expand All @@ -17,14 +17,14 @@ executors:

machine_integration_test_exec:
machine: # run the steps with Ubuntu VM
image: ubuntu-2204:2023.10.1
image: ubuntu-2204:2024.04.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the tag different for this and the toil_wes_test_executor below?

Copy link
Member Author

@denis-yuen denis-yuen Dec 10, 2024

Choose a reason for hiding this comment

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

A sad reason
While experimenting, I bumped to a newer version to try to get a newer Java version on the machine executor. It turned out to be unnecessary, but since we ran the tests anyway I kept the newer versions that worked (toil_wes_test_executor used for wes-toil-test).

Something about ubuntu-2204:2024.11.1 breaks the toil install silently (but not all of toil, the part used for regular integration tests including integration-tests-toil-integration-tests, not a typo)

environment:
PGHOST: 127.0.0.1
resource_class: medium

toil_wes_test_executor:
machine: # run the steps with Ubuntu VM
image: ubuntu-2204:2023.10.1
image: ubuntu-2204:2024.11.1
resource_class: medium

common_filters: &common_filters
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mvnw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ '17.0.4+8' ]
java: [ '17.0.4+8', '21.0.5+11.0.LTS' ]

steps:
- name: install git secrets
Expand Down
2 changes: 2 additions & 0 deletions dockstore-cli-integration-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@
--add-opens java.base/java.base=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/sun.nio.fs=ALL-UNNAMED
<!-- for Java 21, see -->
denis-yuen marked this conversation as resolved.
Show resolved Hide resolved
-Djava.security.manager=allow
-da:org.hibernate...
</argLine>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({ Client.class, ToolClient.class, UsersApi.class })
@Category({ConfidentialTest.class, ToolTest.class })
@Ignore("leave this till later, will likely need Mockito/Powermock specific-work for Java 21")
public class MockedIT {

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void testRunningCheckerWDLWorkflow() throws IOException {
workflowApi.publish1(refresh.getId(), publishRequest);

// get test json
String testVersion = "1.3.0";
String testVersion = "1.4.0";
// Also test that files can be gotten by owner even though it's hidden
List<WorkflowVersion> workflowVersions = refresh.getWorkflowVersions();
workflowVersions.stream().filter(v -> v.getName().equals(testVersion)).forEach(v -> v.setHidden(true));
Expand Down
2 changes: 2 additions & 0 deletions dockstore-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.base=ALL-UNNAMED
<!-- for Java 21, see -->
denis-yuen marked this conversation as resolved.
Show resolved Hide resolved
-Djava.security.manager=allow
</argLine>
<skipTests>${skipITs}</skipTests>
<excludedGroups>${excludeGroups}</excludedGroups>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ doc: "Mutect 1.1.5"

hints:
- class: DockerRequirement
dockerPull: quay.io/jeltje/mutect
Copy link
Member Author

Choose a reason for hiding this comment

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

Some Docker repos are forked, some can be downloaded and reuploaded in place (by simply pulling and pushing with an older client, which I had handy on my laptop)

This is an example of forking, the pull/push updates don't leave a trace.

dockerPull: quay.io/dockstore-testing/mutect

requirements:
- class: InlineJavascriptRequirement
Expand Down
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<version>0.8.12</version>
</plugin>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
Expand Down Expand Up @@ -344,6 +344,10 @@
<runOrder>random</runOrder>
<!-- re-run flaky tests once -->
<rerunFailingTestsCount>1</rerunFailingTestsCount>
<argLine>
-Djava.security.manager=allow
@{argLine}
</argLine>
</configuration>
</plugin>
<plugin>
Expand All @@ -356,6 +360,10 @@
<runOrder>random</runOrder>
<!-- re-run flaky tests once -->
<rerunFailingTestsCount>1</rerunFailingTestsCount>
<argLine>
-Djava.security.manager=allow
@{argLine}
</argLine>
</configuration>
</plugin>
<plugin>
Expand Down
10 changes: 9 additions & 1 deletion scripts/install-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ fi
if [ "${TESTING_PROFILE}" = "toil-integration-tests" ]; then
pip3 install --user toil[cwl]==7.0.0
else
pip3 install --user -r https://raw.githubusercontent.com/dockstore/dockstore/develop/dockstore-webservice/src/main/resources/requirements/1.15.0/requirements3.txt
sudo apt-get update
# https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive needed by cwltool
Copy link
Member Author

Choose a reason for hiding this comment

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

This matches 1.16 quickstart with pipx, but had to do a bit of extra work to get schema_salad and cwlref-runner (may be using pipx runpip wrong)

DEBIAN_FRONTEND=noninteractive sudo apt-get -qq --yes --force-yes install tzdata pipx curl
curl -o requirements.txt "https://dockstore.org/api/metadata/runner_dependencies?client_version=1.16.0&python_version=3"
pipx install cwltool==3.1.20240708091337
pipx install schema_salad==8.7.20240718183047
pipx install cwlref-runner
pipx runpip cwltool install -r requirements.txt # this ensures that your version of cwltool and its dependencies matches what we test with
pipx ensurepath
fi

if [ "${TESTING_PROFILE}" = "singularity-tests" ]; then
Expand Down