vscode-codeql: CodeQL Extension submits empty block to multi-repository variant analysis (MRVA)

Describe the bug When I select a query for MRVA, the extension submits an empty bundle. Every file that should have been included in the bundle, like my query, the qlpack.yml file, and the files related to all dependencies, get “ignored” because they “are outside the pack root” — as logged by the extension when it runs codeql pack bundle. As a result, and as one would expect, the MRVA jobs fail.

I have tried this with the example queries (no matter the language) in the vscode-codeql-starter repository too (after launching VSCode from their workspace) but even that gave me the same issue.

Any help will be highly appreciated.

Version CodeQL CLI: 2.22.1 CodeQL VSCode Extension version: 1.17.3 VSCode version: 1.101.2

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@koesie10 yes it does:

Short path was not resolved to long path, using native method Expanded short path C:\Users\A-BCDE~1\AppData\Local\Temp\queries_-30528-get429If3v26 to C:\Users\a-bcdefgh\AppData\Local\Temp\queries_-30528-get429If3v2

@mrigankpawagi I’ve implemented a fix for this issue in this branch and have kicked off an Actions run to produce a VSIX file. You should be able to download the vscode-codeql-extension artifact from this Actions run, which should include a .vsix file. You can install this VSIX file in VS Code. When you run a variant analysis using this version of the extension, does it correctly produce the query pack and result in a successful MRVA?

@mrigankpawagi Thanks for the updated logs! Those confirm that the issue is with 8.3 short filenames. I’m trying to investigate whether there’s a solution we can use for this, and it seems like we should be able to call the Windows function GetLongPathNameW from the extension to determine the full path name, which should fix the issue. I’ll test whether this works and let you know.