-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
KAFKA-10787: Apply spotless to transaction-coordinator and server-common #16172
KAFKA-10787: Apply spotless to transaction-coordinator and server-common #16172
Conversation
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.
LGTM
@gongxuanzhang Could you please update the description to share the tips of "how to test this PR"? |
@chia7712 I changed it , plz take a look |
@gongxuanzhang Could you please check the build error? |
It seems we are facing Trolley problem :(
Given that we are going to get rid of JDK 8 and there is example of ignoring JDK8 Maybe we can remove the support of JDK8 from spotless!
@gongxuanzhang WDYT? |
I agree remove support JDK8. |
@gongxuanzhang please fix the conflicts |
@chia7712 complete |
9fb6d4e
to
f2aafcc
Compare
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.
@gongxuanzhang Could you please rebase code to trigger QA again?
build.gradle
Outdated
@@ -853,8 +851,8 @@ subprojects { | |||
skipProjects = [ ":jmh-benchmarks", ":trogdor" ] | |||
skipConfigurations = [ "zinc" ] | |||
} | |||
|
|||
if(JavaVersion.current().isJava11Compatible() && project.path !in excludedSpotlessModules) { | |||
// current spotless work error in JDK21,upgrade spotless version when kafka drop support JDK8 |
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.
the task `removeUnusedImports` is implemented by google-java-format, and unfortunately the google-java-format version used by spotless 6.14.0 can't work with JDK 21. Hence, we apply spotless tasks only if the env is either JDK11 or JDK17
WDYT?
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.
i will update comment
I have called QA again |
@gongxuanzhang could you please rebase code to include #16249 |
Okay, next we wait for CI @chia7712 |
…on (apache#16172) Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Brief Introduction
This PR is sub PR from #16097.
That Pr we add spotless plugin to build.gradle.
In order not to modify large-scale code, we plan apply it step by step in module.
The first is 'transaction-coordinator' 'server-common'.
Module 'transaction-coordinator' meets the requirements(only have 2 Java class) so apply it directly.
This PR update 'server-common' module code review import order.
We will apply
spotless
to all module in futureHow to test:
We can run
./gradlew spotlessCheck
check for code that does not meet requirements.If we get report that error , we can run
./gradlew spotlessApply
to review my code.In this PR, all change(exclude
build.gradle
)by
spotlessApply`