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

Java 17 and Spark 3.3.0. #8035

Merged
merged 36 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
128d947
Java 17/Spark 3.3.0.
cmnbroad Jun 20, 2022
2b7c5ef
Move the --add-opens directives to the jar file.
cmnbroad Oct 12, 2022
4cfe136
Fix bad dependency picked up in rebase.
cmnbroad Dec 19, 2022
fd811bb
Repair README.md.
cmnbroad Jan 10, 2023
9e35381
changing non-Docker from 17 to 17.0.1+12
samuelklee Jan 25, 2023
3493c71
Update ModelSegments expected results for Java 17.0.1+12.
cmnbroad Jan 30, 2023
d74c038
Update scala to fix DirectBuffer access issue.
cmnbroad Feb 6, 2023
737f2d5
Fix scala dependencies.
cmnbroad Feb 6, 2023
2907ec0
Update Spark version.
cmnbroad Feb 6, 2023
3ac0dc0
Repair manifest syntax.
cmnbroad Feb 7, 2023
87f6d6f
Clean up build aand test files.
cmnbroad Feb 13, 2023
8aba940
Java 17 doclets.
cmnbroad Jun 20, 2022
3eed060
Port gatkWDLGen doclet to Java 17.
cmnbroad Jan 9, 2023
dbb7a36
Update to Barclay 5.0.0.
cmnbroad Feb 6, 2023
d4e9ec9
Rebase, resolve, clean up.
cmnbroad Feb 22, 2023
a97d6b4
Upgrade to Picard 3.0.0.
cmnbroad Feb 22, 2023
4216a03
Fix ClassFinder references.
cmnbroad Feb 22, 2023
3e9c1a4
Remove javadoc command from WDLGen and TabCompletion test, since its …
cmnbroad Feb 22, 2023
24267f9
Now on htsjdk 3.0.5.
cmnbroad Feb 22, 2023
ab0317e
Remove obsolete jitpack.
cmnbroad Feb 22, 2023
4f4be7e
Remove obsolete (and unnecessary/problematic) langauge directive.
cmnbroad Feb 22, 2023
ed3d0dc
Align java version.
cmnbroad Feb 22, 2023
b388ac3
Revert "Update ModelSegments expected results for Java 17.0.1+12."
cmnbroad Feb 22, 2023
e75cc25
Capture documentation generation integration test output.
cmnbroad Feb 26, 2023
d226508
Remove google cloud apt-key update.
cmnbroad Feb 27, 2023
71807a3
Code review comments, plus capture doc gen test output.
cmnbroad Feb 27, 2023
697193d
Restore kryo version change.
cmnbroad Feb 27, 2023
2f24d37
Make docgen smoke tests non-docker only.
cmnbroad Feb 27, 2023
188b680
Remove unused scala version variable.
cmnbroad Feb 28, 2023
f83d41c
Revert unnecessary debugging change to IntegrationTestSpec.
cmnbroad Feb 28, 2023
c70582c
Revert transient modifier from CachingIndexedFastaSequenceFile.
cmnbroad Feb 28, 2023
4b90179
One more -add-opens.
cmnbroad Feb 28, 2023
664a6ec
And one more --add-opens.
cmnbroad Feb 28, 2023
ea8ccc9
Revert "And one more --add-opens."
cmnbroad Feb 28, 2023
b4fd63a
Revert "One more -add-opens."
cmnbroad Feb 28, 2023
8cb4522
Revert "Revert transient modifier from CachingIndexedFastaSequenceFile."
cmnbroad Feb 28, 2023
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 .github/actions/upload-gatk-test-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ inputs:
description: 'The job-unique identifier to use for uploading the results of this run into a google bucket'
required: true
is-docker:
description: 'Whether to label the uplaod artifact as coming from a docker test'
description: 'Whether to label the upload artifact as coming from a docker test'
required: false
identifier:
description: 'Identifier to use for finding the unique name for jobs in order to determine html logs location (eg. "Java 8 build and test integration")'
description: 'Identifier to use for finding the unique name for jobs in order to determine html logs location (eg. "Java 17 build and test integration")'
required: true
## Secrets and token inputs
repo-token:
Expand All @@ -23,7 +23,7 @@ inputs:
bot-comment-key:
description: 'Key corresponding to the user account to be used for making comments on github about test failures'
required: false
## option to skip all but the artifact uplaod
## option to skip all but the artifact upload
only-artifact:
description: 'if "true" this will skip any uploading steps that require permissions and only upload the artifact file'
required: false
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/gatk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

env:
CROMWELL_VERSION: 51
CROMWELL_VERSION: 84
TERM: dumb
GRADLE_OPTS: "-Xmx2048m -Dorg.gradle.daemon=false"
HELLBENDER_TEST_INPUTS: gs://hellbender/test/resources/
Expand Down Expand Up @@ -73,19 +73,10 @@ jobs:
needs: check-secrets
strategy:
matrix:
java: [ 8, 11.0.11+9 ]
java: [ 17.0.6+10 ]
experimental: [ false ]
scalaVersion: [ 2.11, 2.12 ]
scalaVersion: [ 2.13 ]
testType: [ cloud, integration, unit ]
exclude:
- java: 11.0.11+9
scalaVersion: 2.11
- java: 8
scalaVersion: 2.12
- java: 8
testType: integration
- java: 8
testType: unit
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
env:
Expand All @@ -100,7 +91,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.Java }}
distribution: 'adopt'
distribution: 'temurin'
cache: gradle

