codeql-action icon indicating copy to clipboard operation
codeql-action copied to clipboard

No Kotlin and Timed out waiting for analysis to finish processing

Open eygraber opened this issue 2 years ago • 11 comments

I added the CodeQL action to my repo and the logs show that Java files are getting processed, but Kotlin files are not.

I also see the following warning in the logs:

Timed out waiting for analysis to finish processing

and the Code Scanning Results hanging.

eygraber avatar Jul 18 '23 06:07 eygraber

Hi @eygraber, thanks for your question. Could you point me to a an actions workflow run that shows the problems you mention? Thanks.

jketema avatar Jul 18 '23 06:07 jketema

https://github.com/eygraber/portal/pull/423

eygraber avatar Jul 18 '23 06:07 eygraber

The time out issue is non-critical. This is GitHub not reporting back on time to the action that the results have been uploaded. If the scan results should still show up, but it might take a bit longer.

To diagnose the Kotlin problem further, I will need some CodeQL debugging artifacts. How to get these is described here: https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/logs-are-not-detailed-enough.

jketema avatar Jul 18 '23 07:07 jketema

~~https://github.com/eygraber/portal/actions/runs/5583912286?pr=423~~

eygraber avatar Jul 18 '23 07:07 eygraber

Sorry the correct one should be https://github.com/eygraber/portal/actions/runs/5583912294?pr=423

eygraber avatar Jul 18 '23 07:07 eygraber

Note that for Gradle the --no-deamon option needs to be specified. See here: https://docs.github.com/en/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases#specifying-build-commands under "Java project built using Gradle".

jketema avatar Jul 18 '23 07:07 jketema

That's specified in the environment variable with -Dorg.gradle.daemon=false.

I have another repo that is very similar where this works https://github.com/eygraber/uri-kmp/actions/runs/5583782037

eygraber avatar Jul 18 '23 12:07 eygraber

Is it doing some kind of build artifact caching somewhere, because the logs contain suspiciously little.

jketema avatar Jul 18 '23 13:07 jketema

It could be using gradle's cache. I'll try a build disabling it

eygraber avatar Jul 18 '23 13:07 eygraber

Looks like that was the issue, now the Kotlin lines are getting processed.

eygraber avatar Jul 18 '23 16:07 eygraber

Good to hear! Shall we close this issue?

jketema avatar Jul 18 '23 16:07 jketema