Skip to content
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.5] cherry-pick: remotes: fix dockerPusher to handle abort correctly #7467

Merged
merged 1 commit into from Oct 4, 2022

Conversation

estesp
Copy link
Member

@estesp estesp commented Oct 3, 2022

dockerPusher provides pushWriter which implements content.Writer. However, even if pushWriter become abort status (i.e. Close() is called before Commit()), dockerPusher doesn't recognise that status and treats that writer as on-going.
This behaviour doesn't allow the client to retry an aborted push.

This commit fixes this issue.
This commit also adds an test to ensure that the issue is fixed.

Signed-off-by: Kohei Tokunaga ktokunaga.mail@gmail.com
(cherry picked from commit a975644)
Signed-off-by: Phil Estes estesp@gmail.com

`dockerPusher` provides `pushWriter` which implements `content.Writer`.
However, even if `pushWriter` become abort status (i.e. `Close()` is called
before `Commit()`), `dockerPusher` doesn't recognise that status and treats that
writer as on-going.
This behaviour doesn't allow the client to retry an aborted push.

This commit fixes this issue.
This commit also adds an test to ensure that the issue is fixed.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
(cherry picked from commit a975644)
Signed-off-by: Phil Estes <estesp@gmail.com>
Copy link
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikebrow mikebrow merged commit a389eb6 into containerd:release/1.5 Oct 4, 2022
@samuelkarp samuelkarp added this to the 1.5.14 milestone Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants