Skip to content

Commit e3625c9

Browse files
committed
MRVA execution not behind canary
1 parent 6f37f17 commit e3625c9

File tree

4 files changed

+14
-30
lines changed

4 files changed

+14
-30
lines changed

docs/test-plan.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ choose to go through some of the Optional Test Cases.
1818

1919
## Required Test Cases
2020

21-
### Pre-requisites
22-
23-
- Flip the `codeQL.canary` flag. This will enable MRVA in the extension.
24-
2521
### Test Case 1: MRVA - Running a problem path query and viewing results
2622

2723
1. Open the [UnsafeJQueryPlugin query](https://github.com/github/codeql/blob/main/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql).

extensions/ql-vscode/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -978,11 +978,10 @@
978978
},
979979
{
980980
"command": "codeQL.runVariantAnalysis",
981-
"when": "config.codeQL.canary && editorLangId == ql && resourceExtname == .ql"
981+
"when": "editorLangId == ql && resourceExtname == .ql"
982982
},
983983
{
984-
"command": "codeQL.exportSelectedVariantAnalysisResults",
985-
"when": "config.codeQL.canary"
984+
"command": "codeQL.exportSelectedVariantAnalysisResults"
986985
},
987986
{
988987
"command": "codeQL.runQueries",
@@ -1236,7 +1235,7 @@
12361235
},
12371236
{
12381237
"command": "codeQL.runVariantAnalysis",
1239-
"when": "config.codeQL.canary && editorLangId == ql && resourceExtname == .ql"
1238+
"when": "editorLangId == ql && resourceExtname == .ql"
12401239
},
12411240
{
12421241
"command": "codeQL.viewAst",

extensions/ql-vscode/src/extension.ts

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,23 +1134,17 @@ async function activateWithInstalledDistribution(
11341134
token: CancellationToken,
11351135
uri: Uri | undefined,
11361136
) => {
1137-
if (isCanary()) {
1138-
progress({
1139-
maxStep: 5,
1140-
step: 0,
1141-
message: "Getting credentials",
1142-
});
1137+
progress({
1138+
maxStep: 5,
1139+
step: 0,
1140+
message: "Getting credentials",
1141+
});
11431142

1144-
await variantAnalysisManager.runVariantAnalysis(
1145-
uri || window.activeTextEditor?.document.uri,
1146-
progress,
1147-
token,
1148-
);
1149-
} else {
1150-
throw new Error(
1151-
"Variant analysis requires the CodeQL Canary version to run.",
1152-
);
1153-
}
1143+
await variantAnalysisManager.runVariantAnalysis(
1144+
uri || window.activeTextEditor?.document.uri,
1145+
progress,
1146+
token,
1147+
);
11541148
},
11551149
{
11561150
title: "Run Variant Analysis",

extensions/ql-vscode/test/vscode-tests/cli-integration/variant-analysis/variant-analysis-submission-integration.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { resolve } from "path";
33
import {
44
authentication,
55
commands,
6-
ConfigurationTarget,
76
extensions,
87
TextDocument,
98
window,
@@ -13,10 +12,7 @@ import {
1312
import { CodeQLExtensionInterface } from "../../../../src/extension";
1413
import { MockGitHubApiServer } from "../../../../src/mocks/mock-gh-api-server";
1514
import { mockedQuickPickItem } from "../../utils/mocking.helpers";
16-
import {
17-
CANARY_FEATURES,
18-
setRemoteControllerRepo,
19-
} from "../../../../src/config";
15+
import { setRemoteControllerRepo } from "../../../../src/config";
2016

2117
jest.setTimeout(30_000);
2218

@@ -39,7 +35,6 @@ describe("Variant Analysis Submission Integration", () => {
3935
let showErrorMessageSpy: jest.SpiedFunction<typeof window.showErrorMessage>;
4036

4137
beforeEach(async () => {
42-
await CANARY_FEATURES.updateValue(true, ConfigurationTarget.Global);
4338
await setRemoteControllerRepo("github/vscode-codeql");
4439

4540
jest.spyOn(authentication, "getSession").mockResolvedValue({

0 commit comments

Comments
 (0)