aws-ecr-orb icon indicating copy to clipboard operation
aws-ecr-orb copied to clipboard

Configure retries for docker pull operations

Open DaJoTo opened this issue 2 years ago • 2 comments

What would you like to be added

Would be nice to see the addition of a parameter that sits above any commands that do docker pull operations. This parameter would just be a number to stipulate how many times the script should retry docker pull failures before aborting the pipeline

Something like: docker-pull-retries: 3

Why is this needed

The majority of our pipeline failures occur around a TLS timeout when doing pull operations (in our case doing the build-and-push-image command). The impact of this failure can be reduced by implementing a pause and retry pattern.

example of error:

Successfully created context "builder"
Unable to find image 'tonistiigi/binfmt:latest' locally
latest: Pulling from tonistiigi/binfmt

64c318a5: Pulling fs layer 
docker: error pulling image configuration: ... : net/http: TLS handshake timeout.

DaJoTo avatar Aug 23 '22 14:08 DaJoTo

Hey @DaJoTo,

Thanks for opening this issue. While it could be done, it does add some verbosity to the parameters. We’ll wait for a while to look for any community feedback before moving forward. I've added this to our backlog for now.

Thanks again!

Best, Brian

brivu avatar Dec 12 '22 18:12 brivu

Would really like this.

Similar to https://github.com/CircleCI-Public/aws-ecr-orb/pull/215, we experience regular enough failures due to connectivity issues that having a built in ability to retry would be of tremendous value.

michael-cybrid avatar Aug 22 '23 16:08 michael-cybrid