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 common CLI configuration error categories by angelapwen · Pull Request #2130 · github/codeql-action

Conversation

@angelapwen

@angelapwen angelapwen commented Feb 13, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

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

All reactions
angelapwen added 4 commits February 13, 2024 13:57
@angelapwen
Add common CLI configuration error categories
c45840d
@angelapwen
Drive-by: appease enum type warning
d51e49a
@angelapwen
Drive-by: tiny workflow improvement
9bc1f4d
Suggested in github#2123 but was automerged before I could apply the suggestion
@angelapwen
Stop using exit code 32 for new category
e45c9a6
This clashes with the logic for the `NoJavaScriptTypeScriptCodeFound` case. Once that situation is deprecated, we can add the exit code back to `DetectedCodeButCouldNotProcess` configuration.
angelapwen
angelapwen commented Feb 13, 2024
View reviewed changes
Comment thread src/cli-errors.ts Resolved

Uh oh!

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

@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
henrymercer
henrymercer reviewed Feb 13, 2024
View reviewed changes

@henrymercer henrymercer 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.

Nice! A couple of suggestions:

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/codeql.ts Resolved

Uh oh!

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

Comment thread src/cli-errors.ts Resolved

Uh oh!

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

angelapwen added 4 commits February 13, 2024 14:47
@angelapwen
Actually wrap errors from autobuild command
1e5200d
@angelapwen
Drive-by: more type appeasing
aeac6ec
@angelapwen
Revert unnecessary casting
7e39cda
@angelapwen
Generalize exit code 32 to no code found error
8361861
@angelapwen
angelapwen force-pushed the add-config-error-kinds branch from be36887 to 8361861 Compare February 13, 2024 15:02
henrymercer
henrymercer previously approved these changes Feb 13, 2024
View reviewed changes
Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/cli-errors.ts Resolved

Uh oh!

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

@angelapwen @henrymercer
Update comment
9b0da38
Co-authored-by: Henry Mercer <[email protected]>
@angelapwen
angelapwen dismissed henrymercer’s stale review via 9b0da38 February 13, 2024 16:27
angelapwen added 3 commits February 14, 2024 10:53
@angelapwen
Add logic to prepend docs link if necessary
bddc0a0
@angelapwen
Use regex matching for tests with exit code 32
9f5ccaf
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.
@angelapwen
Append additional error message instead of prepend
435692c
Except in the special case where we prepend the docs link, which is handled separately
github-advanced-security[bot]
github-advanced-security AI found potential problems Feb 14, 2024
View reviewed changes
Comment thread src/cli-errors.ts
* should already include the doc link.
*/
function prependDocsLinkIfApplicable(cliErrorMessage: string): string {
if (!cliErrorMessage.includes(NO_SOURCE_CODE_SEEN_DOCS_LINK)) {

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization

'[https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build](1)' can be anywhere in the URL, and arbitrary hosts may come before or after it.
@angelapwen
Fix regex in tests: properly escape . character
a18a72e
henrymercer
henrymercer reviewed Feb 14, 2024
View reviewed changes

@henrymercer henrymercer 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.

Looks good, just a couple of final comments.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/cli-errors.ts Resolved

Uh oh!

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

Comment thread src/codeql.test.ts Resolved

Uh oh!

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

angelapwen added 2 commits February 14, 2024 13:10
@angelapwen
Correctly handle additional error message to append case
cefd39b
@angelapwen
Fold no source code found errors into one
e1e0ba3
@angelapwen
angelapwen force-pushed the add-config-error-kinds branch from fc1bd33 to 0bec49a Compare February 14, 2024 13:35
angelapwen and others added 2 commits February 14, 2024 13:36
@angelapwen @henrymercer
Regex fixups
bce391b
Co-authored-by: Henry Mercer <[email protected]>
@angelapwen
Rename snippets to candidates for clarity.
3dc47a2
@angelapwen
angelapwen force-pushed the add-config-error-kinds branch from 0bec49a to 3dc47a2 Compare February 14, 2024 13:37
henrymercer
henrymercer approved these changes Feb 14, 2024
View reviewed changes

@henrymercer henrymercer 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.

:shipit:

Sorry, something went wrong.

Uh oh!

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

All reactions
@angelapwen
angelapwen enabled auto-merge (squash) February 14, 2024 13:43
@angelapwen
angelapwen merged commit 7b30fef into github:main Feb 14, 2024
@github-actions github-actions Bot mentioned this pull request Feb 15, 2024
Merge main into releases/v3 #2142
Merged
6 of 8 tasks
@henrymercer henrymercer mentioned this pull request Feb 15, 2024
Merge releases/v3 into releases/v2 #2144
Merged
8 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@henrymercer henrymercer henrymercer 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.

3 participants

@angelapwen @henrymercer @github-advanced-security
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.