It is hard to tell where the `log_hook` log comes from, when we run test
parallelly. Add test name as field as debug purpose.
```
log_hook.go:47: time="2023-01-29T13:09:37.687070239+08:00" level=debug msg=fetch func=remotes.Fetch file="/home/fuwei/go/src/github.com/containerd/containerd/remotes/handlers.go:114" digest="sha256:ea362f368469f909a95f9a6e54ebe0121ce0a8e3c30583dd9c5fb35b14544dec" mediatype=application/vnd.docker.image.rootfs.diff.tar.gzip size=28566425 testcase=TestCRIImagePullTimeout/NoDataTransferred
```
REF: #8024
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Update the release date to better coincide with Kubernetes 1.23 end
of life and the containerd 1.7 release.
Signed-off-by: Derek McGowan <derek@mcg.dev>
Some of this code was originally added in b7b1200dd3,
which likely meant to initialize the slice with a length to reduce allocations,
however, instead of initializing with a zero-length and a capacity, it
initialized the slice with a fixed length, which was corrected in commit
0c63c42f81.
This patch initializes the slice with a zero-length and expected capacity.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
In the refactor from 926b9c72f61b5be6bf8d952512f1d0932fbaf898, the error
handling was substantially reworked, and changed the types of errors
returned.
Notably, in the case of a network error, instead of propogating the
error through to return from pushWriter.Write (as previously), it would
be propagated through to pushWriter.Commit - however, this is too late,
since we've already closed the io.Pipe by the time we would have reached
this function. Therefore, we get the generic error message "io:
read/write on closed pipe" for *every network error*.
This patch corrects this behavior to ensure that the correct error
object is always returned as early as possible, by checking the error
result after writing and detecting a closed pipe.
Additionally, we do some additional hardening - specifically we prevent
falling through when resetting the content or detecting errors, and
update the tests to explicitly check for the ErrReset message.
Signed-off-by: Justin Chadwell <me@jedevc.com>
A build was hanging with `UBUNTU_VERSION=20.04`
```
...
=> [base 3/5] RUN APT-GET update && apt-get install -y dpkg-dev git make pkg-config 73.2s
=> => # questions will narrow this down by presenting a list of cities, representing
=> => # the time zones in which they are located.
=> => # 1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
=> => # 2. America 5. Arctic 8. Europe 11. SystemV
=> => # 3. Antarctica 6. Asia 9. Indian 12. US
=> => # Geographic area:
...
```
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>