Merge remote-tracking branch 'origin/main' into mbg/improve-json-failures

This commit is contained in:
Michael B. Gale
2026-09-24 12:06:30 +01:00
9 changed files with 136 additions and 123 deletions

62
lib/entry-points.js generated
View File

@@ -146178,7 +146178,7 @@ function getDiffRangesJsonFilePath(env = getEnv()) {
return path2.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME);
}
function getActionVersion() {
return "4.38.2";
return "4.38.3";
}
function getWorkflowEventName(env = getEnv()) {
return env.getRequired("GITHUB_EVENT_NAME" /* GITHUB_EVENT_NAME */);
@@ -151224,6 +151224,20 @@ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
var semver10 = __toESM(require_semver2());
// src/codeql-bundle.ts
function getCodeQLBundleName(compressionMethod, platform2, language) {
const extensions = {
gzip: ".tar.gz",
zstd: ".tar.zst"
};
const extension = extensions[compressionMethod];
if (platform2 === void 0) {
return `codeql-bundle${extension}`;
}
if (language !== void 0) {
return `codeql-bundle-${language}-${platform2}${extension}`;
}
return `codeql-bundle-${platform2}${extension}`;
}
var PER_LANGUAGE_BUNDLE_NAME = /^codeql-bundle-(.+)-(?:linux64|osx64|win64)\.tar\.(?:gz|zst)$/;
function getCodeQLBundleFromUrl(url2) {
let assetName;
@@ -151625,6 +151639,11 @@ async function getPerLanguageBundleLanguage({
}
return language;
}
function logPerLanguageBundleFallback({ 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.`
);
}
// src/tar.ts
var import_child_process = require("child_process");
@@ -152023,27 +152042,6 @@ var CODEQL_NIGHTLIES_REPOSITORY_NAME = "codeql-cli-nightlies";
var CODEQL_BUNDLE_VERSION_ALIAS = ["linked", "latest"];
var CODEQL_NIGHTLY_TOOLS_INPUTS = ["nightly", "nightly-latest"];
var CODEQL_TOOLCACHE_INPUT = "toolcache";
function getCodeQLBundleExtension(compressionMethod) {
switch (compressionMethod) {
case "gzip":
return ".tar.gz";
case "zstd":
return ".tar.zst";
default:
assertNever(compressionMethod);
}
}
function getCodeQLBundleName(compressionMethod, language) {
const extension = getCodeQLBundleExtension(compressionMethod);
const platform2 = getBundlePlatform();
if (platform2 === void 0) {
return `codeql-bundle${extension}`;
}
if (language !== void 0) {
return `codeql-bundle-${language}-${platform2}${extension}`;
}
return `codeql-bundle-${platform2}${extension}`;
}
function getCodeQLActionRepository(logger) {
if (isRunningLocalAction()) {
logger.info(
@@ -152452,20 +152450,21 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, useO
);
}
compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip";
const platform2 = getBundlePlatform();
const perLanguageBundleLanguage = await getPerLanguageBundleLanguage(
{ env: getEnv(), features, logger },
{
rawLanguages,
cliVersion: cliVersion2,
compressionMethod,
platform: getBundlePlatform(),
platform: platform2,
variant
}
);
const resolveBundleURL = (language) => getCodeQLBundleDownloadURL(
bundleTagName,
apiDetails,
getCodeQLBundleName(compressionMethod, language),
getCodeQLBundleName(compressionMethod, platform2, language),
logger
);
const combinedBundleURL = await resolveBundleURL();
@@ -152698,9 +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;
}
logger.warning(
`No per-language CodeQL bundle for '${bundle.language}' was found at ${bundle.url}, so falling back to the bundle that contains all languages. This analysis will still produce correct results, but will take longer to set up.`
);
logPerLanguageBundleFallback(action, bundle.language, bundle.url);
const result = await downloadCodeQL(
{
...source,
@@ -152737,11 +152734,12 @@ async function getLatestNightlyBundle(action, rawLanguages, variant) {
CODEQL_VERSION_ZSTD_BUNDLE,
zstdAvailability.available
) ? "zstd" : "gzip";
const platform2 = getBundlePlatform();
const language = await getPerLanguageBundleLanguage(action, {
rawLanguages,
cliVersion: void 0,
compressionMethod,
platform: getBundlePlatform(),
platform: platform2,
variant,
isLatestNightly: true
});
@@ -152758,12 +152756,16 @@ async function getLatestNightlyBundle(action, rawLanguages, variant) {
throw new Error("Could not find the latest nightly release.");
}
const assetUrl = (name) => `https://github.com/${CODEQL_NIGHTLIES_REPOSITORY_OWNER}/${CODEQL_NIGHTLIES_REPOSITORY_NAME}/releases/download/${latestRelease.tag_name}/${name}`;
const url2 = assetUrl(getCodeQLBundleName(compressionMethod, language));
const url2 = assetUrl(
getCodeQLBundleName(compressionMethod, platform2, language)
);
return language === void 0 ? { kind: "combined", url: url2 } : {
kind: "per-language",
url: url2,
language,
combinedBundleURL: assetUrl(getCodeQLBundleName(compressionMethod))
combinedBundleURL: assetUrl(
getCodeQLBundleName(compressionMethod, platform2)
)
};
} catch (e) {
throw new Error(