-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-12770: CheckStyle team needs this feature (in order to include Kafka into their regression suite) #10967
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
Conversation
|
You don't actually have to create a new one. :) |
|
@ijuma could you please review this PR ? |
|
Hi, I think I'll be able to get to this next week. |
|
Adding a comment (just to bring this PR to the surface). |
|
@ijuma kindly asking for a review. |
|
@ijuma just trying to get some attention for this. |
0079e1f to
1872cb3
Compare
|
Note: rebased and force-pushed (in order to resolve conflicts). |
1872cb3 to
6c26c22
Compare
6c26c22 to
eee8c62
Compare
eee8c62 to
378008e
Compare
378008e to
202bff8
Compare
|
@ijuma you may want to review this oldtimer💡 |
202bff8 to
b9bfbcd
Compare
b9bfbcd to
1c3afde
Compare
1c3afde to
0bcffb1
Compare
|
This PR is being marked as stale since it has not had any activity in 90 days. If you If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact). If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. |
0bcffb1 to
acdcc49
Compare
chia7712
left a comment
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.
@dejan2609 thanks for this patch.
build.gradle
Outdated
| ] | ||
|
|
||
| // See README.md for this build option details and example of usage | ||
| checkstyleVersion = project.hasProperty('checkstyleVersion') ? checkstyleVersion : versions.checkstyle |
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.
Maybe we should configure the version in dependencies.gradle, similar to how the Scala version is configured? This would ensure consistency and better version management.
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.
Hi @chia7712 and thanks for stopping by ! Please allow me to add some more details below.
Prologue (relevant comment by @romani from CheksTyle team): #10656 (comment)
This (now fairly dusty) PR was created in order to provide CheckStyle team with some handy way to include Kafka project into CheckStyle regression suite. As time went by PR slipped through the cracks (but I decided to stick with it and hence we are having a discussion now 😃).
So, if this PR gets into Kafka trunk CheckStyle team will be able to perform following sequence on their end, i.e. on their CI server (note: X.yz stands for any specific CheckStyle version):
git clone
git checkout trunk
./gradlew check -PcheckstyleVersion=X.yz
As for a place where this change should reside (dependencies.gradle vs. common build options) I am open for a discussion.
Current proposal is aligned with suggestion made by @ijuma here: #10656 (comment)
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.
is there a way to run only chckstyle task ?
I think that "check" will run all validations.
What version of checkstyle is used now?
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.
Current proposal is aligned with suggestion made by @ijuma here: #10656 (comment)
yes, it is good to use ./gradlew check -PcheckstyleVersion=X.yz but it seems @ijuma 's comment is not related to the implementation. Personally, versions.checkstyle is the version used by whole project, and hence I prefer to handle the custom version in the dependencies.gradle
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.
Hi @romani !
Currently Kafka is using Checkstyle version 8.36.2, but today @m1a2st created this (pretty impressive) PR that bumps Checkstyle to 10.20.1: https://github.com/apache/kafka/pull/17999/files#diff-02b139e755ab0e27e0b0a6f9845843ef189116955cc340c49a4022587dbb2b52
As for a checkstyle-only Gradle task: I was under impression that ./gradlew check is performing only Checkstyle checks, but after some experimenting I see that it not the case (maybe I can deal with that in a separate PR).
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.
Personally,
versions.checkstyleis the version used by whole project, and hence I prefer to handle the custom version in the dependencies.gradle
@chia7712 makes sense, dependencies.gradle it is then.
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.
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.
We can improve on fine-grained later. Let's merge something that works.
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.
|
Just a few of tests are failing (but they are unrelated/flaky). |
chia7712
left a comment
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
…iding CheckStyle project-defined dependency version) rationale/notes: * useful for experimenting and regression testing * requested by a CheckStyle team so they can add Kafka into their regression suite
003ce39 to
7a867ee
Compare
|
@chia7712 squashed and force-pushed. Note: few unrelated and flaky tests failed (I guess we are good to go). |
|
@chia7712 thanks for an approval. |
|
Thank you @chia7712, much obliged ! |
|
@romani now that trunk branch CheckStyle is upgraded to a latest and greatest version (#17999 🚀) you are free to add Kafka project into your regression suite with:
Note: given a fact that CheckStyle deals with coding standards you could opt to skip Kafka's tests execution on your end with |
…ding CheckStyle project-defined dependency version) (apache#10967) Reviewers: Ken Huang <[email protected]>, Luke Chen <[email protected]>, Chia-Ping Tsai <[email protected]>
@ijuma please review.
Rationale /related comment: #10656 (comment)

Description:
checkstyleVersionbuild option is introduced (for overriding CheckStyle project-defined dependency version).Note: previous PR #10698 (that contains identical commit) is closed: it somehow slipped through the cracks, so I opted to open a new one.