Skip to content

Update the GitLab Container Registry client to support the new API

🔥 Problem

Currently, cleanup policies are slow for a main technical issue: getting the creation timestamp of a single tag is a Container Registry API request.

As we can imagine, the more tags we need to process, the more pings to the Container Registry we're going to trigger.

We improved the situation around this using caching in !69459 (merged).

Proposal

As for integrating the new API, we will need a new function on the "gitlab" (container registry) client class. Given that the API is paginated, we need to make sure that callers of that function are aware of that. For this, we can simply require a block. That block will receive an array of tags (which is basically the page of tags).

🔬 Implementation details

See the implementation details here: &8379 (comment 1025779804)

Edited by Tim Rizzi