mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Record overlay disablement reason
This commit is contained in:
103
lib/init-action.js
generated
103
lib/init-action.js
generated
@@ -105779,6 +105779,64 @@ var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => {
|
||||
return KnownLanguage2;
|
||||
})(KnownLanguage || {});
|
||||
|
||||
// src/overlay/diagnostics.ts
|
||||
async function addOverlayDisablementDiagnostics(config, codeql, overlayDisabledReason) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/overlay-disabled",
|
||||
"Overlay analysis disabled",
|
||||
{
|
||||
reason: overlayDisabledReason
|
||||
}
|
||||
)
|
||||
);
|
||||
if (overlayDisabledReason === "skipped-due-to-cached-status" /* SkippedDueToCachedStatus */) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeDiagnostic(
|
||||
"codeql-action/overlay-disabled-due-to-cached-status",
|
||||
"Skipped improved incremental analysis because it failed previously with similar hardware resources",
|
||||
{
|
||||
attributes: {
|
||||
languages: config.languages
|
||||
},
|
||||
markdownMessage: `Improved incremental analysis was skipped because it previously failed for this repository with CodeQL version ${(await codeql.getVersion()).version} on a runner with similar hardware resources. Improved incremental analysis may require a significant amount of disk space for some repositories. If you want to enable improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.
|
||||
|
||||
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,
|
||||
statusPage: true,
|
||||
telemetry: false
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
if (overlayDisabledReason === "disabled-by-repository-property" /* DisabledByRepositoryProperty */) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeDiagnostic(
|
||||
"codeql-action/overlay-disabled-by-repository-property",
|
||||
"Improved incremental analysis disabled by repository property",
|
||||
{
|
||||
attributes: {
|
||||
languages: config.languages
|
||||
},
|
||||
markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`,
|
||||
severity: "note",
|
||||
visibility: {
|
||||
cliSummaryTable: true,
|
||||
statusPage: true,
|
||||
telemetry: false
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// src/overlay/status.ts
|
||||
var fs5 = __toESM(require("fs"));
|
||||
var path7 = __toESM(require("path"));
|
||||
@@ -106473,48 +106531,11 @@ async function initConfig(features, inputs) {
|
||||
);
|
||||
config.overlayDatabaseMode = overlayDatabaseMode;
|
||||
config.useOverlayDatabaseCaching = useOverlayDatabaseCaching;
|
||||
if (overlayDisabledReason === "skipped-due-to-cached-status" /* SkippedDueToCachedStatus */) {
|
||||
addNoLanguageDiagnostic(
|
||||
if (overlayDisabledReason !== void 0) {
|
||||
await addOverlayDisablementDiagnostics(
|
||||
config,
|
||||
makeDiagnostic(
|
||||
"codeql-action/overlay-skipped-due-to-cached-status",
|
||||
"Skipped improved incremental analysis because it failed previously with similar hardware resources",
|
||||
{
|
||||
attributes: {
|
||||
languages: config.languages
|
||||
},
|
||||
markdownMessage: `Improved incremental analysis was skipped because it previously failed for this repository with CodeQL version ${(await inputs.codeql.getVersion()).version} on a runner with similar hardware resources. Improved incremental analysis may require a significant amount of disk space for some repositories. If you want to enable improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance.
|
||||
|
||||
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,
|
||||
statusPage: true,
|
||||
telemetry: true
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
if (overlayDisabledReason === "disabled-by-repository-property" /* DisabledByRepositoryProperty */) {
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
makeDiagnostic(
|
||||
"codeql-action/overlay-disabled-by-repository-property",
|
||||
"Improved incremental analysis disabled by repository property",
|
||||
{
|
||||
attributes: {
|
||||
languages: config.languages
|
||||
},
|
||||
markdownMessage: `Improved incremental analysis has been disabled because the \`${"github-codeql-disable-overlay" /* DISABLE_OVERLAY */}\` repository property is set to \`true\`. To re-enable improved incremental analysis, set this property to \`false\` or remove it.`,
|
||||
severity: "note",
|
||||
visibility: {
|
||||
cliSummaryTable: true,
|
||||
statusPage: true,
|
||||
telemetry: true
|
||||
}
|
||||
}
|
||||
)
|
||||
inputs.codeql,
|
||||
overlayDisabledReason
|
||||
);
|
||||
}
|
||||
if (overlayDatabaseMode === "overlay" /* Overlay */ || await shouldPerformDiffInformedAnalysis(
|
||||
|
||||
Reference in New Issue
Block a user