libnetwork/drivers/windows: fix error-matching for hcsshim "not found"#49202
Merged
akerouanton merged 1 commit intomoby:masterfrom Jan 3, 2025
Merged
libnetwork/drivers/windows: fix error-matching for hcsshim "not found"#49202akerouanton merged 1 commit intomoby:masterfrom
akerouanton merged 1 commit intomoby:masterfrom
Conversation
11a0595 to
5507887
Compare
Member
Author
|
Temporarily moved to draft as it's stacked on #49201 |
Member
Author
|
OH! I'm wrong; it's not hcsshim v0.12, but the same bump as what caused ; this is the offending commit; microsoft/hcsshim@6d67a30 This PR: |
5507887 to
7ed6c18
Compare
1 task
This code has some gnarly string-matching to detect "not found" errors returned by hcsshim. Hcsshim at some point changed this error to lowercase; microsoft/hcsshim@6d67a30 It looks like we ran into that problem in integration tests, which was fixed in c530c9c when updating hcsshim, however, it was only fixed in tests, and hiding the actual issue in our code. It looks like hcsshim has some utilities to detect error-types, such as the IsElementNotFoundError function in hcn, which is the newer API that also wraps the "HNS" service; https://github.com/microsoft/hcsshim/blob/d9a4231b9d7a03dffdabb6019318fc43eb6ba996/hcn/hcnerrors.go#L75-L77 But unfortunately, the hns API used by us, does not return typed errors, and returns HNS errors as a untyped formatted string. Signed-off-by: Sebastiaan van Stijn <[email protected]>
7ed6c18 to
5b31a5b
Compare
robmry
approved these changes
Jan 3, 2025
akerouanton
approved these changes
Jan 3, 2025
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.
relates to:
libnetwork/drivers/windows: fix error-matching for hcsshim "not found"
This code has some gnarly string-matching to detect "not found" errors
returned by hcsshim.
Hcsshim at some point changed this error to lowercase;
microsoft/hcsshim@6d67a30
It looks like we ran into that problem in integration tests, which was
fixed in c530c9c when updating hcsshim,
however, it was only fixed in tests, and hiding the actual issue in our
code.
It looks like hcsshim has some utilities to detect error-types, such as the
IsElementNotFoundError function in hcn, which is the newer API that also wraps
the "HNS" service;
https://github.com/microsoft/hcsshim/blob/d9a4231b9d7a03dffdabb6019318fc43eb6ba996/hcn/hcnerrors.go#L75-L77
But unfortunately, the hns API used by us, does not return typed errors, and
returns HNS errors as a untyped formatted string.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)