Project

Profile

Help

Issue #6362

closed

Check for duplicated content happens without plugin input

Added by ttereshc over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 69
Quarter:

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

Related to Pulp - Issue #5567: Content with duplicate repo_key_fields can be added to a repo versionCLOSED - CURRENTRELEASEfao89Actions
Related to Pulp - Issue #6217: First repo_version can contain duplicatesCLOSED - CURRENTRELEASEActions
Actions #1

Updated by ttereshc over 4 years ago

  • Description updated (diff)
Actions #2

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
Actions #3

Updated by ttereshc over 4 years ago

  • Related to Issue #6217: First repo_version can contain duplicates added
Actions #4

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.

[0] https://github.com/pulp/pulpcore/blob/747504c019e618dbb5949ead75144f7d1e731cff/pulpcore/plugin/repo_version_utils.py#L16

Actions #5

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.

[0] https://github.com/pulp/pulp_rpm/blob/0464c62ff2b157124a1b86e6fab5a8b562d062fe/pulp_rpm/app/models/repository.py#L118

Actions #6

Updated by daviddavis over 4 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis
Actions #7

Updated by fao89 over 4 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 69
Actions #10

Updated by daviddavis over 4 years ago

  • Status changed from POST to MODIFIED

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)

Actions #13

Updated by ttereshc over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Sprint/Milestone set to 3.3.0

Also available in: Atom PDF