Skip to content

Commit

Permalink
Merge pull request #2698 from github/cklin/diff-informed-status-report
Browse files Browse the repository at this point in the history
Add analysis_is_diff_informed to status report
  • Loading branch information
cklin authored Jan 16, 2025
2 parents 7ae5fc3 + 5889cfd commit 94f08f3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/analyze.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/analyze.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/analyze.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/analyze.test.js.map

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

1 change: 1 addition & 0 deletions src/analyze.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
7 changes: 7 additions & 0 deletions src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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}`,
Expand Down

0 comments on commit 94f08f3

Please sign in to comment.