Add analysis_is_diff_informed to status report

This commit is contained in:
Chuan-kai Lin
2025-01-16 08:50:23 -08:00
parent 7ae5fc37a2
commit 5889cfd499
6 changed files with 12 additions and 2 deletions

View File

@@ -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`,

View File

@@ -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}`,