Rename logPerLanguageBundleFallback to logMissingPerLanguageBundle

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-09-24 13:04:04 +01:00
parent fa8392b7e5
commit 6ec2b18519
4 changed files with 11 additions and 11 deletions

6
lib/entry-points.js generated
View File

@@ -151639,9 +151639,9 @@ async function getPerLanguageBundleLanguage({
}
return language;
}
function logPerLanguageBundleFallback({ logger }, language, location) {
function logMissingPerLanguageBundle({ logger }, language, location) {
logger.warning(
`No per-language CodeQL bundle for '${language}' was found at ${location}, so falling back to the bundle that contains all languages. This analysis will still produce correct results, but will take longer to set up.`
`Expected a per-language CodeQL bundle for '${language}' at ${location}, but it wasn't found, so using the bundle that contains all languages instead. This analysis will still produce correct results, but will take longer to set up.`
);
}
@@ -152697,7 +152697,7 @@ async function downloadCodeQLBundle(action, source, apiDetails, tarVersion, temp
if (bundle.kind !== "per-language" || bundle.combinedBundleURL === void 0 || asHTTPError(e)?.status !== 404) {
throw e;
}
logPerLanguageBundleFallback(action, bundle.language, bundle.url);
logMissingPerLanguageBundle(action, bundle.language, bundle.url);
const result = await downloadCodeQL(
{
...source,

View File

@@ -132,15 +132,15 @@ export async function getPerLanguageBundleLanguage(
return language;
}
/** Explains why an eligible per-language bundle is being replaced by a combined bundle. */
export function logPerLanguageBundleFallback(
/** Logs that the selected per-language bundle is missing, so we're using the combined bundle. */
export function logMissingPerLanguageBundle(
{ logger }: ActionState<["Logger"]>,
language: BuiltInLanguage,
location: string,
): void {
logger.warning(
`No per-language CodeQL bundle for '${language}' was found at ${location}, so ` +
"falling back to the bundle that contains all languages. This analysis will still " +
"produce correct results, but will take longer to set up.",
`Expected a per-language CodeQL bundle for '${language}' at ${location}, but it wasn't ` +
"found, so using the bundle that contains all languages instead. This analysis will " +
"still produce correct results, but will take longer to set up.",
);
}

View File

@@ -1422,7 +1422,7 @@ for (const bundle of ["per-language", "combined", "fallback"] as const) {
bundle: { kind: "combined", url: combinedURL },
});
checkExpectedLogMessages(t, loggedMessages, [
`No per-language CodeQL bundle for 'javascript' was found at ${perLanguageURL}`,
`Expected a per-language CodeQL bundle for 'javascript' at ${perLanguageURL}`,
]);
}
if (bundle === "per-language") {

View File

@@ -42,7 +42,7 @@ import { Logger } from "./logging";
import { getCodeQlVersionsForOverlayBaseDatabases } from "./overlay/caching";
import {
getPerLanguageBundleLanguage,
logPerLanguageBundleFallback,
logMissingPerLanguageBundle,
} from "./per-language-bundles";
import { getBundlePlatform } from "./platform";
import * as tar from "./tar";
@@ -1113,7 +1113,7 @@ export async function downloadCodeQLBundle(
) {
throw e;
}
logPerLanguageBundleFallback(action, bundle.language, bundle.url);
logMissingPerLanguageBundle(action, bundle.language, bundle.url);
const result = await downloadCodeQL(
{