GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve handling of fatal CLI errors by henrymercer · Pull Request #1795 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Jul 21, 2023

Copy link
Copy Markdown
Contributor

Currently we are losing information about CLI errors in database {finalize,interpret-results,run-queries}. When the CLI command includes "A fatal error occurred" in its stderr, we lose other context about the error (such as whether it was an OOM, or out of disk, or something else) in the Actions run summary and in telemetry.

Furthermore, the Action is suppressing the improved errors for no code found shipped in CodeQL v2.12.4.

This PR stops suppressing these errors by displaying fatal errors in full, and using the CLI error message for database finalize no code found errors for CodeQL CLI v2.12.4 and later. Most of the commits are tweaking the error message to try to improve its utility. In particular, we're quite keen to get it on a single line if we can, as this lets us include all the useful detail we can on the Actions run summary page.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
henrymercer added 10 commits July 20, 2023 18:16
@henrymercer
Display the CLI's no code found error for CodeQL 2.12.4+
76b2afa
@henrymercer
Capture the details of fatal errors
21c9267
@henrymercer
Fix extra whitespace in CommandInvocationError
e94e15d
@henrymercer
Add additional tests for database finalize behavior
c844189
@henrymercer
Improve CommandInvocationError message
0f871fa
@henrymercer
Display the error message on one line if possible
65a297b
@henrymercer
Include fatal error context on a single line where possible
a3ef0b9
@henrymercer
Always include exit code in first line of CommandInvocationError
2eb34f2
@henrymercer
Improve formatting of fatal errors
fdedc91
@henrymercer
Add changelog note
9fc0c93
@henrymercer
henrymercer requested a review from a team as a code owner July 21, 2023 14:17
henrymercer added 2 commits July 21, 2023 15:27
@henrymercer
Add test for summarizing several fatal errors
5bbe7a2
@henrymercer
Remove generated files associated with deleted code
47952bf
aeisenberg
aeisenberg reviewed Jul 21, 2023
View reviewed changes
Comment thread src/codeql.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
Add JSDoc for extractFatalErrors
7197f58
@henrymercer
henrymercer requested a review from aeisenberg July 24, 2023 15:48
aeisenberg
aeisenberg approved these changes Jul 24, 2023
View reviewed changes
@henrymercer
henrymercer enabled auto-merge July 24, 2023 16:10
@henrymercer
henrymercer merged commit 57a11be into main Jul 24, 2023
@henrymercer
henrymercer deleted the henrymercer/use-more-cli-errors branch July 24, 2023 16:16
@github-actions github-actions Bot mentioned this pull request Jul 26, 2023
Merge main into releases/v2 #1807
Merged
4 of 6 tasks
@henrymercer henrymercer mentioned this pull request Aug 10, 2023
Log commands manually before executing them #1833
Merged
3 tasks done
@aliscco aliscco mentioned this pull request May 13, 2024
[Snyk] Fix for 1 vulnerabilities aliscco/codeql-action#1684
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aeisenberg aeisenberg aeisenberg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@henrymercer @aeisenberg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.