Issue #6362
Check for duplicated content happens without plugin input
Description
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.
Related issues
Associated revisions
Revision dc6acb9d
View on GitHub
Moving duplicate content check to finalize
fixes #6362 https://pulp.plan.io/issues/6362
Required PR: https://github.com/pulp/pulpcore/pull/599
Revision 7c032a16
View on GitHub
Moving duplicate content check to finalize
fixes #6362 https://pulp.plan.io/issues/6362
Required PR: https://github.com/pulp/pulpcore/pull/599
(cherry picked from commit dc6acb9d60a1d3aa61ff4def99cc12ddd9981076)
History
#2
Updated by ttereshc 10 months ago
- Related to Issue #5567: Content with duplicate repo_key_fields can be added to a repo version added
#3
Updated by ttereshc 10 months ago
- Related to Issue #6217: First repo_version can contain duplicates added
#4
Updated by daviddavis 10 months ago
We should either move this check to remove_duplicates[0] 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 10 months ago
Looks like plugins are calling remove_duplicates before resolving content[0]. If we go with updating remove_duplicates, we'll need to move it to the end.
#6
Updated by daviddavis 10 months ago
- Status changed from NEW to POST
- Assignee set to daviddavis
#10
Updated by daviddavis 10 months ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|db31633d5473d69ed8dbf76adeb4377ac2b30e8a.
#11
Updated by daviddavis 10 months ago
Applied in changeset pulp_file:dc6acb9d60a1d3aa61ff4def99cc12ddd9981076.
#12
Updated by daviddavis 10 months ago
Applied in changeset pulp_file:7c032a16021c1fe6e091273d6b8e3d04b3d16b43.
Please register to edit this issue
Checking for dupe content in finalize
fixes #6362 https://pulp.plan.io/issues/6362
Required PR: https://github.com/pulp/pulp_file/pull/368