containerd/remotes/docker
Kohei Tokunaga a97564411c remotes: fix dockerPusher to handle abort correctly
`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>
2021-11-26 13:43:01 +09:00
..
auth Adding scope tests for ParseAuthHeader 2021-10-27 11:09:32 -06:00
config refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
schema1 refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
authorizer.go Log unexpected responses 2020-09-03 14:52:11 +01:00
converter.go bugfix: support application/octet-stream during pull 2018-12-29 13:58:36 +08:00
errcode.go docs: Various typo found by codespell 2020-12-22 13:22:16 +08:00
errdesc.go Add distribution subpkgs to core 2019-10-07 13:38:12 -04:00
fetcher_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
fetcher.go Fix containerd fails to pull OCI image with non-http(s):// urls 2021-11-12 09:49:28 +09:00
handler_test.go Add unit test for func in remotes/docker/handler.go 2020-05-28 16:54:33 +08:00
handler.go remotes: support cross-repo-push 2019-06-13 09:51:46 +08:00
httpreadseeker.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
pusher_test.go remotes: fix dockerPusher to handle abort correctly 2021-11-26 13:43:01 +09:00
pusher.go remotes: fix dockerPusher to handle abort correctly 2021-11-26 13:43:01 +09:00
registry_test.go Use net.IP.IsLoopback() to match loopback addresses 2021-03-15 09:57:01 +05:30
registry.go Merge pull request #5160 from MadhavJivrajani/master 2021-03-17 09:37:17 -04:00
resolver_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
resolver.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
scope_test.go Export repository scope helper functions 2020-10-06 10:49:01 +09:00
scope.go Export repository scope helper functions 2020-10-06 10:49:01 +09:00
status.go remotes: fix dockerPusher to handle abort correctly 2021-11-26 13:43:01 +09:00