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

Also available in: Atom PDF