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

Upgrade to java 21 #678

Merged
merged 9 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'benchmark')
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
java-version: '21'
distribution: 'corretto'
bryanlb marked this conversation as resolved.
Show resolved Hide resolved
cache: 'maven'
# - name: Download benchmark data
# # AWS cli can be used if we want to host separate data - https://stackoverflow.com/questions/59166099/github-action-aws-cli
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
java-version: '21'
# Currently, LTS versions of Eclipse Temurin (temurin) are cached on the GitHub Hosted Runners.
# When temurin releases Java 21 we can start using that again
distribution: 'corretto'
cache: 'maven'
- name: Ensure code is formatted
run: mvn -B -Dstyle.color=always com.spotify.fmt:fmt-maven-plugin:check --file kaldb/pom.xml
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM maven:3.9-amazoncorretto-17 as build
FROM maven:3.9-amazoncorretto-21 as build
COPY . /work/
RUN cd /work; mvn package -DskipTests

FROM amazoncorretto:17
FROM amazoncorretto:21
COPY --from=build /work/kaldb/target/kaldb.jar /
COPY --from=build /work/config/config.yaml /
ENTRYPOINT [ "java", "-jar", "./kaldb.jar", "config.yaml" ]
2 changes: 1 addition & 1 deletion benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.20</version>
<version>2.21.1</version>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
Expand Down
16 changes: 13 additions & 3 deletions kaldb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,13 @@
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<!-- Note: next time we upgrade this, check if mockito-core depends on 1.14.8+ version of bytebuddy -->
<!-- if it does then we don't need to define bytebuddy explicitly anymore -->
<!-- Run mvn dependency:tree to verify. armeria also has a runtime dependency on bytebuddy so we need to check that as well -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.3.1</version>
<version>5.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -438,6 +441,13 @@
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<!-- Define bytebuddy 1.14.8 explicitly which support Java 21 -->
<dependency>
vthacker marked this conversation as resolved.
Show resolved Hide resolved
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.8</version>
<scope>test</scope>
</dependency>

<!-- BlobFs test dependencies -->
<dependency>
Expand Down Expand Up @@ -572,7 +582,7 @@
<version>${error.prone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -629,7 +639,7 @@
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.20</version>
<version>2.21.1</version>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public void testConsumeMessagesBetweenOffsets() throws Exception {
// Assign doesn't create a consumer group.
assertThat(kafkaServer.getConnectedConsumerGroups()).isEqualTo(0);
}

bryanlb marked this conversation as resolved.
Show resolved Hide resolved
// TODO: Test batch ingestion with roll over. Not adding a test, since this functionality is
// not needed by the recovery indexer yet.

Expand Down