Skip to content
Permalink
Browse files
Re-enable waiting for processing by default, using the new API semant…
…ics.
  • Loading branch information
Chris Gavin committed Mar 30, 2022
1 parent d8576e3 commit 9885f86fab4879632b7e44514f19148225dfbdcd
Showing 6 changed files with 13 additions and 26 deletions.
@@ -4,6 +4,7 @@

- [v2+ only] The CodeQL Action now runs on Node.js v16. [#1000](https://github.com/github/codeql-action/pull/1000)
- Update default CodeQL bundle version to 2.8.4. [#990](https://github.com/github/codeql-action/pull/990)
- 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)

## 1.1.5 - 15 Mar 2022

@@ -61,7 +61,7 @@ inputs:
wait-for-processing:
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
required: true
default: "false"
default: "true"
token:
default: ${{ github.token }}
matrix:

Some generated files are not rendered by default. Learn more.

Large diffs are not rendered by default.

@@ -485,23 +485,17 @@ export async function waitForProcessing(
logger.info(`Analysis upload status is ${status}.`);
if (status === "complete") {
break;
} else if (status === "pending") {
logger.debug("Analysis processing is still pending...");
} else if (status === "failed") {
throw new Error(
`Code Scanning could not process the submitted SARIF file:\n${response.data.errors}`
);
}
} catch (e) {
if (util.isHTTPError(e)) {
switch (e.status) {
case 404:
logger.debug("Analysis is not found yet...");
break; // Note this breaks from the case statement, not the outer loop.
default:
throw e;
}
} else {
throw e;
}
logger.warning(
`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.`
);
}
await util.delay(STATUS_CHECK_FREQUENCY_MILLISECONDS);
}
@@ -29,7 +29,7 @@ inputs:
wait-for-processing:
description: If true, the Action will wait for the uploaded SARIF to be processed before completing.
required: true
default: "false"
default: "true"
outputs:
sarif-id:
description: The ID of the uploaded SARIF file.

0 comments on commit 9885f86

Please sign in to comment.