Story #4898
closedAs a user, no "duplicated" content is present in a repo version
100%
Description
"Duplicates" are two pieces of content which are not allowed to exist within a single repo version.
E.g.
- RPMs with the same nevra but different checksum types can't be in a single repo
- Advisories with the same id can't be in one repo
- Only one modulemd_defaults per module (name) can be in a single repo
There is a way to prevent that at sync time with RemoveDuplicates stage.
Currently there is no mechanism to prevent it if content is already in Pulp and user copies/adds content to a repo version.
Todos¶
- add repo_key to RPMs for its NEVRA (but not checksum)
- modulemd_default object gets a repo_key
- remove the RemoveDuplicates stage from the pulp_rpm custom pipeline
Related issues
Updated by ttereshc over 5 years ago
- Related to Story #5008: As a user, I can enforce content specific uniqueness constaints in a repo version added
Updated by daviddavis about 5 years ago
- Related to Story #5084: As a user, after copy or repo version creation there are no advisories with the same id added
Updated by bmbouter about 5 years ago
If we add repo_key
to each of the content units, would we still need the RemoteDuplicates stage?
Updated by ttereshc about 5 years ago
I don't think we need RemoveDuplicates at all. Should we remove it from the Plugin API? I haven't seen your implementation of repo_key yet but the discussions in the past gave me an impression that it will fully substitute RemoveDuplicates stage.
We can't add a repo_key for Advisories though because we need to merge them. So Advisories will wait for a mechanism we are discussing on the pulp-dev now where a plugin can influence which content is added to a repo version creation.
Updated by bmbouter about 5 years ago
- Description updated (diff)
ttereshc wrote:
I don't think we need RemoveDuplicates at all. Should we remove it from the Plugin API? I haven't seen your implementation of repo_key yet but the discussions in the past gave me an impression that it will fully substitute RemoveDuplicates stage.
I agree. This ticket should include removing the RemoveDuplicates stage. I updated a todos section in the body.
We can't add a repo_key for Advisories though because we need to merge them. So Advisories will wait for a mechanism we are discussing on the pulp-dev now where a plugin can influence which content is added to a repo version creation.
I see what you're saying about this being related. I'll reply on that thread some.
Is the Advisory merging unhandled during sync today? I was looking in pulp_rpm and I see it only handles Package and RepoMetadataFile , so repo_key can fully replace RemoveDuplicates stage. Does that sound right to you?
Updated by ttereshc about 5 years ago
yes, it sounds right. Merging of advisories is not handled at sync at the moment.
Added by ttereshc about 5 years ago
Updated by ttereshc about 5 years ago
- Status changed from NEW to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 4e932e58006d75a58a3df9a2c249477165916dea.
Updated by ttereshc almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Ensure no duplicates are present in a repo version.
Also removes one_shot_upload as it's not used anymore.
closes #4898 https://pulp.plan.io/issues/4898