diff --git a/lib/entry-points.js b/lib/entry-points.js index cbeec2478..54de6e355 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -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, diff --git a/src/per-language-bundles.ts b/src/per-language-bundles.ts index e0db649c7..ef64df265 100644 --- a/src/per-language-bundles.ts +++ b/src/per-language-bundles.ts @@ -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.", ); } diff --git a/src/setup-codeql.test.ts b/src/setup-codeql.test.ts index c33ac0700..bc902acb2 100644 --- a/src/setup-codeql.test.ts +++ b/src/setup-codeql.test.ts @@ -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") { diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index d306d40d6..9f431a011 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -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( {