Skip to content

[Draft] Upgrade JDK target to 17 #735

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

[Draft] Upgrade JDK target to 17 #735

wants to merge 4 commits into from

Conversation

Andyz26
Copy link
Collaborator

@Andyz26 Andyz26 commented Dec 20, 2024

Context

Upgrade project to target JDK17.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

@Andyz26
Copy link
Collaborator Author

Andyz26 commented Dec 20, 2024

@crioux-stripe @kmg-stripe @garryliu-stripe How do you feel about the moving towards jdk17 for the OSS components? Any thing internal you need to keep on jdk8? This is still early draft and I have some internal validation to do but I would like to see how you folks feel about this early.

Copy link

github-actions bot commented Dec 20, 2024

Test Results

142 files  ±0  142 suites  ±0   8m 1s ⏱️ -27s
619 tests ±0  608 ✅ ±0  11 💤 +1  0 ❌  - 1 
619 runs   - 1  608 ✅  - 1  11 💤 +1  0 ❌  - 1 

Results for commit 1909c32. ± Comparison against base commit 35a0826.

This pull request skips 1 test.
io.mantisrx.publish.internal.discovery.MantisJobDiscoveryTest ‑ testJobDiscoveryFetchFailureHandlingAfterSuccess()

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 20, 2024

Uploaded Artifacts

To use these artifacts in your Gradle project, paste the following lines in your build.gradle.

resolutionStrategy {
    force "io.mantisrx:mantis-discovery-proto:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-common-serde:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-common:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-client:0.1.0-20241220.224239-564"
    force "io.mantisrx:mantis-network:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-runtime:0.1.0-20241220.224239-564"
    force "io.mantisrx:mantis-runtime-loader:0.1.0-20241220.224239-564"
    force "io.mantisrx:mantis-remote-observable:0.1.0-20241220.224239-564"
    force "io.mantisrx:mantis-shaded:0.1.0-20241220.224239-562"
    force "io.mantisrx:mantis-testcontainers:0.1.0-20241220.224239-233"
    force "io.mantisrx:mantis-runtime-executor:0.1.0-20241220.224239-99"
    force "io.mantisrx:mantis-rxcontrol:0.1.0-20241220.224239-37"
    force "io.mantisrx:mantis-connector-publish:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-connector-job-source:0.1.0-20241220.224239-15"
    force "io.mantisrx:mantis-connector-kafka:0.1.0-20241220.224239-564"
    force "io.mantisrx:mantis-control-plane-client:0.1.0-20241220.224239-563"
    force "io.mantisrx:mantis-connector-iceberg:0.1.0-20241220.224239-562"
    force "io.mantisrx:mantis-control-plane-core:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-control-plane-dynamodb:0.1.0-20241220.224239-24"
    force "io.mantisrx:mantis-control-plane-server:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-groupby-sample:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-core:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-jobconnector-sample:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-twitter-sample:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-mantis-publish-sample:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-synthetic-sourcejob:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-examples-wordcount:0.1.0-20241220.224239-556"
    force "io.mantisrx:mantis-publish-core:0.1.0-20241220.224239-556"
    force "io.mantisrx:mantis-examples-sine-function:0.1.0-20241220.224239-556"
    force "io.mantisrx:mantis-publish-netty-guice:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-publish-netty:0.1.0-20241220.224239-556"
    force "io.mantisrx:mantis-server-worker-client:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-source-job-publish:0.1.0-20241220.224239-557"
    force "io.mantisrx:mantis-server-agent:0.1.0-20241220.224239-556"
    force "io.mantisrx:mantis-source-job-kafka:0.1.0-20241220.224239-557"
}

@Andyz26 Andyz26 temporarily deployed to Integrate Pull Request December 20, 2024 22:42 — with GitHub Actions Inactive
@crioux-stripe
Copy link
Collaborator

@Andyz26 I think we'd be pretty keen to move to JDK 17! We're running 11 on the Mantis hosts right now but most of our Java monorepo is 17+. I don't think anything is preventing us from running 17, and we may have prototyped with it IIRC.

@codyrioux
Copy link
Contributor

Writing in to confirm that this compiled and passed all tests on:

  • Apple Macbook Pro M1 Max, Zulu JDK17.
  • Windows Subsystem for Linux with OpenJDK17.
cody@DESKTOP-VBJ42TN:~/src/mantis$ java --version
openjdk 17.0.14 2025-01-21
OpenJDK Runtime Environment (build 17.0.14+7-Ubuntu-124.04)
OpenJDK 64-Bit Server VM (build 17.0.14+7-Ubuntu-124.04, mixed mode, sharing)
cody@DESKTOP-VBJ42TN:~/src/mantis$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:        24.04
Codename:       noble

We've cut a release candidate with version 4.0.0-rc.1 with hopes that @andresgalindo-stripe can test it in Stripe's mantisdev environment.

Copy link
Contributor

@codyrioux codyrioux left a comment

Choose a reason for hiding this comment

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

A few very small comments, nothing blocking.

@andresgalindo-stripe Not to put you in the hot seat but I think I'd like to hear a thumbs up from you before we hit the merge button.

testImplementation libraries.mockitoAll
testImplementation "com.github.tomakehurst:wiremock-jre8:2.21.0"
testImplementation libraries.mockitoCore
testImplementation libraries.wiremockjre8
Copy link
Contributor

Choose a reason for hiding this comment

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

Can probably just use org.wiremock:wiremock now.

private static final ObjectMapper objectMapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
.registerModule(new Jdk8Module());
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I know this introduced features in Jackson like not requiring @JsonProperty in Java 8. As best I can tell these are now all handled via Jackson. We can likely skip the module, but probably no harm in including it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

iirc these were added due to some datetime format test failure.

implementation libraries.slf4jApi

testImplementation libraries.junit4
testImplementation libraries.wiremockjre8
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably can just use regular old wiremock.

@@ -121,8 +121,8 @@ public void testJobDiscoveryFetch() throws IOException {
assertEquals(jobSchedulingInfo.getWorkerAssignments().get(1).getHosts().get(1).getHost(), currentJobWorkers.get().getIngestStageWorkers().getWorkers().get(0).getHost());
}

@Disabled("another flaky test")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know what makes this test flaky? Is it inherent to the code or the test itself?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I'm withdrawing this comment from this review. This PR didn't introduce this test, and is just renaming the annotation from @Ignore to @Disabled.

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.

3 participants