@@ -122,17 +122,18 @@ function ensureEndsInPeriod(text: string): string {
122
122
/** Error messages from the CLI that we consider configuration errors and handle specially. */
123
123
export enum CliConfigErrorCategory {
124
124
ExternalRepositoryCloneFailed = "ExternalRepositoryCloneFailed" ,
125
- GracefulOutOfMemory = "GracefulOutOfMemory" ,
126
125
GradleBuildFailed = "GradleBuildFailed" ,
127
126
IncompatibleWithActionVersion = "IncompatibleWithActionVersion" ,
128
127
InitCalledTwice = "InitCalledTwice" ,
128
+ InvalidConfigFile = "InvalidConfigFile" ,
129
129
InvalidSourceRoot = "InvalidSourceRoot" ,
130
130
MavenBuildFailed = "MavenBuildFailed" ,
131
131
NoBuildCommandAutodetected = "NoBuildCommandAutodetected" ,
132
132
NoBuildMethodAutodetected = "NoBuildMethodAutodetected" ,
133
133
NoSourceCodeSeen = "NoSourceCodeSeen" ,
134
134
NoSupportedBuildCommandSucceeded = "NoSupportedBuildCommandSucceeded" ,
135
135
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected" ,
136
+ OutOfMemoryOrDisk = "OutOfMemoryOrDisk" ,
136
137
PackCannotBeFound = "PackCannotBeFound" ,
137
138
SwiftBuildFailed = "SwiftBuildFailed" ,
138
139
UnsupportedBuildMode = "UnsupportedBuildMode" ,
@@ -158,9 +159,6 @@ export const cliErrorsConfig: Record<
158
159
new RegExp ( "Failed to clone external Git repository" ) ,
159
160
] ,
160
161
} ,
161
- [ CliConfigErrorCategory . GracefulOutOfMemory ] : {
162
- cliErrorMessageCandidates : [ new RegExp ( "CodeQL is out of memory." ) ] ,
163
- } ,
164
162
[ CliConfigErrorCategory . GradleBuildFailed ] : {
165
163
cliErrorMessageCandidates : [
166
164
new RegExp ( "[autobuild] FAILURE: Build failed with an exception." ) ,
@@ -180,6 +178,12 @@ export const cliErrorsConfig: Record<
180
178
] ,
181
179
additionalErrorMessageToAppend : `Is the "init" action called twice in the same job?` ,
182
180
} ,
181
+ [ CliConfigErrorCategory . InvalidConfigFile ] : {
182
+ cliErrorMessageCandidates : [
183
+ new RegExp ( "Config file .* is not valid" ) ,
184
+ new RegExp ( "The supplied config file is empty" ) ,
185
+ ] ,
186
+ } ,
183
187
// Expected source location for database creation does not exist
184
188
[ CliConfigErrorCategory . InvalidSourceRoot ] : {
185
189
cliErrorMessageCandidates : [ new RegExp ( "Invalid source root" ) ] ,
@@ -214,7 +218,6 @@ export const cliErrorsConfig: Record<
214
218
) ,
215
219
] ,
216
220
} ,
217
-
218
221
[ CliConfigErrorCategory . NoSupportedBuildCommandSucceeded ] : {
219
222
cliErrorMessageCandidates : [
220
223
new RegExp ( "No supported build command succeeded" ) ,
@@ -225,6 +228,15 @@ export const cliErrorsConfig: Record<
225
228
new RegExp ( "No supported build system detected" ) ,
226
229
] ,
227
230
} ,
231
+ [ CliConfigErrorCategory . OutOfMemoryOrDisk ] : {
232
+ cliErrorMessageCandidates : [
233
+ new RegExp ( "CodeQL is out of memory." ) ,
234
+ new RegExp ( "out of disk" ) ,
235
+ new RegExp ( "No space left on device" ) ,
236
+ ] ,
237
+ additionalErrorMessageToAppend :
238
+ "For more information, see https://gh.io/troubleshooting-code-scanning/out-of-disk-or-memory" ,
239
+ } ,
228
240
[ CliConfigErrorCategory . PackCannotBeFound ] : {
229
241
cliErrorMessageCandidates : [
230
242
new RegExp (
0 commit comments