Handle connection errors with the container registry in ContainerExpirationPolicies::CleanupContainerRepositoryWorker
Summary
- The
ContainerExpirationPolicies::CleanupContainerRepositoryWorker
can have a few network issues when connecting the container registry. - These issues are not handled by the worker and will end up in failing the worker: Kibana (internal), Sentry (internal).
Improvements
- use a explicit timeout
- use a retry as these seemed to be intermittent
- properly log the error with additional information (url, container repository id)
- put the container repository in the proper state (
unfinished
)
Risks
- I'm not sure that we have a high risk here as it is about error handling. We already are in an error situation, so handling it will not make it disappear.
Involved components
Edited by David Fernandez