- name: 'Compile with Gradle'
Expand Down Expand Up @@ -134,7 +125,7 @@ jobs:
if: ${{ needs.check-secrets.outputs.google-credentials == 'true' || matrix.testType != 'cloud'}}
id: jacoco-tests
run: |
./gradlew -Dscala.version=${{ env.SCALA_VERSION }} jacocoTestReport
./gradlew --daemon -Dscala.version=${{ env.SCALA_VERSION }} jacocoTestReport

- uses: ./.github/actions/upload-gatk-test-results
if: always()
Expand All @@ -154,9 +145,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8 ]
java: [ 17.0.6+10 ]
experimental: [ false ]
scalaVersion: [ 2.11 ]
scalaVersion: [ 2.13 ]
testType: [ integration, unit, variantcalling, conda ]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
Expand All @@ -174,7 +165,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.Java }}
distribution: 'adopt'
distribution: 'temurin'
cache: gradle

#Google Cloud stuff
Expand Down Expand Up @@ -259,6 +250,12 @@ jobs:
- uses: actions/checkout@v2
with:
fetch: 0
- name: Set up java 17
uses: actions/setup-java@v2
Copy link
Member

Choose a reason for hiding this comment

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

we might want to bump all the actions/*v2 -> actions/*v3. Do not hold this up to do that though....

with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: ./.github/actions/install-cromwell
with:
CROMWELL_VERSION: ${{ env.CROMWELL_VERSION }}
Expand All @@ -273,11 +270,11 @@ jobs:
- uses: actions/checkout@v2
with:
fetch: 0
- name: Set up java 8
- name: Set up java 17
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: ./.github/actions/install-cromwell
with:
Expand All @@ -300,11 +297,11 @@ jobs:
fetch-depth: 0
- name: pull lfs files
run: git lfs pull
- name: Set up java 8
- name: Set up java 17
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: ./.github/actions/install-cromwell
with:
Expand Down
41 changes: 37 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,27 @@ ADD . /gatk
WORKDIR /gatk

# Get an updated gcloud signing key, in case the one in the base image has expired
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN rm /etc/apt/sources.list.d/google-cloud-sdk.list
RUN apt update
RUN apt-key list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN add-apt-repository universe && apt update
RUN apt-get --assume-yes install git-lfs
RUN git lfs install --force

##Get Java 17 temurin JDK
#RUN apt update && apt upgrade
RUN apt install wget
RUN wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.6%2B10/OpenJDK17U-jdk_x64_linux_hotspot_17.0.6_10.tar.gz
RUN tar -xvf OpenJDK17U-jdk_x64_linux_hotspot_17.*.tar.gz
RUN mv jdk-17.0.6+10 /opt/
#
ENV JAVA_HOME /opt/jdk-17.0.6+10
ENV PATH $JAVA_HOME/bin:$PATH
RUN echo $JAVA_HOME
RUN update-alternatives --install /usr/bin/java java /opt/jdk-17.0.6+10/bin/java 1
RUN java -version

#Download only resources required for the build, not for testing
RUN git lfs pull --include src/main/resources/large

Expand All @@ -23,6 +39,23 @@ RUN unzip -o -j $( find /gatk/unzippedJar -name "gatkPython*.zip" ) -d /gatk/unz
# Using OpenJDK 8
FROM broadinstitute/gatk:gatkbase-2.3.0

RUN rm /etc/apt/sources.list.d/google-cloud-sdk.list
RUN apt update
RUN apt-key list

#Get Java 17 temurin JDK
#RUN apt update && apt upgrade
RUN apt install wget
RUN wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.6%2B10/OpenJDK17U-jdk_x64_linux_hotspot_17.0.6_10.tar.gz
RUN tar -xvf OpenJDK17U-jdk_x64_linux_hotspot_17.*.tar.gz
RUN mv jdk-17.0.6+10 /opt/

ENV JAVA_HOME /opt/jdk-17.0.6+10
ENV PATH $JAVA_HOME/bin:$PATH
RUN echo $JAVA_HOME
RUN update-alternatives --install /usr/bin/java java /opt/jdk-17.0.6+10/bin/java 1
RUN java -version

WORKDIR /gatk

# Location of the unzipped gatk bundle files
Expand Down Expand Up @@ -56,11 +89,11 @@ RUN echo "source activate gatk" > /root/run_unit_tests.sh && \
echo "mkdir /gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "cp -rp /gatkCloneMountPoint/src/main/java/* /gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "export SOURCE_DIR=/gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "export GRADLE_OPTS=\"-Xmx1024m -Dorg.gradle.daemon=false\"" /root/run_unit_tests.sh && \
echo "export CP_DIR=/gatk/testClasses" /root/run_unit_tests.sh && \
echo "export GRADLE_OPTS=\"-Xmx1024m -Dorg.gradle.daemon=false --add-opens java.prefs/java.util.prefs=ALL-UNNAMED\"" >> /root/run_unit_tests.sh && \
echo "export CP_DIR=/gatk/testClasses" >> /root/run_unit_tests.sh && \
echo "ln -s /gatkCloneMountPoint/src/ /gatkCloneMountPoint/scripts/docker/src" >> /root/run_unit_tests.sh && \
echo "ln -s /gatkCloneMountPoint/build/ /gatkCloneMountPoint/scripts/docker/build" >> /root/run_unit_tests.sh && \
echo "cd /gatk/ && /gatkCloneMountPoint/gradlew -b /gatkCloneMountPoint/dockertest.gradle testOnPackagedReleaseJar jacocoTestReportOnPackagedReleaseJar -a -p /gatkCloneMountPoint" >> /root/run_unit_tests.sh
echo "cd /gatk/ && /gatkCloneMountPoint/gradlew -Dfile.encoding=UTF-8 -b /gatkCloneMountPoint/dockertest.gradle testOnPackagedReleaseJar jacocoTestReportOnPackagedReleaseJar -a -p /gatkCloneMountPoint" >> /root/run_unit_tests.sh

WORKDIR /root
RUN cp -r /root/run_unit_tests.sh /gatk
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,16 @@ releases of the toolkit.

## <a name="requirements">Requirements</a>
* To run GATK:
* Java 8 is needed to run or build GATK.
* Java 17 is needed to run or build GATK.
We recommend one of the following:
* Download the Eclipse Foundation's distribution of OpenJDK 8 from [adoptium.net](https://adoptium.net/). Navigate to the [release archive](https://adoptium.net/temurin/archive/?version=8) to find downloads for Java 8.
* On Mac OS, you can install the [Homebrew package manager](https://brew.sh/) and run `brew tap homebrew/cask-versions` followed by `brew install --cask temurin8` to install the Eclipse Foundation's OpenJDK 8.
* Or you can download the older [OracleJDK 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
which requires an Oracle account to download and comes with restrictive [license conditions](https://www.oracle.com/downloads/licenses/javase-license1.html).
* Download the Eclipse Foundation's distribution of OpenJDK 17 from [adoptium.net](https://adoptium.net/). Navigate to the [release archive](https://adoptium.net/temurin/archive/?version=17) to find downloads for Java 17.
* On Mac OS, you can install the [Homebrew package manager](https://brew.sh/) and run `brew tap homebrew/cask-versions` followed by `brew install --cask temurin17` to install the Eclipse Foundation's OpenJDK 17.
* Python 2.6 or greater (required to run the `gatk` frontend script)
* Python 3.6.2, along with a set of additional Python packages, is required to run some tools and workflows.
See [Python Dependencies](#python) for more information.
* R 3.2.5 (needed for producing plots in certain tools)
* To build GATK:
* A Java 8 JDK
* A Java 17 JDK
* Git 2.5 or greater
* [git-lfs](https://git-lfs.github.com/) 1.1.0 or greater. Required to download the large files used to build GATK, and
test files required to run the test suite. Run `git lfs install` after downloading, followed by `git lfs pull` from
Expand Down Expand Up @@ -455,7 +453,7 @@ We use [git-lfs](https://git-lfs.github.com/) to version and distribute test dat

#### <a name="intellij">Creating a GATK project in the IntelliJ IDE (last tested with version 2016.2.4):</a>

* Ensure that you have `gradle` and the Java 8 JDK installed
* Ensure that you have `gradle` and the Java 17 JDK installed

* You may need to install the TestNG and Gradle plugins (in preferences)

Expand All @@ -471,13 +469,13 @@ We use [git-lfs](https://git-lfs.github.com/) to version and distribute test dat

* Select "Use auto-import" and "Use default gradle wrapper".

* Make sure the Gradle JVM points to Java 1.8. You may need to set this manually after creating the project, to do so find the gradle settings by clicking the wrench icon in the gradle tab on the right bar, from there edit "Gradle JVM" argument to point to Java 1.8.
* Make sure the Gradle JVM points to Java 17. You may need to set this manually after creating the project, to do so find the gradle settings by clicking the wrench icon in the gradle tab on the right bar, from there edit "Gradle JVM" argument to point to Java 17.

* Click "Finish"

* After downloading project dependencies, IntelliJ should open a new window with your GATK project

* Make sure that the Java version is set correctly by going to File -> "Project Structure" -> "Project". Check that the "Project SDK" is set to your Java 1.8 JDK, and "Project language level" to 8 (you may need to add your Java 8 JDK under "Platform Settings" -> SDKs if it isn't there already). Then click "Apply"/"Ok".
* Make sure that the Java version is set correctly by going to File -> "Project Structure" -> "Project". Check that the "Project SDK" is set to your Java 17 JDK, and "Project language level" to 17 (you may need to add your Java 17 JDK under "Platform Settings" -> SDKs if it isn't there already). Then click "Apply"/"Ok".

#### <a name="debugging">Setting up debugging in IntelliJ</a>

Expand Down
Loading