-
Notifications
You must be signed in to change notification settings - Fork 205
[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
base: master
Are you sure you want to change the base?
Conversation
@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. |
Test Results142 files ±0 142 suites ±0 8m 1s ⏱️ -27s Results for commit 1909c32. ± Comparison against base commit 35a0826. This pull request skips 1 test.
♻️ This comment has been updated with latest results. |
Uploaded ArtifactsTo use these artifacts in your Gradle project, paste the following lines in your build.gradle.
|
@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. |
Writing in to confirm that this compiled and passed all tests on:
We've cut a release candidate with version |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
Context
Upgrade project to target JDK17.
Checklist
./gradlew build
compiles code correctly./gradlew test
passes all tests