mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
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:
9
lib/entry-points.js
generated
9
lib/entry-points.js
generated
@@ -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)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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}`,
|
||||
|
||||
@@ -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 },
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user