Record per-language bundle fallbacks on the download source

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-09-24 15:23:35 +01:00
parent ffc453273e
commit caa2cae2fb
4 changed files with 16 additions and 5 deletions

9
lib/entry-points.js generated
View File

@@ -152647,6 +152647,9 @@ var downloadCodeQL = async function(source, apiDetails, tarVersion, tempDir, log
statusReport: bundle.kind === "per-language" ? {
...statusReport,
perLanguage: { tools_bundle_language: bundle.language }
} : source.perLanguageBundleFallback ? {
...statusReport,
perLanguage: { tools_per_language_bundle_fallback: true }
} : statusReport
};
};
@@ -152784,7 +152787,8 @@ async function downloadCodeQLBundle(action, source, apiDetails, tarVersion, temp
const result = await downloadCodeQL(
{
...source,
bundle: { kind: "combined", url: bundle.combinedBundleURL }
bundle: { kind: "combined", url: bundle.combinedBundleURL },
perLanguageBundleFallback: true
},
apiDetails,
tarVersion,
@@ -152795,8 +152799,7 @@ async function downloadCodeQLBundle(action, source, apiDetails, tarVersion, temp
...result,
statusReport: {
...result.statusReport,
totalDurationMs: durationMsSince(startTime),
perLanguage: { tools_per_language_bundle_fallback: true }
totalDurationMs: durationMsSince(startTime)
}
};
}

View File

@@ -27,6 +27,8 @@ export interface CodeQLDownloadSource {
cliVersion?: string;
/** Resolved version for telemetry, independent of whether the bundle can be cached. */
toolsVersion: string;
/** The release lacks the eligible per-language bundle, so we selected the combined bundle. */
perLanguageBundleFallback?: true;
}
/** Returns the exact bundle asset name for a platform and optional language. */

View File

@@ -1420,6 +1420,7 @@ for (const bundle of ["per-language", "combined", "fallback"] as const) {
t.deepEqual(downloadSpy.secondCall.args[0], {
...source,
bundle: { kind: "combined", url: combinedURL },
perLanguageBundleFallback: true,
});
checkExpectedLogMessages(t, loggedMessages, [
`Expected a per-language CodeQL bundle for 'javascript' at ${perLanguageURL}`,

View File

@@ -888,7 +888,12 @@ export const downloadCodeQL = async function (
...statusReport,
perLanguage: { tools_bundle_language: bundle.language },
}
: statusReport,
: source.perLanguageBundleFallback
? {
...statusReport,
perLanguage: { tools_per_language_bundle_fallback: true },
}
: statusReport,
};
};
@@ -1139,6 +1144,7 @@ export async function downloadCodeQLBundle(
{
...source,
bundle: { kind: "combined", url: bundle.combinedBundleURL },
perLanguageBundleFallback: true,
},
apiDetails,
tarVersion,
@@ -1150,7 +1156,6 @@ export async function downloadCodeQLBundle(
statusReport: {
...result.statusReport,
totalDurationMs: util.durationMsSince(startTime),
perLanguage: { tools_per_language_bundle_fallback: true },
},
};
}