Project

Profile

Help

Task #3222

closed

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

Add 'complete' attribute to the RepositoryVersion model

Added by dkliban@redhat.com over 6 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 31
Quarter:

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'.


Related issues

Blocks Pulp - Story #3226: As a user, I am guaranteed that my incomplete repository versions are cleaned up after a crashCLOSED - CURRENTRELEASEjortel@redhat.com

Actions
Actions #1

Updated by dkliban@redhat.com over 6 years ago

  • Parent issue set to #3209
Actions #2

Updated by bmbouter over 6 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.

Actions #3

Updated by bmbouter over 6 years ago

  • Description updated (diff)

Clarifying the situation where the docs are required.

Actions #4

Updated by daviddavis over 6 years ago

  • Groomed changed from No to Yes
Actions #5

Updated by dkliban@redhat.com over 6 years ago

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

Updated by dkliban@redhat.com over 6 years ago

  • Sprint/Milestone set to 53
Actions #7

Updated by amacdona@redhat.com over 6 years ago

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

Updated by amacdona@redhat.com over 6 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

Actions #9

Updated by amacdona@redhat.com over 6 years ago

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

Added by amacdona@redhat.com over 6 years ago

Revision 74d1dbf4 | View on GitHub

Mark new versions complete after sync

re #3222

Actions #10

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 31
Actions #11

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (53)
Actions #12

Updated by dalley about 6 years ago

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

Actions #13

Updated by amacdona@redhat.com about 6 years 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

Actions #14

Updated by dkliban@redhat.com about 6 years ago

  • Sprint/Milestone set to 3.0.0
Actions #15

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)
Actions #16

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF