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
[release/1.6] retry request on writer reset #7461
[release/1.6] retry request on writer reset #7461
Conversation
when a put request is retried due to the response from registry, the body of the request should be seekable. A dynamic pipe is added to the body so that the content of the body can be read again. Currently a maximum of 5 resets are allowed, above which will fail the request. A new error ErrReset is introduced which informs that a reset has occured and request needs to be retried. also added tests for Copy() and push() to test the new functionality Signed-off-by: Akhil Mohan <makhil@vmware.com> (cherry picked from commit 8f4c23b) Signed-off-by: Akhil Mohan <makhil@vmware.com>
Hi @akhilerm. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
did you encounter any merge issues or was it a clean cherry pick? nvm I checked :-) clean cherry.. added comment to PR text.. Cheers. |
@@ -81,6 +151,12 @@ func TestCopy(t *testing.T) { | |||
testcase.source.size, | |||
testcase.source.digest) | |||
|
|||
// if an error is expected then further comparisons are not required |
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.
@mikebrow There was one merge conflict while cherry-picking here in the tests. Other than that it was clean.
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
Cherry-pick (clean) #6995
when a put request is retried due to the response from registry, the body of the request should be seekable. A dynamic pipe is added to the body so that the content of the body can be read again. Currently a maximum of 5 resets are allowed, above which will fail the request. A new error ErrReset is introduced which informs that a reset has occured and request needs to be retried.
also added tests for Copy() and push() to test the new functionality
Signed-off-by: Akhil Mohan makhil@vmware.com
(cherry picked from commit 8f4c23b)
Signed-off-by: Akhil Mohan makhil@vmware.com