Skip to content

Add search by tags to Image Repository

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

When wanting to tag the latest and latest-of-a-branch docker registry tags, we have to get the last information from the registry. We can do this with by getting the tags or get the tags within a project API calls. Right now, both these calls list all tags, which is not only slow, it potentially also results in pagination. And while we could work around the pagination issue (get the project ID, tags_count, and set the results per page to tags_count on a second api call for the specific set of tags), this is error prone (exceeding the max page size etc) and expensive (bandwith CPU etc). Especially, when I really I am only interested in '^v3.' or '^v'.

Intended users

Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/

User experience goal

Speed improvement for the user, developer improvement by getting more specific information.

Proposal

In !29763 (merged) the capability to add 'searching in the name' was added. Likewise, we should add the same for the 'tags' content. While having a full-regex in the search query would be nice, it would be hard to encode, so instead of a full search, a 'starts_with' like search would be more fruitful, this because many proper tags will likely start with a digit or a 'v', but many 'other' tags would be for intermediate runs that contains something like 'hash:pipelineID' and most often we'd be interested in a version match. This would potentially pave the way for adding a 'filter' field on the registry page (where even here, a starts_with like filter would not be bad at all).

Further details

Doing a full-on docker publishing, including tagging the 'latest' and 'v3.6' for a 'v3.6.2' for example would be then possible without having to do many expensive queries with lots of parsing.

But maybe more importantly, having this API, opens the way to add a 'search' function to the registry 'Image tags' page, just like there is on the 'Image repositories'

Documentation

Updating the container registry page accordingly.

Links / references

Edited by 🤖 GitLab Bot 🤖