<div dir="ltr"><div>A while ago RemoveDuplicates stage [0] was introduced to solve the problem of enforcing uniqueness constraints within a repository version at sync time.</div><div>The same problem ought to be solved when content which already exists in Pulp is added to a repository. E.g. Content was uploaded, or content was synced as a part of other repo. And now you want to add/copy it to your repo.</div><div><br></div><div>RPM plugin has to solve this problem (specific examples can be seen in this issue [1]).</div><div></div><div>It would be great if other plugins can share if the same problem exists for them and if it's valuable to add some mechanism to the pulpcore.</div><div><br></div><div>I believe, if you use RemoveDuplicates stage during sync, then your plugin is impacted by the described problem.</div><div>My personal opinion: if RemoveDuplicates stage was worth adding to the pulpcore (stages API in pulpcore-plugin), a mechanism to ensure uniqueness constraints within a repo version at association time makes sense to add as well.<br></div><div><br></div><div>[0] <a href="https://github.com/pulp/pulpcore-plugin/blob/master/pulpcore/plugin/stages/association_stages.py#L90">https://github.com/pulp/pulpcore-plugin/blob/master/pulpcore/plugin/stages/association_stages.py#L90</a></div><div>[1] <a href="https://pulp.plan.io/issues/4898">https://pulp.plan.io/issues/4898</a></div></div>