Title: Fail the analyze action when some language fails to run the queries by Daverlo · Pull Request #271 · github/codeql-action · GitHub
Open Graph Title: Fail the analyze action when some language fails to run the queries by Daverlo · Pull Request #271 · github/codeql-action
X Title: Fail the analyze action when some language fails to run the queries by Daverlo · Pull Request #271 · github/codeql-action
Description: In analyze:runQueries we are warding the codeql call with a try, and if we catch something we set an error message, update the status report with the failed language and returning it. Just after that in runAnalyze we are always doing the upload without considering if the runQueries failed or not. This caused that we were uploading partial results, and that doesn't make sense. Partial results would mean that alerts could disappear without being fixed. The reason why the action is not marked as failed is because this is only done at the topmost catch, in analyze-action, and we are not bubbling up the exception, just catching it and setting the status report. As we want to keep the status report, I've created an Error subclass where we can attach it and submit it as a failed status report. Here is a run with the old behaviour: https://github.com/dsp-testing/daverlo-test-fail-analyze/actions/runs/321647298 The job is green but it has an error saying the analysis failed. Here is the same repo but it run with this branch: https://github.com/dsp-testing/daverlo-test-fail-analyze/actions/runs/321654493 Merge / deployment checklist Confirm this change is backwards compatible with existing workflows. Confirm the readme has been updated if necessary.
Open Graph Description: In analyze:runQueries we are warding the codeql call with a try, and if we catch something we set an error message, update the status report with the failed language and returning it. Just after th...
X Description: In analyze:runQueries we are warding the codeql call with a try, and if we catch something we set an error message, update the status report with the failed language and returning it. Just after th...
Opengraph URL: https://github.com/github/codeql-action/pull/271
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:939703e0-f6ab-a7a6-4074-2458a6183916 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 801A:2373A7:C69743:122074B:6A54BA67 |
| html-safe-nonce | 98241a5923225f869a5fcd11db80e845f4e4105208203844a623fac22c980c7a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDFBOjIzNzNBNzpDNjk3NDM6MTIyMDc0Qjo2QTU0QkE2NyIsInZpc2l0b3JfaWQiOiI4Mzc4NjMzOTY2NzM2MTYxMzgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c15cd794da3185950bbb27eee9e001772a9502b45c7e2211df32e5549db7ddc4 |
| hovercard-subject-tag | pull_request:508143652 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/codeql-action/pull/271/files |
| twitter:image | https://avatars.githubusercontent.com/u/47184891?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/47184891?s=400&v=4 |
| og:image:alt | In analyze:runQueries we are warding the codeql call with a try, and if we catch something we set an error message, update the status report with the failed language and returning it. Just after th... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/codeql-action git https://github.com/github/codeql-action.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 259445878 |
| octolytics-dimension-repository_nwo | github/codeql-action |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 259445878 |
| octolytics-dimension-repository_network_root_nwo | github/codeql-action |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5d343e1152573ef294b28f54e4a14fb5fdb3a5a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width