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

🐛 Wrap check errors with distinct error for scorecard-action to ignore. #2250

Merged
merged 2 commits into from Sep 12, 2022

Conversation

spencerschrock
Copy link
Contributor

Signed-off-by: Spencer Schrock sschrock@google.com

What kind of change does this PR introduce?

bug fix

What is the current behavior?

Runtime errors in individual checks bubble up to any cobra command created via cmd.New() after #2133
This unintentionally broke scorecard-action ossf/scorecard-action#856

What is the new behavior (if this is a feature change)?**

Runtime errors are wrapped in a new error, ErrorCheckRuntime so that scorecard-action can ignore them. Which will be implemented in a separate PR after the next scorecard release.

  • Tests for the changes have been added (for bug fixes/features)

This is a pretty difficult thing to test, forcing runtime errors to occur in a check.

Which issue(s) this PR fixes

Partially fixes ossf/scorecard-action#856

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

Signed-off-by: Spencer Schrock <sschrock@google.com>
cmd/root.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #2250 (b4ab137) into main (856d2dd) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2250   +/-   ##
=======================================
  Coverage   44.45%   44.45%           
=======================================
  Files          95       95           
  Lines        7987     7987           
=======================================
  Hits         3551     3551           
  Misses       4173     4173           
  Partials      263      263           

@github-actions
Copy link

github-actions bot commented Sep 9, 2022

Integration tests success for
[dd179ac]
(https://github.com/ossf/scorecard/actions/runs/3024980074)

@laurentsimon laurentsimon enabled auto-merge (squash) September 9, 2022 21:04
@spencerschrock spencerschrock temporarily deployed to integration-test September 12, 2022 16:26 Inactive
@laurentsimon laurentsimon merged commit d6bef98 into ossf:main Sep 12, 2022
@github-actions
Copy link

Integration tests success for
[b4ab137]
(https://github.com/ossf/scorecard/actions/runs/3038928820)

@spencerschrock spencerschrock deleted the check-rte branch September 12, 2022 16:49
N8BWert pushed a commit to N8BWert/scorecard that referenced this pull request Sep 23, 2022
…ossf#2250)

Signed-off-by: Spencer Schrock <sschrock@google.com>

Signed-off-by: Spencer Schrock <sschrock@google.com>
N8BWert pushed a commit to N8BWert/scorecard that referenced this pull request Nov 28, 2022
…ossf#2250)

Signed-off-by: Spencer Schrock <sschrock@google.com>

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
N8BWert pushed a commit to N8BWert/scorecard that referenced this pull request Nov 28, 2022
…ossf#2250)

Signed-off-by: Spencer Schrock <sschrock@google.com>

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: nathaniel.wert <nathaniel.wert@kudelskisecurity.com>
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.

githubv4.Query: Resource not accessible by integration
2 participants