<div dir="ltr"><div>Great question. Currently, we are creating empty repository versions for no-op add/remove calls in all plugins as you demonstrated. Lets keep that same behavior for tags for now (option A).<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 10:08 AM Lubos Mjachky <<a href="mailto:lmjachky@redhat.com">lmjachky@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear colleagues,<br></div><div><br></div><div>currently, I am working on the issue <a href="https://pulp.plan.io/issues/4934" target="_blank">https://pulp.plan.io/issues/4934</a> which requests to implement a feature for tagging and untagging manifests within the docker's plugin. One thing to comprehend is not clear for me. When a user wants to tag a manifest with an existing name and with a same digest, what should happen?</div><div>a) A new repository version with no new content added should be created.</div><div>b) A new repository version with the same content removed and added should be created.</div><div>c) An error message should be returned in the response. A new repository version is not created.</div><div><br></div><div>For example, in the RPM plugin, when I execute the following call (I think it is related to this problem) two times (source: <a href="https://pulp-rpm.readthedocs.io/en/latest/workflows/upload.html" target="_blank">https://pulp-rpm.readthedocs.io/en/latest/workflows/upload.html</a>):</div><div><span class="gmail-m_-6083117823140457632gmail-pre" style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;box-sizing:border-box">$</span><span style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap"> </span><span class="gmail-m_-6083117823140457632gmail-pre" style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;box-sizing:border-box">http</span><span style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap"> </span><span class="gmail-m_-6083117823140457632gmail-pre" style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;box-sizing:border-box">POST</span><span style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap"> </span><span class="gmail-m_-6083117823140457632gmail-pre" style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;box-sizing:border-box">:24817${REPO_HREF}versions/</span><span style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap"> </span><span class="gmail-m_-6083117823140457632gmail-pre" style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;box-sizing:border-box">add_content_units:="[\"$CONTENT_HREF\"]"</span></div><div><br></div><div>Two separate repository versions are created. The first repository version contains the new rpm package in the "added" field:</div><div>{<br>    "_created": "2019-08-02T12:55:46.357836Z",<br>    "_href": "/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/3/",<br>    "base_version": null,<br>    "content_summary": {<br>        "added": {<br>            "rpm.package": {<br>                "count": 1,<br>                "href": "/pulp/api/v3/content/rpm/packages/?repository_version_added=/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/3/"<br>            }<br>        },<br>        "present": {<br>            ...<br>        },<br>        "removed": {}<br>    },<br>    "number": 3<br>}<br><br></div><div>However, the second repository version has got the empty "added" field:</div><div>{<br>    "_created": "2019-08-02T12:56:14.214961Z",<br>    "_href": "/pulp/api/v3/repositories/4e2f5db5-7555-41c9-8abe-44a2982e9a3e/versions/4/",<br>    "base_version": null,<br>    "content_summary": {<br>        "added": {},<br>        "present": {<br>            ...<br>        },<br>        "removed": {}<br>    },<br>    "number": 4<br>}<br></div><div><br></div><div>* The field "present" contains the same content in each repository version, therefore, I have not included it in the snippet.</div><div><br></div><div>Thank you in advance,</div><div>LM</div></div>
_______________________________________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com" target="_blank">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-dev</a><br>
</blockquote></div>