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 — Add `UserError` by aeisenberg · Pull Request #942 · github/codeql-action

Conversation

@aeisenberg

@aeisenberg aeisenberg commented Feb 17, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This commit adds a UserError class that should be thrown when the
cause of an error is fundamentally from user configuration.

When sending status reports, avoid sending a failure for UserErrors.
This will prevent our diagnostics from pinging us for errors outside of
our control.

This particular PR adds two cases where we use user-error instead of failure:

  1. When the action is too old and cannot support the version of the CLI being used.
  2. When a user calls the init action twice in one workflow.

We can add more cases as we see fit.

Questions for reviewers:

  1. Is it ok to add a new kind of key (user-error) to our status reports?
  2. I'm not happy with using text matching and regex to determine if the error is from the user. Is there a better way? We may need to also make changes to the CLI to add some sort of error code or other way to identify errors.

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
@aeisenberg
Add UserError
3d93bb2
This commit adds a `UserError` class that should be thrown when the
cause of an error is fundamentally from user configuration.

When sending status reports, avoid sending a `failure` for `UserError`s.
This will prevent our diagnostics from pinging us for errors outside of
our control.
@aeisenberg
aeisenberg requested a review from a team as a code owner February 17, 2022 19:52
@aeisenberg

aeisenberg commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

OK...Looks like there may need to be a server-side change as well. Here is an attempt to send a user-error report. It fails with:

user-error is not a member of ["success", "failure", "starting", "aborted"].

Alternatively, we could send aborted and avoid changing the server, but the semantics isn't right.

All reactions

Sorry, something went wrong.

Uh oh!

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

edoardopirovano
edoardopirovano approved these changes Feb 22, 2022
View reviewed changes

@edoardopirovano edoardopirovano left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems good to me. You'll want to hold off merging till my PR doing the server-side changes is merged, however.

Sorry, something went wrong.

Uh oh!

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

All reactions
@edoardopirovano

edoardopirovano commented Feb 23, 2022

Copy link
Copy Markdown
Contributor

Server-side changes are done. I'm going to go ahead and merge this.

All reactions

Sorry, something went wrong.

Uh oh!

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

@edoardopirovano
edoardopirovano merged commit f14beeb into main Feb 23, 2022
@edoardopirovano
edoardopirovano deleted the aeisenberg/user-error branch February 23, 2022 11:21
@edoardopirovano

edoardopirovano commented Feb 23, 2022

Copy link
Copy Markdown
Contributor

Confirmed a test run looks good: https://github.com/edoardopirovano/actions-test2/runs/5302594964

I can also find the test run in Splunk and it's correctly tagged with user-error.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Feb 23, 2022
Merge main into v1 #946
Merged
4 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@edoardopirovano edoardopirovano edoardopirovano approved these changes
Reviewers whose approvals may not affect merge requirements

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

@aeisenberg @edoardopirovano
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.