From cc0dce044b5692fb1fb7437b88f664e898ec8447 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 17 Feb 2026 13:38:07 +0000 Subject: [PATCH] Improve diagnostic message wording --- lib/init-action-post.js | 7 +++++-- lib/init-action.js | 6 +++--- src/config-utils.ts | 10 ++++++---- src/init-action-post-helper.ts | 9 +++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 4433a621c..709fb20e9 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -169801,10 +169801,10 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co return uploadFailedSarifResult; } async function recordOverlayStatus(codeql, config, features, logger) { - if (config.overlayDatabaseMode === "overlay-base" /* OverlayBase */ && await features.getValue("overlay_analysis_status_save" /* OverlayAnalysisStatusSave */)) { + if (config.overlayDatabaseMode === "overlay-base" /* OverlayBase */ && process.env["CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */] !== "true" && await features.getValue("overlay_analysis_status_save" /* OverlayAnalysisStatusSave */)) { const overlayStatus = { attemptedToBuildOverlayBaseDatabase: true, - builtOverlayBaseDatabase: process.env["CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */] === "true" + builtOverlayBaseDatabase: false }; const diskUsage = await checkDiskUsage(logger); if (diskUsage === void 0) { @@ -169824,6 +169824,9 @@ async function recordOverlayStatus(codeql, config, features, logger) { logger.debug( `Saved overlay status to the Actions cache: ${JSON.stringify(overlayStatus)}` ); + logger.warning( + "This job attempted to run with improved incremental analysis but it did not complete successfully. This may have been due to disk space constraints: using improved incremental analysis can require a significant amount of disk space for some repositories. This information has been saved to the Actions cache. You can rerun this job to run CodeQL analysis without improved incremental analysis. If you want to enable improved incremental analysis, increase the disk space available to the runner and if that doesn't help, contact GitHub Support for further assistance." + ); } else { logger.warning( `Failed to save overlay status to the Actions cache. Status was: ${JSON.stringify(overlayStatus)}` diff --git a/lib/init-action.js b/lib/init-action.js index 03a2ee16e..a99573dd8 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -106361,14 +106361,14 @@ async function initConfig(features, inputs) { config, makeDiagnostic( "codeql-action/overlay-skipped-due-to-cached-status", - "Overlay analysis skipped due to cached status", + "Skipped improved incremental analysis because it failed previously on this runner", { attributes: { languages: config.languages }, - markdownMessage: `Overlay analysis was skipped because it failed previously on this runner. Running CodeQL analysis on a larger runner may allow overlay analysis to run successfully. + markdownMessage: `Improved incremental analysis was skipped because it failed previously on this runner. Improved incremental analysis may require a significant amount of disk space on some repositories. If you want to enable improved incremental analysis, increase the disk space available to the runner, and if that doesn't help, contact GitHub Support for further assistance. -Overlay analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`, +Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`, severity: "note", visibility: { cliSummaryTable: true, diff --git a/src/config-utils.ts b/src/config-utils.ts index b9e9af3ed..a1e9658f3 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -1047,15 +1047,17 @@ export async function initConfig( config, makeDiagnostic( "codeql-action/overlay-skipped-due-to-cached-status", - "Overlay analysis skipped due to cached status", + "Skipped improved incremental analysis because it failed previously on this runner", { attributes: { languages: config.languages, }, markdownMessage: - `Overlay analysis was skipped because it failed previously on this runner. ` + - "Running CodeQL analysis on a larger runner may allow overlay analysis to run successfully.\n\n" + - "Overlay analysis will be automatically retried when the next version of CodeQL is released. " + + `Improved incremental analysis was skipped because it failed previously on this runner. ` + + "Improved incremental analysis may require a significant amount of disk space on some repositories. " + + "If you want to enable improved incremental analysis, increase the disk space available " + + "to the runner, and if that doesn't help, contact GitHub Support for further assistance.\n\n" + + "Improved incremental analysis will be automatically retried when the next version of CodeQL is released. " + `You can also manually trigger a retry by [removing](${DocUrl.DELETE_ACTIONS_CACHE_ENTRIES}) \`codeql-overlay-status-*\` entries from the Actions cache.`, severity: "note", visibility: { diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index e7b269fca..cae535e78 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -288,6 +288,15 @@ async function recordOverlayStatus( logger.debug( `Saved overlay status to the Actions cache: ${JSON.stringify(overlayStatus)}`, ); + logger.warning( + "This job attempted to run with improved incremental analysis but it did not complete successfully. " + + "This may have been due to disk space constraints: using improved incremental analysis can " + + "require a significant amount of disk space for some repositories. " + + "This information has been saved to the Actions cache. " + + "You can rerun this job to run CodeQL analysis without improved incremental analysis. " + + "If you want to enable improved incremental analysis, increase the disk space available to the runner " + + "and if that doesn't help, contact GitHub Support for further assistance.", + ); } else { logger.warning( `Failed to save overlay status to the Actions cache. Status was: ${JSON.stringify(overlayStatus)}`,