chia7712 commented on code in PR #17066:
URL: https://github.com/apache/kafka/pull/17066#discussion_r1744071589


##########
build.gradle:
##########
@@ -882,6 +882,7 @@ project(':server') {
     inputs.property "commitId", commitId
     inputs.property "version", version
     outputs.file receiptFile
+    outputs.cacheIf { true }

Review Comment:
   That means the jars could have old `kafka-version.properties` when its 
module has no change. This change is for CI, right? we want to cache the jar if 
no source files change. Maybe we can enable the `cacheIf` when the env 
`GITHUB_ACTIONS` exists. Otherwise, we keep origin behavior. WDYT?



##########
.github/workflows/build.yml:
##########
@@ -94,18 +99,22 @@ jobs:
         with:
           java-version: ${{ matrix.java }}
           gradle-cache-read-only: ${{ inputs.gradle-cache-read-only }}
+          gradle-cache-write-only: ${{ inputs.gradle-cache-write-only }}
           develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
       - name: Test
         # Gradle flags
         # --build-cache:  Let Gradle restore the build cache
         # --scan:         Attempt to publish build scans in PRs. This will 
only work on PRs from apache/kafka, not public forks.
         # --continue:     Keep running even if a test fails
+        # -PcommitId      Prevent the Git SHA being written into the jar files 
(which breaks caching)
         timeout-minutes: 180  # 3 hours
+        continue-on-error: true
         run: |
           ./gradlew --build-cache --scan --continue \
           -PtestLoggingEvents=started,passed,skipped,failed \
-          -PignoreFailures=true -PmaxParallelForks=2 \
+          -PmaxParallelForks=2 \
           -PmaxTestRetries=1 -PmaxTestRetryFailures=10 \
+          -PcommitId=xxxxxxxxxxxxxxxx \

Review Comment:
   this is for testing?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to