Project

Profile

Help

Issue #8793

Retained_versions doesn't properly keep all content present in repository

Added by gerrod 24 days ago. Updated 19 days 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 97
Quarter:

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

Related to Pulp - Story #8368: Limit number of old repository versions.CLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 917dab8c View on GitHub
Added by daviddavis 19 days ago

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

History

#1 Updated by gerrod 24 days 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.

#2 Updated by daviddavis 24 days 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.

#3 Updated by daviddavis 24 days 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.

#4 Updated by daviddavis 24 days ago

  • Related to Story #8368: Limit number of old repository versions. added

#5 Updated by gerrod 24 days ago

  • Assignee deleted (gerrod)

#6 Updated by daviddavis 23 days ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#7 Updated by pulpbot 20 days ago

  • Status changed from ASSIGNED to POST

#8 Updated by daviddavis 19 days ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 97

#9 Updated by daviddavis 19 days ago

  • Status changed from POST to MODIFIED

#10 Updated by pulpbot 19 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF