lhotari commented on code in PR #25932:
URL: https://github.com/apache/pulsar/pull/25932#discussion_r3357364410


##########
.github/workflows/codeql.yaml:
##########
@@ -52,29 +49,19 @@ jobs:
         language: [ 'java-kotlin' ]
 
     steps:
-      - name: Set up JDK
-        uses: actions/setup-java@v5
-        with:
-          distribution: ${{ env.JDK_DISTRIBUTION }}
-          java-version: 21
-
       - name: Checkout repository
         uses: actions/checkout@v6
 
-      - name: Setup Gradle
-        uses: ./.github/actions/setup-gradle
-        with:
-          develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
-          cache-read-only: true
-
       # Initializes the CodeQL tools for scanning.
+      # Use build-mode: none so CodeQL extracts the source directly instead of
+      # tracing a Gradle build. A traced build fails intermittently because the
+      # Gradle build cache restores compileJava/compileKotlin FROM-CACHE, so no
+      # compiler runs and CodeQL sees no source ("could not process any of 
it").
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v4
         with:
           languages: ${{ matrix.language }}
-
-      - name: Build Java code
-        run: ./gradlew assemble
+          build-mode: none

Review Comment:
   Please make similar changes to the CodeQL step in `pulsar-ci.yaml`



-- 
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