Merge remote-tracking branch 'origin/main' into mbg/features/offline-features

This commit is contained in:
Michael B. Gale
2026-02-17 09:54:34 +00:00
24 changed files with 20355 additions and 19347 deletions
+10
View File
@@ -161566,11 +161566,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
+54 -4
View File
@@ -107118,6 +107118,7 @@ function formatDuration(durationMs) {
// src/diagnostics.ts
var unwrittenDiagnostics = [];
var unwrittenDefaultLanguageDiagnostics = [];
function makeDiagnostic(id, name, data = void 0) {
return {
...data,
@@ -107137,6 +107138,19 @@ function addDiagnostic(config, language, diagnostic) {
unwrittenDiagnostics.push({ diagnostic, language });
}
}
function addNoLanguageDiagnostic(config, diagnostic) {
if (config !== void 0) {
addDiagnostic(
config,
// Arbitrarily choose the first language. We could also choose all languages, but that
// increases the risk of misinterpreting the data.
config.languages[0],
diagnostic
);
} else {
unwrittenDefaultLanguageDiagnostics.push(diagnostic);
}
}
function writeDiagnostic(config, language, diagnostic) {
const logger = getActionsLogger();
const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
@@ -107634,11 +107648,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -109020,10 +109044,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
let cliVersion2;
let tagName;
let url2;
if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) {
logger.info(
`Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
);
const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode();
const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */);
const forceNightly = forceNightlyValueFF && canForceNightlyWithFF;
const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput);
if (forceNightly || nightlyRequestedByToolsInput) {
if (forceNightly) {
logger.info(
`Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.`
);
addNoLanguageDiagnostic(
void 0,
makeDiagnostic(
"codeql-action/forced-nightly-cli",
"A nightly release of CodeQL was used",
{
markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.",
visibility: {
cliSummaryTable: true,
statusPage: true,
telemetry: true
},
severity: "note"
}
)
);
} else {
logger.info(
`Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
);
}
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
+10
View File
@@ -103971,11 +103971,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
+625 -528
View File
File diff suppressed because it is too large Load Diff
+58 -14
View File
@@ -104575,6 +104575,7 @@ function formatDuration(durationMs) {
// src/diagnostics.ts
var unwrittenDiagnostics = [];
var unwrittenDefaultLanguageDiagnostics = [];
function makeDiagnostic(id, name, data = void 0) {
return {
...data,
@@ -104595,13 +104596,17 @@ function addDiagnostic(config, language, diagnostic) {
}
}
function addNoLanguageDiagnostic(config, diagnostic) {
addDiagnostic(
config,
// Arbitrarily choose the first language. We could also choose all languages, but that
// increases the risk of misinterpreting the data.
config.languages[0],
diagnostic
);
if (config !== void 0) {
addDiagnostic(
config,
// Arbitrarily choose the first language. We could also choose all languages, but that
// increases the risk of misinterpreting the data.
config.languages[0],
diagnostic
);
} else {
unwrittenDefaultLanguageDiagnostics.push(diagnostic);
}
}
function writeDiagnostic(config, language, diagnostic) {
const logger = getActionsLogger();
@@ -104638,13 +104643,16 @@ function logUnwrittenDiagnostics() {
}
function flushDiagnostics(config) {
const logger = getActionsLogger();
logger.debug(
`Writing ${unwrittenDiagnostics.length} diagnostic(s) to database.`
);
const diagnosticsCount = unwrittenDiagnostics.length + unwrittenDefaultLanguageDiagnostics.length;
logger.debug(`Writing ${diagnosticsCount} diagnostic(s) to database.`);
for (const unwritten of unwrittenDiagnostics) {
writeDiagnostic(config, unwritten.language, unwritten.diagnostic);
}
for (const unwritten of unwrittenDefaultLanguageDiagnostics) {
addNoLanguageDiagnostic(config, unwritten);
}
unwrittenDiagnostics = [];
unwrittenDefaultLanguageDiagnostics = [];
}
function makeTelemetryDiagnostic(id, name, attributes) {
return makeDiagnostic(id, name, {
@@ -105167,11 +105175,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
@@ -107423,10 +107441,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
let cliVersion2;
let tagName;
let url;
if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) {
logger.info(
`Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
);
const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode();
const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */);
const forceNightly = forceNightlyValueFF && canForceNightlyWithFF;
const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput);
if (forceNightly || nightlyRequestedByToolsInput) {
if (forceNightly) {
logger.info(
`Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.`
);
addNoLanguageDiagnostic(
void 0,
makeDiagnostic(
"codeql-action/forced-nightly-cli",
"A nightly release of CodeQL was used",
{
markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.",
visibility: {
cliSummaryTable: true,
statusPage: true,
telemetry: true
},
severity: "note"
}
)
);
} else {
logger.info(
`Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`
);
}
toolsInput = await getNightlyToolsUrl(logger);
}
const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput);
+10
View File
@@ -103958,11 +103958,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
+336 -241
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -160972,11 +160972,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
+17976 -17943
View File
File diff suppressed because it is too large Load Diff
+367 -259
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -161134,11 +161134,21 @@ var featureConfig = {
legacyApi: true,
minimumVersion: void 0
},
["force_nightly" /* ForceNightly */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_FORCE_NIGHTLY",
minimumVersion: void 0
},
["ignore_generated_files" /* IgnoreGeneratedFiles */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES",
minimumVersion: void 0
},
["improved_proxy_certificates" /* ImprovedProxyCertificates */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_IMPROVED_PROXY_CERTIFICATES",
minimumVersion: void 0
},
["overlay_analysis" /* OverlayAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
+352 -257
View File
File diff suppressed because it is too large Load Diff