Skip to content

Commit

Permalink
Stop running ML-powered queries on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Mar 30, 2022
1 parent 894face commit e83a1d4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
5 changes: 4 additions & 1 deletion lib/config-utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/config-utils.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/config-utils.test.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/config-utils.test.ts
Expand Up @@ -1788,7 +1788,7 @@ const mlPoweredQueriesMacro = test.macro({
}`,
});

// macro, isMlPoweredQueriesFlagEnabled, packsInput, queriesInput, versionString
// macro, codeQLVersion, isMlPoweredQueriesFlagEnabled, packsInput, queriesInput, expectedVersionString
test(
mlPoweredQueriesMacro,
"2.7.4",
Expand All @@ -1812,21 +1812,21 @@ test(
true,
undefined,
"security-extended",
"~0.1.0"
process.platform === "win32" ? undefined : "~0.1.0"
);
test(
mlPoweredQueriesMacro,
"2.7.5",
true,
undefined,
"security-and-quality",
"~0.1.0"
process.platform === "win32" ? undefined : "~0.1.0"
);
test(
mlPoweredQueriesMacro,
"2.7.5",
true,
"codeql/javascript-experimental-atm-queries@0.0.1",
"security-and-quality",
"0.0.1"
process.platform === "win32" ? undefined : "0.0.1"
);
2 changes: 2 additions & 0 deletions src/config-utils.ts
Expand Up @@ -299,6 +299,8 @@ async function addBuiltinSuiteQueries(
// opted into the ML-powered queries beta, and a user hasn't already added the ML-powered query
// pack, then add the ML-powered query pack so that we run ML-powered queries.
if (
// Disable ML-powered queries on Windows
process.platform !== "win32" &&
languages.includes("javascript") &&
(found === "security-extended" || found === "security-and-quality") &&
!packs.javascript?.some(
Expand Down

0 comments on commit e83a1d4

Please sign in to comment.