Handle 503 status from Dependency Proxy

Summary

Intermittent 503 errors when connecting to Dependency Proxy cause job failures.

Steps to reproduce

  1. Set up CI job using an image which will be downloaded via Dependency Proxy
  2. Receive a 503 when downloading an image
  3. Job stops and does not retry the download.
.gitlab-ci.yml
image: node:latest

job:
  script:
    - echo

Actual behavior

Job stops after a pull failure:

WARNING: Failed to pull image with policy "Always": image pull failed: rpc error: code = Unknown desc = Error response from daemon: received unexpected HTTP status: 503 Service Unavailable
ERROR: Job failed: prepare environment: waiting for pod running: pulling image "gitlab.com:443/gitlab-gold/dependency_proxy/containers/docker:latest": image pull failed: rpc error: code = Unknown desc = Error response from daemon: received unexpected HTTP status: 503 Service Unavailable. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information

Expected behavior

I would expect to see some attempts at retrying the failed connection

Relevant logs and/or screenshots

Environment description

config.toml contents
Add your configuration here

Used GitLab Runner version

Possible fixes