Using Both Max Unique Tags and Tag Retention

JFrog Artifactory Documentation

ft:sourceType
Paligo

The main implication of applying both Max Unique Tags and Tag Retention together is that Max unique tags takes precedence and will remove all retention revisions associated with the current tag if it is being deleted by the logic. This means that if a tag is removed due to exceeding the Max Unique Tags limit (being the oldest unique tag when a new one has been pushed), all of its Tag Retention copies will be removed as well.

This prevents Artifactory from storing redundant revision copies of unneeded tags if they are removed by the Max Unique Tags logic. Therefore, Tag Retention duplicates continue to aggregate with each tag overwrite, as long as the current tag remains within the Max Unique Tags limit.

This interaction between Max unique tags and Tag retention is best understood as a matrix. Looking at the following diagram, the X axis (left to right) represents unique tags being pushed into your repository. The Y axis (top to bottom) represents overwrites of the same tag over and over again.

both_nothing_deleted.png

Note

In the diagrams, the green boxes = stored tags, and the gray boxes = deleted tags.

In this example, we have set the following limits:

  • Max Unique Tags = 3

  • Tag Retention = 3

These limits are represented as a blue area applied to both axes.

When you exceed the Max Unique Tags limit, the oldest unique tag will be removed from Artifactory. Since the unique tag is considered a lead tag, all of its overwrite revisions that are associated with it will also be removed. In the following example, the moment tag V 2.0.1 is uploaded, then V 1.0.0 is removed (since it exceeded the max unique tags settings), and together with it, all SHA1, SHA2, and SHA3 are previous revisions of V 1.0.0.

both_shas_deleted.png