Change public occurrences of "remote queries" (#1215)

This commit is contained in:
Shati Patel
2022-03-17 10:14:32 +00:00
committed by GitHub
parent f36048cc95
commit 2a8a90bdfc
10 changed files with 29 additions and 29 deletions

View File

@@ -258,7 +258,7 @@
"scope": "application",
"description": "Specifies whether or not to write telemetry events to the extension log."
},
"codeQL.remoteQueries.repositoryLists": {
"codeQL.variantAnalysis.repositoryLists": {
"type": [
"object",
null
@@ -272,14 +272,14 @@
}
},
"default": null,
"markdownDescription": "[For internal use only] Lists of GitHub repositories that you want to query remotely. This should be a JSON object where each key is a user-specified name for this repository list, and the value is an array of GitHub repositories (of the form `<owner>/<repo>`)."
"markdownDescription": "[For internal use only] Lists of GitHub repositories that you want to run variant analysis against. This should be a JSON object where each key is a user-specified name for this repository list, and the value is an array of GitHub repositories (of the form `<owner>/<repo>`)."
},
"codeQL.remoteQueries.controllerRepo": {
"codeQL.variantAnalysis.controllerRepo": {
"type": "string",
"default": "",
"pattern": "^$|^(?:[a-zA-Z0-9]+-)*[a-zA-Z0-9]+/[a-zA-Z0-9-_]+$",
"patternErrorMessage": "Please enter a valid GitHub repository",
"markdownDescription": "[For internal use only] The name of the GitHub repository where you can view the progress and results of the \"Run Remote query\" command. The repository should be of the form `<owner>/<repo>`)."
"markdownDescription": "[For internal use only] The name of the GitHub repository where you can view the progress and results of the \"Run Variant Analysis\" command. The repository should be of the form `<owner>/<repo>`)."
}
}
},
@@ -297,8 +297,8 @@
"title": "CodeQL: Run Query on Multiple Databases"
},
{
"command": "codeQL.runRemoteQuery",
"title": "CodeQL: Run Remote Query"
"command": "codeQL.runVariantAnalysis",
"title": "CodeQL: Run Variant Analysis"
},
{
"command": "codeQL.runQueries",
@@ -542,7 +542,7 @@
},
{
"command": "codeQLQueryHistory.openOnGithub",
"title": "Open Remote Query on GitHub"
"title": "Open Variant Analysis on GitHub"
},
{
"command": "codeQLQueryResults.nextPathStep",
@@ -798,7 +798,7 @@
"when": "resourceLangId == ql && resourceExtname == .ql"
},
{
"command": "codeQL.runRemoteQuery",
"command": "codeQL.runVariantAnalysis",
"when": "config.codeQL.canary && editorLangId == ql && resourceExtname == .ql"
},
{
@@ -976,7 +976,7 @@
"when": "editorLangId == ql && resourceExtname == .ql"
},
{
"command": "codeQL.runRemoteQuery",
"command": "codeQL.runVariantAnalysis",
"when": "config.codeQL.canary && editorLangId == ql && resourceExtname == .ql"
},
{

View File

@@ -323,10 +323,10 @@ export function isCanary() {
export const NO_CACHE_AST_VIEWER = new Setting('disableCache', AST_VIEWER_SETTING);
// Settings for remote queries
const REMOTE_QUERIES_SETTING = new Setting('remoteQueries', ROOT_SETTING);
const REMOTE_QUERIES_SETTING = new Setting('variantAnalysis', ROOT_SETTING);
/**
* Lists of GitHub repositories that you want to query remotely via the "Run Remote query" command.
* Lists of GitHub repositories that you want to query remotely via the "Run Variant Analysis" command.
* Note: This command is only available for internal users.
*
* This setting should be a JSON object where each key is a user-specified name (string),
@@ -343,7 +343,7 @@ export async function setRemoteRepositoryLists(lists: Record<string, string[]> |
}
/**
* The name of the "controller" repository that you want to use with the "Run Remote query" command.
* The name of the "controller" repository that you want to use with the "Run Variant Analysis" command.
* Note: This command is only available for internal users.
*
* This setting should be a GitHub repository of the form `<owner>/<repo>`.

View File

@@ -844,9 +844,9 @@ async function activateWithInstalledDistribution(
registerRemoteQueryTextProvider();
// The "runRemoteQuery" command is internal-only.
// The "runVariantAnalysis" command is internal-only.
ctx.subscriptions.push(
commandRunnerWithProgress('codeQL.runRemoteQuery', async (
commandRunnerWithProgress('codeQL.runVariantAnalysis', async (
progress: ProgressCallback,
token: CancellationToken,
uri: Uri | undefined
@@ -866,7 +866,7 @@ async function activateWithInstalledDistribution(
throw new Error('Remote queries require the CodeQL Canary version to run.');
}
}, {
title: 'Run Remote Query',
title: 'Run Variant Analysis',
cancellable: true
})
);

View File

@@ -577,7 +577,7 @@ export class QueryHistoryManager extends DisposableObject {
this.treeDataProvider.remove(item);
void logger.log(`Deleted ${item.label}.`);
if (item.status === QueryStatus.InProgress) {
void logger.log('The remote query is still running on GitHub Actions. To cancel there, you must go to the query run in your browser.');
void logger.log('The variant analysis is still running on GitHub Actions. To cancel there, you must go to the workflow run in your browser.');
}
this._onDidRemoveQueryItem.fire(item);

View File

@@ -267,18 +267,18 @@ function getWorkflowError(conclusion: string | null): string {
}
if (conclusion === 'cancelled') {
return 'The remote query execution was cancelled.';
return 'Variant analysis execution was cancelled.';
}
if (conclusion === 'timed_out') {
return 'The remote query execution timed out.';
return 'Variant analysis execution timed out.';
}
if (conclusion === 'failure') {
// TODO: Get the actual error from the workflow or potentially
// from an artifact from the action itself.
return 'The remote query execution has failed.';
return 'Variant analysis execution has failed.';
}
return `Unexpected query execution conclusion: ${conclusion}`;
return `Unexpected variant analysis execution conclusion: ${conclusion}`;
}

View File

@@ -91,7 +91,7 @@ export class RemoteQueriesInterfaceManager {
const { ctx } = this;
const panel = (this.panel = Window.createWebviewPanel(
'remoteQueriesView',
'Remote Query Results',
'CodeQL Query Results',
{ viewColumn: ViewColumn.Active, preserveFocus: true },
{
enableScripts: true,
@@ -186,7 +186,7 @@ export class RemoteQueriesInterfaceManager {
break;
case 'remoteQueryError':
void this.logger.log(
`Remote query error: ${msg.error}`
`Variant analysis error: ${msg.error}`
);
break;
case 'openFile':

View File

@@ -157,11 +157,11 @@ export class RemoteQueriesManager extends DisposableObject {
} else if (queryWorkflowResult.status === 'CompletedUnsuccessfully') {
queryItem.failureReason = queryWorkflowResult.error;
queryItem.status = QueryStatus.Failed;
void showAndLogErrorMessage(`Remote query execution failed. Error: ${queryWorkflowResult.error}`);
void showAndLogErrorMessage(`Variant analysis execution failed. Error: ${queryWorkflowResult.error}`);
} else if (queryWorkflowResult.status === 'Cancelled') {
queryItem.failureReason = 'Cancelled';
queryItem.status = QueryStatus.Failed;
void showAndLogErrorMessage('Remote query monitoring was cancelled');
void showAndLogErrorMessage('Variant analysis monitoring was cancelled');
} else if (queryWorkflowResult.status === 'InProgress') {
// Should not get here. Only including this to ensure `assertNever` uses proper type checking.
void showAndLogErrorMessage(`Unexpected status: ${queryWorkflowResult.status}`);

View File

@@ -49,7 +49,7 @@ export class RemoteQueriesMonitor {
attemptCount++;
}
void this.logger.log('Remote query monitoring timed out after 2 days');
void this.logger.log('Variant analysis monitoring timed out after 2 days');
return { status: 'Cancelled' };
}

View File

@@ -65,7 +65,7 @@ export async function getRepositories(): Promise<string[] | undefined> {
const quickpick = await window.showQuickPick<RepoListQuickPickItem>(
quickPickItems,
{
placeHolder: 'Select a repository list. You can define repository lists in the `codeQL.remoteQueries.repositoryLists` setting.',
placeHolder: 'Select a repository list. You can define repository lists in the `codeQL.variantAnalysis.repositoryLists` setting.',
ignoreFocusOut: true,
});
if (quickpick?.repoList.length) {
@@ -80,7 +80,7 @@ export async function getRepositories(): Promise<string[] | undefined> {
const remoteRepo = await window.showInputBox({
title: 'Enter a GitHub repository in the format <owner>/<repo> (e.g. github/codeql)',
placeHolder: '<owner>/<repo>',
prompt: 'Tip: you can save frequently used repositories in the `codeQL.remoteQueries.repositoryLists` setting',
prompt: 'Tip: you can save frequently used repositories in the `codeQL.variantAnalysis.repositoryLists` setting',
ignoreFocusOut: true,
});
if (!remoteRepo) {
@@ -430,7 +430,7 @@ async function ensureNameAndSuite(queryPackDir: string, packRelativePath: string
qlpack.name = QUERY_PACK_NAME;
qlpack.defaultSuite = [{
description: 'Query suite for remote query'
description: 'Query suite for variant analysis'
}, {
query: packRelativePath.replace(/\\/g, '/')
}];

View File

@@ -279,7 +279,7 @@ describe('Remote queries', function() {
},
library: false,
defaultSuite: [{
description: 'Query suite for remote query'
description: 'Query suite for variant analysis'
}, {
query: queryPath
}]