You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release 2.5.1 CodeQL CLI introduces a $CODEQL_SCRATCH_DIR environment variable that is intended for the tracer to use when it needs a scratch location that is not language specific.
Unfortunately for technical reasons its value is actually set to something that includes a language tag. This creates trouble when the action attempts to trace multiple languages at the same time, and the various codeql database trace-command invocation disagree about how it should be set.
/home/runner/work/_temp/codeql_databases/java: Running in /home/runner/work/codeql-action/codeql-action: [/home/runner/runners/2.278.0/externals/node12/bin/node, /home/runner/work/_temp/codeql_databases/java/working/tracer-env.js, /home/runner/work/_temp/codeql_databases/java/working/env.tmp]
[2021-04-19 17:19:06] [build-stdout] /home/runner/work/_temp/codeql_databases/java/working/env.tmp
Error: Incompatible values in environment parameter CODEQL_SCRATCH_DIR: /home/runner/work/_temp/codeql_databases/cpp/working/codeql-scratch and /home/runner/work/_temp/codeql_databases/csharp/working/codeql-scratch
Error: Incompatible values in environment parameter CODEQL_SCRATCH_DIR: /home/runner/work/_temp/codeql_databases/cpp/working/codeql-scratch and /home/runner/work/_temp/codeql_databases/csharp/working/codeql-scratch
at concatTracerConfigs (/home/runner/work/codeql-action/action/lib/tracer-config.js:65:27)
at Object.getCombinedTracerConfig (/home/runner/work/codeql-action/action/lib/tracer-config.js:134:30)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.runInit (/home/runner/work/codeql-action/action/lib/init.js:43:12)
at async run (/home/runner/work/codeql-action/action/lib/init-action.js:100:30)
at async runWrapper (/home/runner/work/codeql-action/action/lib/init-action.js:121:9)
The best way out of this seems to be to special-case the name CODEQL_SCRATCH_DIR in the runner and let it generate an initially-empty-but-existing scratch location of its own, ignoring what trace-command wants it to be.
This blocks the release of a bundle that contains 2.5.1.
The text was updated successfully, but these errors were encountered:
So far this was handled by rolling back $CODEQL_SCRATCH_DIR from the CLI in release 2.5.2.
It is still not clearly decided to which degree we need new CLIs to be compatible with old versions of the action and/or runner, but it might be useful for a future strategy to prepare the action/runner to accept diverging values from the CLI and substitute its own idea of where a useful scratch directory would be.
This was eventually fixed a few versions later, by means of the CLI detecting it was being run from the Action, and adapting the value accordingly.
Later yet, the action will switch to using the CLI's native support for multi-language tracing -- so there's nothing specific to be done for $CODEQL_SCRATCH_DIR in the action.
Release 2.5.1 CodeQL CLI introduces a
$CODEQL_SCRATCH_DIRenvironment variable that is intended for the tracer to use when it needs a scratch location that is not language specific.Unfortunately for technical reasons its value is actually set to something that includes a language tag. This creates trouble when the action attempts to trace multiple languages at the same time, and the various
codeql database trace-commandinvocation disagree about how it should be set.(https://github.com/github/codeql-action/pull/450/checks?check_run_id=2383141232)
The best way out of this seems to be to special-case the name
CODEQL_SCRATCH_DIRin the runner and let it generate an initially-empty-but-existing scratch location of its own, ignoring whattrace-commandwants it to be.This blocks the release of a bundle that contains 2.5.1.
The text was updated successfully, but these errors were encountered: