Skip to content

Tag delete API

João Pereira requested to merge new-tags-api into release/2.8-gitlab

Context

The purpose of this change is to enable individual tag deletion.

We need this change to mitigate gitlab#31832 (closed) (and gitlab#34510 (closed), as a side effect).

A workaround (which was the best possible solution considering the registry limitations) has been previously implemented for GitLab (please see gitlab#15737 (closed) and gitlab!16886 (merged)) but the performance results are not satisfactory as highlighted in gitlab#31832 (closed).

MR gitlab!23325 (merged) was open to improve the GitLab performance based on the changes proposed here.

Changes

We started by replicating a pending upstream pull request which introduces a set of changes, including a new delete route for tags, but we found out that it would be better to do it differently (see !51 (comment 280020650) and !51 (comment 280019753)).

Therefore, this MR introduces a new DELETE /v2/<name>/tags/reference/<reference> route. This enables the deletion (untag) of individual tags in a repository (name) by name (reference).

Notes

  • This change implies a bump to the release minor version, from 2.7 to 2.8, so this should probably be merged into a new branch (i.e. release/2.8-gitlab) instead of release/2.7-gitlab once approved.

  • The squash commit message should be updated before merging. I have not squashed commits to preserve the sequence of changes and make it easier to understand the experiments we've made (including the initial upstream port). The following message should be used instead:

    Tag delete API
    
    Introduces a new `DELETE /v2/<name>/tags/reference/<reference>` route.
    This enables the deletion (untag) of individual tags in a repository
    (`name`) by name (`reference`).

Related to gitlab#31832 (closed) and gitlab#34510 (closed).

Edited by João Pereira

Merge request reports