Project

Profile

Help

Issue #8793

closed

Retained_versions doesn't properly keep all content present in repository

Added by gerrod almost 3 years ago. Updated almost 3 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 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 - CURRENTRELEASEdaviddavis

Actions
Actions #1

Updated by gerrod almost 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.

Actions #2

Updated by daviddavis almost 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.

Actions #3

Updated by daviddavis almost 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.

Actions #4

Updated by daviddavis almost 3 years ago

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

Updated by gerrod almost 3 years ago

  • Assignee deleted (gerrod)
Actions #6

Updated by daviddavis almost 3 years ago

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

Updated by pulpbot almost 3 years ago

  • Status changed from ASSIGNED to POST
Actions #8

Updated by daviddavis almost 3 years ago

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

Added by daviddavis almost 3 years ago

Revision 917dab8c | View on GitHub

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

Actions #9

Updated by daviddavis almost 3 years ago

  • Status changed from POST to MODIFIED
Actions #10

Updated by pulpbot almost 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF