Issue #8793
closedRetained_versions doesn't properly keep all content present in repository
Description
Still have more testing to do to see if this also affects just using the repository field for publications (probably does since that just grabs the latest version), but if a repository is using the retained_versions field and a publication is created from this repository it won't contain the content from the deleted versions even though they are till present the repository.
This issue could affect other publication base plugins.
Related issues
Updated by gerrod over 3 years ago
- Subject changed from Publications with repository_version set don't properly publish all content when using retained_versions to Retained_versions doesn't properly keep all content present in repository
To test: Create repository with retained_versions 1. Add one content unit 3 times. Check summary of repo_version 3. Expected summary present: 3, Actual summary present: 1.
Updated by daviddavis over 3 years ago
- Project changed from File Support to Pulp
I was able to reproduce this. I did some digging and the problem is that when a new version is generated here it triggers the cleanup of old repo versions which in turn calls repo version delete(). But here you'll notice that there's a conditional based on repository version complete
. But the repository version hasn't been saved yet (with complete set to True). I believe that saving the repository version first before saving the repository should probably fix this bug. Not sure if that's the right solution though.
Updated by daviddavis over 3 years ago
- Sprint/Milestone set to 3.13.0
I don't think we want to ship the version retention feature in 3.13 without this fix.
Updated by daviddavis over 3 years ago
- Related to Story #8368: Limit number of old repository versions. added
Updated by daviddavis over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by pulpbot over 3 years ago
- Status changed from ASSIGNED to POST
Updated by daviddavis over 3 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 97
Added by daviddavis over 3 years ago
Updated by daviddavis over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|917dab8cb321ec4dcf9e07257c1ea89c637a64af.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Fixed retained version bug where content wasn't updated
Fixed a bug in the retained versions code where content wasn't being properly moved to newer repo versions when old versions were cleaned up.
fixes #8793