We should restart the push stream from the beginning only when the client is interrupted by network error, retryable http codes from registry and unexpected 500. Note that because building images are expensive, we would want the registry client to be more tolerable on unexpected conditions, retrying on 500 seems acceptable.
Also refactored the push fixture so we can add more useful tests later.
Depend on https://github.com/uber/makisu/pull/346 for error wrapping.
We should restart the push stream from the beginning only when the client is interrupted by network error, retryable http codes from registry and unexpected 500. Note that because building images are expensive, we would want the registry client to be more tolerable on unexpected conditions, retrying on 500 seems acceptable.
Also refactored the push fixture so we can add more useful tests later.