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

fix: skaffold inspect commands should have non-zero exit-code on error #6807

Merged

Conversation

briandealwis
Copy link
Member

Fixes: #6801

Description

  • ensure actual skaffold inspect errors are bubbled back up for exit-code reporting
  • add ability for certain commands to suppress error reporting
  • mark inspect commands as suppressing error reporting
  • add top-level tests to ensure errors are reported or not reported as required

cc: @j-windsor @sujit-kamireddy @ivanporty

@briandealwis briandealwis requested a review from a team as a code owner November 5, 2021 15:37
@google-cla google-cla bot added the cla: yes label Nov 5, 2021
@gsquared94
Copy link
Contributor

changes look good, but the related tests are failing

@briandealwis
Copy link
Member Author

oops 😊 tests should be fixed

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #6807 (d8ad121) into main (290280e) will decrease coverage by 0.97%.
The diff coverage is 69.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6807      +/-   ##
==========================================
- Coverage   70.48%   69.51%   -0.98%     
==========================================
  Files         515      542      +27     
  Lines       23150    24628    +1478     
==========================================
+ Hits        16317    17119     +802     
- Misses       5776     6379     +603     
- Partials     1057     1130      +73     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/deploy.go 52.00% <ø> (-1.85%) ⬇️
cmd/skaffold/app/cmd/dev.go 84.61% <0.00%> (ø)
cmd/skaffold/app/cmd/flags.go 91.00% <0.00%> (+0.18%) ⬆️
cmd/skaffold/app/cmd/render.go 36.66% <0.00%> (-4.72%) ⬇️
cmd/skaffold/skaffold.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/find_configs.go 48.88% <50.00%> (+0.24%) ⬆️
cmd/skaffold/app/cmd/lint.go 52.94% <52.94%> (ø)
cmd/skaffold/app/skaffold.go 76.19% <70.00%> (-8.43%) ⬇️
cmd/skaffold/app/cmd/delete.go 69.23% <80.00%> (+13.67%) ⬆️
cmd/skaffold/app/cmd/cmd.go 72.13% <100.00%> (+1.07%) ⬆️
... and 148 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 008e267...d8ad121. Read the comment docs.

Comment on lines -46 to +47
return formatter.WriteErr(err)
formatter.WriteErr(err)
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

nice catch.

@tejal29 tejal29 merged commit 089a01b into GoogleContainerTools:main Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

skaffold inspect build-env list exits 0 on error
3 participants