Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add common CLI configuration error categories #2130

Merged
merged 17 commits into from
Feb 14, 2024

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Feb 13, 2024

We looked through recent telemetry errors and these were some of the most common failures we attribute to configuration errors. I've added them now that we have a nice place to do so!

Also, a couple of tiny drive-by improvements that I didn't think merited their own PRs.

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.

Suggested in github#2123 but was automerged before I could apply the suggestion
This clashes with the logic for the `NoJavaScriptTypeScriptCodeFound` case. Once that situation is deprecated, we can add the exit code back to `DetectedCodeButCouldNotProcess` configuration.
src/cli-errors.ts Outdated Show resolved Hide resolved
@angelapwen angelapwen marked this pull request as ready for review February 13, 2024 14:18
@angelapwen angelapwen requested a review from a team as a code owner February 13, 2024 14:18
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

Nice! A couple of suggestions:

src/cli-errors.ts Outdated Show resolved Hide resolved
src/cli-errors.ts Outdated Show resolved Hide resolved
src/cli-errors.ts Outdated Show resolved Hide resolved
src/cli-errors.ts Outdated Show resolved Hide resolved
src/codeql.ts Outdated Show resolved Hide resolved
src/cli-errors.ts Outdated Show resolved Hide resolved
henrymercer
henrymercer previously approved these changes Feb 13, 2024
src/cli-errors.ts Outdated Show resolved Hide resolved
src/cli-errors.ts Outdated Show resolved Hide resolved
Co-authored-by: Henry Mercer <[email protected]>
These tests will also result in the "No code found" error, but the
functionality they test is unrelated, so we simply match against
the bits we care about.
Except in the special case where we prepend the docs link, which is handled separately
src/cli-errors.ts Dismissed Show dismissed Hide dismissed
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of final comments.

src/cli-errors.ts Outdated Show resolved Hide resolved
src/codeql.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

:shipit:

@angelapwen angelapwen enabled auto-merge (squash) February 14, 2024 13:43
@angelapwen angelapwen merged commit 7b30fef into github:main Feb 14, 2024
295 checks passed
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants