Task #3222
closedStory #3209: As a user, I have Repository Versions
Add 'complete' attribute to the RepositoryVersion model
100%
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
Updated by bmbouter almost 7 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.
Updated by bmbouter almost 7 years ago
- Description updated (diff)
Clarifying the situation where the docs are required.
Updated by dkliban@redhat.com almost 7 years ago
- Blocks Story #3226: As a user, I am guaranteed that my incomplete repository versions are cleaned up after a crash added
Updated by amacdona@redhat.com almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to amacdona@redhat.com
Added by amacdona@redhat.com almost 7 years ago
Added by amacdona@redhat.com almost 7 years ago
Revision cb9351d9 | View on GitHub
Add complete field
Updated by amacdona@redhat.com almost 7 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
Updated by amacdona@redhat.com almost 7 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|cb9351d92ff7ec75c0edfe4abb2065ae9a945195.
Added by amacdona@redhat.com almost 7 years ago
Revision 74d1dbf4 | View on GitHub
Mark new versions complete after sync
re #3222
Updated by dalley over 6 years ago
Are the un-checked checkbox items things which have yet to be done? Are they being tracked elsewhere?
Updated by amacdona@redhat.com over 6 years ago
Complete work checked off. One item was incomplete, which was adding plugin writer documentation, so I created a new story.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Add complete field
closes #3222 https://pulp.plan.io/issues/3222