Issue #6362
closedCheck 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
Updated by ttereshc over 4 years ago
- Related to Issue #5567: Content with duplicate repo_key_fields can be added to a repo version added
Updated by ttereshc over 4 years ago
- Related to Issue #6217: First repo_version can contain duplicates added
Updated by daviddavis over 4 years 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.
Updated by daviddavis over 4 years 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.
Updated by daviddavis over 4 years ago
- Status changed from NEW to POST
- Assignee set to daviddavis
Added by daviddavis over 4 years ago
Updated by fao89 over 4 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 69
Updated by pulpbot over 4 years ago
Updated by pulpbot over 4 years ago
Added by daviddavis over 4 years ago
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
Updated by daviddavis over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|db31633d5473d69ed8dbf76adeb4377ac2b30e8a.
Updated by daviddavis over 4 years ago
Applied in changeset pulp_file:dc6acb9d60a1d3aa61ff4def99cc12ddd9981076.
Added by daviddavis over 4 years ago
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)
Updated by daviddavis over 4 years ago
Applied in changeset pulp_file:7c032a16021c1fe6e091273d6b8e3d04b3d16b43.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Sprint/Milestone set to 3.3.0
Checking for dupe content in finalize
fixes #6362 https://pulp.plan.io/issues/6362
Required PR: https://github.com/pulp/pulp_file/pull/368