Retained_versions doesn't properly keep all content present in repository
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.
- 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.
#2 Updated by daviddavis 4 months 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.
Please register to edit this issue