Suppress fatal error reporting when ^C skaffold with jib#1228
Merged
balopat merged 1 commit intoGoogleContainerTools:masterfrom Oct 31, 2018
Merged
Suppress fatal error reporting when ^C skaffold with jib#1228balopat merged 1 commit intoGoogleContainerTools:masterfrom
balopat merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
dgageot
approved these changes
Oct 31, 2018
r2d4
approved these changes
Oct 31, 2018
coollog
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) |
Contributor
There was a problem hiding this comment.
Would this unwrapping be consistent with what it was before for the port-forward check?
Member
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Move
kubernetes.IsTerminatedError()intoutiland make it more general-purpose. Use this new helper to suppress fatal error when the JibskaffoldFilestarget is killed.Fixes #1198