Skip to content

Commit b3bf557

Browse files
authored
Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases
2 parents f6312f1 + c5c5bda commit b3bf557

File tree

6 files changed

+13
-26
lines changed

6 files changed

+13
-26
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [UNRELEASED]
44

55
- Add `working-directory` input to the `autobuild` action. [#1024](https://github.com/github/codeql-action/pull/1024)
6+
- The `analyze` and `upload-sarif` actions will now wait up to 2 minutes for processing to complete after they have uploaded the results so they can report any processing errors that occurred. This behavior can be disabled by setting the `wait-for-processing` action input to `"false"`. [#1007](https://github.com/github/codeql-action/pull/1007)
67

78
## 2.1.8 - 08 Apr 2022
89

analyze/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ inputs:
6161
wait-for-processing:
6262
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
6363
required: true
64-
default: "false"
64+
default: "true"
6565
token:
6666
default: ${{ github.token }}
6767
matrix:

lib/upload-lib.js

+4-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/upload-lib.ts

+5-11
Original file line numberDiff line numberDiff line change
@@ -485,23 +485,17 @@ export async function waitForProcessing(
485485
logger.info(`Analysis upload status is ${status}.`);
486486
if (status === "complete") {
487487
break;
488+
} else if (status === "pending") {
489+
logger.debug("Analysis processing is still pending...");
488490
} else if (status === "failed") {
489491
throw new Error(
490492
`Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`
491493
);
492494
}
493495
} catch (e) {
494-
if (util.isHTTPError(e)) {
495-
switch (e.status) {
496-
case 404:
497-
logger.debug("Analysis is not found yet...");
498-
break; // Note this breaks from the case statement, not the outer loop.
499-
default:
500-
throw e;
501-
}
502-
} else {
503-
throw e;
504-
}
496+
logger.warning(
497+
`An error occurred checking the status of the delivery. ${e} It should still be processed in the background, but errors that occur during processing may not be reported.`
498+
);
505499
}
506500
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
507501
}

upload-sarif/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ inputs:
2929
wait-for-processing:
3030
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
3131
required: true
32-
default: "false"
32+
default: "true"
3333
outputs:
3434
sarif-id:
3535
description: The ID of the uploaded SARIF file.

0 commit comments

Comments
 (0)