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

Suppress fatal error reporting when ^C skaffold with jib #1228

merged 1 commit into from Oct 31, 2018


None yet
6 participants
Copy link

commented Oct 30, 2018

Move kubernetes.IsTerminatedError() into util and make it more general-purpose. Use this new helper to suppress fatal error when the Jib skaffoldFiles target is killed.

Fixes #1198


This comment has been minimized.

Copy link

commented Oct 30, 2018

Codecov Report

Merging #1228 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1228      +/-   ##
- Coverage   41.49%   41.45%   -0.04%     
  Files          95       96       +1     
  Lines        4234     4238       +4     
  Hits         1757     1757              
- Misses       2307     2310       +3     
- Partials      170      171       +1
Impacted Files Coverage Δ
pkg/skaffold/util/process.go 0% <0%> (ø)
pkg/skaffold/jib/jib.go 78.78% <0%> (-5.09%) ⬇️
pkg/skaffold/kubernetes/port_forward.go 40.22% <0%> (+2.59%) ⬆️

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 232ab06...08d02ee. Read the comment docs.


r2d4 approved these changes Oct 31, 2018

// This error is given when a exec.Command is ran and terminated with a SIGTERM.
func IsTerminatedError(err error) bool {
// unwrap to discover original cause
err = errors.Cause(err)

This comment has been minimized.

Copy link

coollog Oct 31, 2018


Would this unwrapping be consistent with what it was before for the port-forward check?

This comment has been minimized.

Copy link

briandealwis Oct 31, 2018

Author Member

I believe so: .Cause unwinds the error to the source error, and returns the argument if it cannot determine the source error. The port-forward situation must have returned the source error.

@balopat balopat merged commit 246c60c into GoogleContainerTools:master Oct 31, 2018

4 checks passed

cla/google All necessary CLAs are signed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
kokoro CI build successful.

@briandealwis briandealwis deleted the briandealwis:i1198 branch Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.