Project

Profile

Help

Task #3222

Story #3209: As a user, I have Repository Versions

Add 'complete' attribute to the RepositoryVersion model

Added by dkliban@redhat.com almost 2 years ago. Updated 7 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 31

Description

Motivation

There needs to be a way to prevent the RepositoryVersion from being used before it is completely constructed.

Design

Here is a recap of the approach used with Publications in #3184 rewritten to apply to repo versions.

  • Add an attribute called 'complete' to RepositoryVersion which defaults to False.
  • Update the viewset so that it excludes RepositoryVersion objects that have complete=False
  • Update the filterset for RepositoryVersion objects to also exclude RepositoryVersion that have complete=False
  • After the plugin code returns control to core, have core set complete=True on the RepositoryVersion and then call save() before setting the created_resources on the Task

Additional Requirements:

Only 'complete' repo versions can be published
Also add docs for plugin writers specifically for when they need to create RepositoryVersion objects. They need to understand the pattern regarding 'complete'.


Checklist


Related issues

Blocks Pulp - Story #3226: As a user, I am guaranteed that my incomplete repository versions are cleaned up after a crash MODIFIED Actions

History

#1 Updated by dkliban@redhat.com almost 2 years ago

  • Parent task set to #3209

#2 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

This leaves out a crash-safe cleanup mechanism. That is going to come as a separate piece of work that can be added onto this design later.

#3 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

Clarifying the situation where the docs are required.

#4 Updated by daviddavis almost 2 years ago

  • Groomed changed from No to Yes

#5 Updated by dkliban@redhat.com almost 2 years ago

  • Blocks Story #3226: As a user, I am guaranteed that my incomplete repository versions are cleaned up after a crash added

#6 Updated by dkliban@redhat.com almost 2 years ago

  • Sprint/Milestone set to 53

#7 Updated by amacdona@redhat.com almost 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com

#8 Updated by amacdona@redhat.com almost 2 years ago

  • Status changed from ASSIGNED to POST

Primary PR:
https://github.com/pulp/pulp/pull/3268/

Changes are used and tested in the file plugin in this PR:
https://github.com/pulp/pulp_file/pull/27

#9 Updated by amacdona@redhat.com almost 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#10 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 31

#11 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (53)

#12 Updated by dalley over 1 year ago

Are the un-checked checkbox items things which have yet to be done? Are they being tracked elsewhere?

#13 Updated by amacdona@redhat.com over 1 year ago

Complete work checked off. One item was incomplete, which was adding plugin writer documentation, so I created a new story.

https://pulp.plan.io/issues/3500

#14 Updated by dkliban@redhat.com over 1 year ago

  • Sprint/Milestone set to 3.0

#15 Updated by bmbouter 7 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

Please register to edit this issue

Also available in: Atom PDF