-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Improve host fallback behaviour in docker remote #3868
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
Conversation
|
Had a little bit of difficulty coming up with good tests for this, any pointers would be helpful. I definitely think tests are needed to ensure this behaviour isn't lost. |
|
Build succeeded.
|
The tests have a common pattern, but most rely on returning an HTTP code. You can try either returning a panic in the handler or wrapping the listener to return a connection which closes. TLS to non-TLS endpoint could simulate the error too. |
Codecov Report
@@ Coverage Diff @@
## master #3868 +/- ##
==========================================
- Coverage 45.72% 42.46% -3.26%
==========================================
Files 117 130 +13
Lines 11765 14702 +2937
==========================================
+ Hits 5379 6243 +864
- Misses 5462 7538 +2076
+ Partials 924 921 -3
Continue to review full report at Codecov.
|
|
Build succeeded.
|
Thanks for the pointers, working on tests now. |
|
Tests added. They aim to test two cases:
|
|
Build succeeded.
|
|
Build succeeded.
|
This commit improves the fallback behaviour when resolving and fetching images with multiple hosts. If an error is encountered when resolving and fetching images, and more than one host is being used, we will try the same operation on the next host. The error from the first host is preserved so that if all hosts fail, we can display the error from the first host. fixes containerd#3850 Signed-off-by: Alex Price <aprice@atlassian.com>
|
Build succeeded.
|
fuweid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dmcgowan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Its been over a month since 1.3.2 was released. Do we know when we're expecting the next release which will include this? |
This commit improves the fallback behaviour when resolving and
fetching images with multiple hosts. If an error is encountered
when resolving and fetching images, and more than one host is being
used, we will try the same operation on the next host. The error
from the first host is preserved so that if all hosts fail, we can
display the error from the first host.
fixes #3850
Signed-off-by: Alex Price aprice@atlassian.com