Skip to content

Add dedicated failure reason for image pulling failures

What does this MR do?

Improves how failure reason filtering mechanism works and adds a new reason on Runner side: image_pull_failure.

Why was this MR needed?

Adding image_pull_failure is implemented to handle Add a separate failure reason for image pull fa... (#29295 - closed) • Tomasz Maczukin • 16.1. Currently this kind of failures is collected in the big bag called runner system failure. There is a user need to distinguish these specific failures.

With current implementation, however, that change would be unusable until the same failure reason would be introduced on GitLab side. So this MR improves also the mechanism that decouples the failure reason that Runner tracks internally (and may, for example, export in its metrics) from the failure reasons that are reported back to GitLab, using only a list of commonly supported values.

Previously whatever was chosen for API response, was also set in the metric. Now this is decoupled. The filtering mechanism got also a new compatibilityMap addition. The idea is that we may in the future extract more specific reasons from the wider scope of existing reasons. image_pull_failure is an excellent example - it's a quite specific failure reason that until now was part of the big bag named runner system failure.

The mapping mechanism allows to map the new reason to older ones - with chaining possible - and tries to find the newest reason in the chain that is supported by GitLab and could be sent back with the API response.

What's the best way to test this MR?

What are the relevant issue numbers?

References #29295 (closed)

Edited by Tomasz Maczukin

Merge request reports

Loading