Actions
Task #3222
closedStory #3209: As a user, I have Repository Versions
Add 'complete' attribute to the RepositoryVersion model
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
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
Actions
Add complete field
closes #3222 https://pulp.plan.io/issues/3222