Add analysis_is_diff_informed to status report
This commit is contained in:
parent
7ae5fc37a2
commit
5889cfd499
6 changed files with 12 additions and 2 deletions
1
lib/analyze.js
generated
1
lib/analyze.js
generated
|
|
@ -368,6 +368,7 @@ extensions:
|
|||
// Runs queries and creates sarif files in the given folder
|
||||
async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, diffRangePackDir, automationDetailsId, config, logger, features) {
|
||||
const statusReport = {};
|
||||
statusReport.analysis_is_diff_informed = diffRangePackDir !== undefined;
|
||||
const dataExtensionFlags = diffRangePackDir
|
||||
? [
|
||||
`--additional-packs=${diffRangePackDir}`,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
lib/analyze.test.js
generated
1
lib/analyze.test.js
generated
|
|
@ -116,6 +116,7 @@ const util = __importStar(require("./util"));
|
|||
});
|
||||
const statusReport = await (0, analyze_1.runQueries)(tmpDir, memoryFlag, addSnippetsFlag, threadsFlag, undefined, undefined, config, (0, logging_1.getRunnerLogger)(true), (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.QaTelemetryEnabled]));
|
||||
t.deepEqual(Object.keys(statusReport).sort(), [
|
||||
"analysis_is_diff_informed",
|
||||
`analyze_builtin_queries_${language}_duration_ms`,
|
||||
"event_reports",
|
||||
`interpret_results_${language}_duration_ms`,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -108,6 +108,7 @@ test("status report fields", async (t) => {
|
|||
createFeatures([Feature.QaTelemetryEnabled]),
|
||||
);
|
||||
t.deepEqual(Object.keys(statusReport).sort(), [
|
||||
"analysis_is_diff_informed",
|
||||
`analyze_builtin_queries_${language}_duration_ms`,
|
||||
"event_reports",
|
||||
`interpret_results_${language}_duration_ms`,
|
||||
|
|
|
|||
|
|
@ -108,6 +108,12 @@ export interface QueriesStatusReport {
|
|||
/** Time taken in ms to interpret results for swift (or undefined if this language was not analyzed). */
|
||||
interpret_results_swift_duration_ms?: number;
|
||||
|
||||
/**
|
||||
* Whether the analysis is diff-informed (in the sense that the action generates a diff-range data
|
||||
* extension for the analysis, regardless of whether the data extension is actually used by queries).
|
||||
*/
|
||||
analysis_is_diff_informed?: boolean;
|
||||
|
||||
/** Name of language that errored during analysis (or undefined if no language failed). */
|
||||
analyze_failure_language?: string;
|
||||
/** Reports on discrete events associated with this status report. */
|
||||
|
|
@ -545,6 +551,7 @@ export async function runQueries(
|
|||
): Promise<QueriesStatusReport> {
|
||||
const statusReport: QueriesStatusReport = {};
|
||||
|
||||
statusReport.analysis_is_diff_informed = diffRangePackDir !== undefined;
|
||||
const dataExtensionFlags = diffRangePackDir
|
||||
? [
|
||||
`--additional-packs=${diffRangePackDir}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue