You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Pankraz76 (via GitHub)" <gi...@apache.org> on 2025/07/30 07:21:55 UTC

[PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Pankraz76 opened a new pull request, #20259:
URL: https://github.com/apache/kafka/pull/20259

   enabler for: 
   
   - https://github.com/apache/kafka/pull/20219


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2244732262


##########
gradle/.qa/checkstyle.gradle:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+project.apply plugin: "checkstyle"
+
+checkstyle {
+    configDirectory = rootProject.layout.projectDirectory.dir("checkstyle")
+    configProperties = [importControlFile: "import-control.xml"]
+    toolVersion = versions.checkstyle
+}
+
+configure(checkstyleMain) {
+    group = 'Verification'
+    description = 'Run checkstyle on all main Java sources'
+}
+
+configure(checkstyleTest) {
+    group = 'Verification'
+    description = 'Run checkstyle on all test Java sources'
+}
+
+test.dependsOn(checkstyleMain, checkstyleTest)

Review Comment:
   ```suggestion
   check.dependsOn(checkstyleMain, checkstyleTest)
   ```
   never seen this been executed on the test goal. 
   
   - https://github.com/apache/kafka/pull/20219/files#r2244732670
   
   like done in junit:
   
   - https://github.com/junit-team/junit-framework/pull/4708
   - https://github.com/junit-team/junit-framework/pull/4708/files#diff-b6c0ec6facb84213a6f79b874524c6093403e575490d547a04ac8e6102d33cbaR317



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3140713917

   seem this to be the breaking change. SOC always wins.
   
   - https://github.com/apache/kafka/pull/20278


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2244732262


##########
gradle/.qa/checkstyle.gradle:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+project.apply plugin: "checkstyle"
+
+checkstyle {
+    configDirectory = rootProject.layout.projectDirectory.dir("checkstyle")
+    configProperties = [importControlFile: "import-control.xml"]
+    toolVersion = versions.checkstyle
+}
+
+configure(checkstyleMain) {
+    group = 'Verification'
+    description = 'Run checkstyle on all main Java sources'
+}
+
+configure(checkstyleTest) {
+    group = 'Verification'
+    description = 'Run checkstyle on all test Java sources'
+}
+
+test.dependsOn(checkstyleMain, checkstyleTest)

Review Comment:
   ```suggestion
   check.dependsOn(checkstyleMain, checkstyleTest)
   ```
   never seen this been executed on the test goal. 
   
   - 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2244732262


##########
gradle/.qa/checkstyle.gradle:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+project.apply plugin: "checkstyle"
+
+checkstyle {
+    configDirectory = rootProject.layout.projectDirectory.dir("checkstyle")
+    configProperties = [importControlFile: "import-control.xml"]
+    toolVersion = versions.checkstyle
+}
+
+configure(checkstyleMain) {
+    group = 'Verification'
+    description = 'Run checkstyle on all main Java sources'
+}
+
+configure(checkstyleTest) {
+    group = 'Verification'
+    description = 'Run checkstyle on all test Java sources'
+}
+
+test.dependsOn(checkstyleMain, checkstyleTest)

Review Comment:
   ```suggestion
   check.dependsOn(checkstyleMain, checkstyleTest)
   ```
   never seen this been executed on the test goal. 
   
   - https://github.com/apache/kafka/pull/20219/files#r2244732670



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle root config into dedicated sections [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3154055194

   BUILD SUCCESSFUL in 1m 31s
   
   kindly request some feedback. Should we split this as well extracting the qa plugins in next pr?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2241769960


##########
gradle/quality-assurance/spotless.gradle:
##########
@@ -0,0 +1,30 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+project.apply plugin: "com.diffplug.spotless"
+
+spotless {
+    java {
+        targetExclude('**/generated/**/*.java', '**/generated-test/**/*.java')

Review Comment:
   assuming there is no format and spot only is doing the import order:
   
   <img width="1276" height="668" alt="Image" src="https://github.com/user-attachments/assets/702896ac-57d0-461d-8508-e13f12723c87" />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2241769960


##########
gradle/quality-assurance/spotless.gradle:
##########
@@ -0,0 +1,30 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+project.apply plugin: "com.diffplug.spotless"
+
+spotless {
+    java {
+        targetExclude('**/generated/**/*.java', '**/generated-test/**/*.java')

Review Comment:
   assuming there is not format and spot only is doing the import order:
   
   <img width="1276" height="668" alt="Image" src="https://github.com/user-attachments/assets/702896ac-57d0-461d-8508-e13f12723c87" />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3135171468

   @ravikalla
   @m1a2st
   
   is this dedication/extraction any good? 
   
   Can you help me moving the remaining config? its not working inside the spotbugs file.
   
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle root config into dedicated sections [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 closed pull request #20259: MINOR: Split gradle root config into dedicated sections
URL: https://github.com/apache/kafka/pull/20259


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2241809951


##########
build.gradle:
##########
@@ -2812,14 +2781,6 @@ project(':streams:streams-scala') {
     dependsOn 'copyDependantLibs'
   }
 
-  apply plugin: 'com.diffplug.spotless'
-  spotless {
-    scala {
-      target '**/*.scala'
-      scalafmt("$versions.scalafmt").configFile('../../checkstyle/.scalafmt.conf').scalaMajorVersion(versions.baseScala)
-      licenseHeaderFile '../../checkstyle/java.header', 'package'

Review Comment:
   seems not to work:
   
   <img width="1484" height="708" alt="Image" src="https://github.com/user-attachments/assets/8317620c-4481-43b6-82c3-a620877c81ea" />



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2244732262


##########
gradle/.qa/checkstyle.gradle:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+project.apply plugin: "checkstyle"
+
+checkstyle {
+    configDirectory = rootProject.layout.projectDirectory.dir("checkstyle")
+    configProperties = [importControlFile: "import-control.xml"]
+    toolVersion = versions.checkstyle
+}
+
+configure(checkstyleMain) {
+    group = 'Verification'
+    description = 'Run checkstyle on all main Java sources'
+}
+
+configure(checkstyleTest) {
+    group = 'Verification'
+    description = 'Run checkstyle on all test Java sources'
+}
+
+test.dependsOn(checkstyleMain, checkstyleTest)

Review Comment:
   ```suggestion
   check.dependsOn(checkstyleMain, checkstyleTest)
   ```
   "normally" not seen being bound to the `test` goal. 
   
   - https://github.com/apache/kafka/pull/20219/files#r2244732670
   
   like done in junit:
   
   - https://github.com/junit-team/junit-framework/pull/4708
   - https://github.com/junit-team/junit-framework/pull/4708/files#diff-b6c0ec6facb84213a6f79b874524c6093403e575490d547a04ac8e6102d33cbaR317



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3138855152

   thanks for approval will fix ci.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Separate gradle config of `QA` plugins [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on code in PR #20259:
URL: https://github.com/apache/kafka/pull/20259#discussion_r2241774559


##########
.github/actions/run-gradle/action.yml:
##########
@@ -86,7 +86,7 @@ runs:
       run: |
         set +e
         ./.github/scripts/thread-dump.sh &
-        timeout ${TIMEOUT_MINUTES}m ./gradlew --build-cache --continue --no-scan \
+        timeout ${TIMEOUT_MINUTES}m ./gradlew $TEST_TASK --build-cache --continue --no-scan \

Review Comment:
   could dedicate this change into PR as well, please let mw know.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle plugin config of `quality gates` (spotless, spotbugs, and checkstyle) into dedicated files [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3139093521

   item:
   
   Traceback (most recent call last):
     File "/home/runner/work/kafka/kafka/.github/scripts/junit.py", line 347, in <module>
       exit_code = get_env("GRADLE_TEST_EXIT_CODE", int)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/runner/work/kafka/kafka/.github/scripts/junit.py", line 54, in get_env
       return fn(value)
              ^^^^^^^^^


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Split gradle root config into dedicated sections [kafka]

Posted by "Pankraz76 (via GitHub)" <gi...@apache.org>.
Pankraz76 commented on PR #20259:
URL: https://github.com/apache/kafka/pull/20259#issuecomment-3216289393

   i can confirm no one cares about the code quality at all, facing the masses of unused declaration and flaws around. Good luck.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org