Skip to content

Commit 45fb58a

Browse files
committed
Add user error for gracefully running out of memory
As opposed to being killed by the JVM, which is a failure not a user error.
1 parent ec11790 commit 45fb58a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lib/cli-errors.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli-errors.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli-errors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ function ensureEndsInPeriod(text: string): string {
122122
/** Error messages from the CLI that we consider configuration errors and handle specially. */
123123
export enum CliConfigErrorCategory {
124124
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed",
125+
GracefulOutOfMemory = "GracefulOutOfMemory",
125126
GradleBuildFailed = "GradleBuildFailed",
126127
IncompatibleWithActionVersion = "IncompatibleWithActionVersion",
127128
InitCalledTwice = "InitCalledTwice",
@@ -157,6 +158,9 @@ export const cliErrorsConfig: Record<
157158
new RegExp("Failed to clone external Git repository"),
158159
],
159160
},
161+
[CliConfigErrorCategory.GracefulOutOfMemory]: {
162+
cliErrorMessageCandidates: [new RegExp("CodeQL is out of memory.")],
163+
},
160164
[CliConfigErrorCategory.GradleBuildFailed]: {
161165
cliErrorMessageCandidates: [
162166
new RegExp("[autobuild] FAILURE: Build failed with an exception."),

0 commit comments

Comments
 (0)