Files
moby/distribution
Sebastiaan van Stijn 52774154c9 distribution: continueOnError: handle context cancellation / timeout
Before this change, it would fail to detect context errors, resulting in
pullEndpoints clobbering the context error and changing it into a fallback
error; 029933578b/distribution/pull.go (L114-L119)

While the context cancellation would still be handled, the error returned
would be wrapped, causing calling code to no longer being able to detect
it as context cancellation;
029933578b/distribution/pull.go (L125)

Context cancellation are now logged as "info" in daemon-logs, as they
are not an error from the daemon's perspective;

Before:

    DEBU[2025-01-18T14:59:10.079259676Z] pulling blob "sha256:8bb55f0677778c3027fcc4253dc452bc9c22de989a696391e739fb1cdbbdb4c2"
    ERRO[2025-01-18T14:59:10.564076135Z] Not continuing with pull after error: context canceled

After:

    DEBU[2025-01-18T15:09:56.743045420Z] pulling blob "sha256:8bb55f0677778c3027fcc4253dc452bc9c22de989a696391e739fb1cdbbdb4c2"
    INFO[2025-01-18T15:09:57.390835628Z] Not continuing with pull after error          error="context canceled"

This package needs a big cleanup for context- and error-handling, as it's
very messy, so these changes are only a short-term workaround.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-18 16:20:49 +01:00
..