Disable UsePerfData for resolveExtractor - #4162
Conversation
26b16d8 to
9691115
Compare
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Copilot review overview
🟡 Changes recommended
Add a unit test verifying that resolveExtractor passes the exact JVM argument to ToolRunner.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Disables JVM performance data for codeql resolve extractor to reduce concurrent-invocation race failures.
Changes:
- Adds
-J-XX:-UsePerfDatato extractor resolution. - Updates the generated JavaScript bundle.
| File | Description |
|---|---|
src/codeql.ts |
Disables JVM performance data during extractor resolution; a focused unit test was requested. |
Files excluded by content exclusion policy (1)
- lib/entry-points.js
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Happy to merge this for now as a workaround, but there might be other cases where the JVM will also log messages to stdout, breaking JSON parsing. So consider a more robust fix e.g. passing something like -J-Xlog:all=off:stdout and -J-Xlog:all=warning:stderr to all CLI commands. The fix should probably go in the launcher for future releases, but it is probably worth having the Action pass these flags for previous CLI versions.
@henrymercer Agreed; this is just a quick fix/improvement that targets the immediate issue directly. Redirecting all of the JVM output is probably a good idea as well, but we should check that we don't have any error matching in the Action (e.g. in |

Disables
UsePerfDataforcodeql resolve extractorcalls by default. This is not needed for the command to work correctly and reduces the risk of failures resulting from a race condition if the CLI is invoked concurrently (example). This is currently possible if we are analysing multiple languages at the same time, because we invokecodeql resolve extractorin parallel for each language.We could consider disabling
UsePerfDatafor other CLI calls as well, but this PR is a minimal change to resolve the immediate issue we have observed in our CI that sometimes occurs as a result of the possible race condition.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.upload-sarifaction.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist