Fix access denied when killing stopped container#1447
Merged
dcantah merged 1 commit intomicrosoft:masterfrom Jul 8, 2022
Merged
Fix access denied when killing stopped container#1447dcantah merged 1 commit intomicrosoft:masterfrom
dcantah merged 1 commit intomicrosoft:masterfrom
Conversation
dcantah
reviewed
Jul 1, 2022
dcantah
reviewed
Jul 1, 2022
4930b4c to
071d095
Compare
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <[email protected]>
071d095 to
9e72a85
Compare
dcantah
approved these changes
Jul 1, 2022
helsaawy
approved these changes
Jul 7, 2022
Contributor
helsaawy
left a comment
There was a problem hiding this comment.
If we are switching over to go1.13 style errors, should we also add Is( implementations as well so we can get rid of the getInnerError in all the Is<Error>( functions?
func (e *HcsError) Is(target error) bool {
target = getInnerError
return errors.Is(e.Err, target)
}
Contributor
|
@helsaawy Good idea.. wanna take this up as a follow-up? |
Contributor
Am I being voluntold? 😅 |
Contributor
|
LOL possibly.. 😆 |
kiashok
pushed a commit
to kiashok/hcsshim
that referenced
this pull request
Jul 11, 2022
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <[email protected]>
princepereira
pushed a commit
to princepereira/hcsshim
that referenced
this pull request
Aug 29, 2024
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <[email protected]>
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.
This change fixes access denied errors when killing an already stopped host process container.
This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type.
Signed-off-by: Gabriel Adrian Samfira [email protected]