Check for duplicated content happens without plugin input
Currently, due to #5567, a check is performed in add_content and the error is raised , plugins might want to deal with duplicates themselves at the finalization stage of the repo version creation.
For the cases when a user can't change much (e.g. sync from a remote, copy different versions of the same advisory from multiple repos), Pulp should try its best to solve issues itself without producing an error.
The check can be performed after finalize_repo_version is happened but before a repo version is marked as complete.
#4 Updated by daviddavis 5 months ago
We should either move this check to remove_duplicates which is called from finalize_new_version or roll a new repo util method that plugins can call during finalize to check for duplicates. The latter gives the plugin writer greater flexibility. However, I can't think of a case where a plugin might want to actually have that flexibility.
#5 Updated by daviddavis 5 months ago
Looks like plugins are calling remove_duplicates before resolving content. If we go with updating remove_duplicates, we'll need to move it to the end.
#11 Updated by daviddavis 4 months ago
Applied in changeset pulp_file:dc6acb9d60a1d3aa61ff4def99cc12ddd9981076.
#12 Updated by daviddavis 4 months ago
Applied in changeset pulp_file:7c032a16021c1fe6e091273d6b8e3d04b3d16b43.
Please register to edit this issue