Story #4678
closedAs a plugin writer, I have Master/Detail Publications
100%
Description
Problem 1: unnecessary calls¶
As discussed on the pulp-dev list one issue is that users want to make a Publication, but to do so they first have to make a Publisher. This creates several downsides:
a) it introduces a concept the user and workflow performs but doesn't need, the creation of a Publisher.
b) The user has to CRUD and manager their publishers and their publications, when they just want publications
c) it requires plugin writers to provide a publisher when neither they or they users need one
Currently the Publication viewset is provided by core and provides Read, List, and Delete but not create, you have to either use a Publisher or the plugin provides its own viewset for Publications like pulp_ansible does.
Problem 2: plugin writers can't record extra parameters on how the Publication was made¶
Since Publication's are never subclassed they cannot have extra plugin-defined attributes on them.
The user would create the file plugin for example at:
/pulp/api/v3/publications/file/file/
Solution¶
Allow the Publication endpoint to be POST and have it create the publication via a task that the user can monitor. This will be on a Publication which would be Master/Detail provided by core similar to how Remote's are provided. This resolves problem 1 because plugins can have their users POST to publications as 1 call instead of 2.
Switching to Master/Detail allows plugins to define additional attributes as desired which resolves problem 2.
Master/Detail Publication¶
We will have the Master/Detail Publication viewset overridden by the plugin and have the def create()
method call the custom task with any number of arguments. This also resolves the saving of publication attributes.
Related issues
Updated by dkliban@redhat.com over 5 years ago
- Has duplicate Story #4647: As a user, I can create a plugin specific publication using /pulp/api/v3/publications/<plugin>/ endpoint added
Updated by daviddavis over 5 years ago
This all sounds good to me. I'm a bit mixed about removing publishers because I don't think they are going to be used that often and having them in core doesn't provide that much value to plugin writers.
Updated by daviddavis over 5 years ago
- Sprint/Milestone set to 3.0.0
Setting the 3.0 milestone since this'll likely need to be addressed before GA.
Updated by bmbouter over 5 years ago
During post-triage discussion @asmacdo identified the use case where a user doesn't want to provide repetitive options over and over and in that case specifically a publisher is useful. The downside of keeping publishers is that almost no one will use them and few plugins will even provide them, but in the spirit of small change I am removing the publisher removal from this story at least.
Updated by amacdona@redhat.com over 5 years ago
- Blocks Refactor #4699: As a user, I can create a Python Publication added
Updated by bmbouter over 5 years ago
- Related to Story #4701: As a user my publication creation use Master/Detail provided by core added
Updated by daviddavis over 5 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by amacdona@redhat.com over 5 years ago
- Related to Task #4715: Remove 'publisher', 'publication', and 'repository' from BaseDistribution added
Updated by daviddavis over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by bmbouter over 5 years ago
- Blocks Task #4720: Remove publishers from pulp_file added
Updated by daviddavis over 5 years ago
With this change, publications in the database become typed. The question is how do I fill in the values for '_type' for existing publications? Or do we not support upgrades and require users to redo their database in the next RC release.
Updated by bmbouter over 5 years ago
I think opting to provide no migration and having users redo their dbs in the next release is the best path personally.
Updated by daviddavis over 5 years ago
+1. I am going to redo the migration in core as well since users are redoing their databases.
Updated by daviddavis over 5 years ago
- Related to Task #4724: Add Publications added
Updated by daviddavis over 5 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis over 5 years ago
Added by daviddavis over 5 years ago
Revision 379e733b | View on GitHub
Supporting file publications
ref #4678 https://pulp.plan.io/issues/4678
Required PR: https://github.com/pulp/pulpcore/pull/94 Required PR: https://github.com/PulpQE/pulp-smash/pull/1201
Updated by daviddavis over 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|6eef8fc14df37a4e1f52af53848b5cb75f08a736.
Added by daviddavis over 5 years ago
Revision 4e59d2eb | View on GitHub
Update test for file publications API
Required PR: https://github.com/pulp/pulpcore-plugin/pull/93 Required PR: https://github.com/pulp/pulpcore/pull/103/files Required PR: https://github.com/pulp/pulp_file/pull/207
ref #4678
Added by daviddavis over 5 years ago
Revision 308d6b14 | View on GitHub
Creating ansible publications
ref #4678 https://pulp.plan.io/issues/4678
Required PR: https://github.com/pulp/pulpcore/pull/94
Added by daviddavis over 5 years ago
Revision 173de7f8 | View on GitHub
Remove RepositoryPublishURLSerializer and use PublicationSerializer
Required PR: https://github.com/pulp/pulpcore-plugin/pull/93 Required PR: https://github.com/pulp/pulp_file/pull/207 Required PR: https://github.com/pulp/pulp-certguard/pull/19
Added by daviddavis over 5 years ago
Revision 11dcfa3d | View on GitHub
Move the publish endpoint to publications
Required PR: https://github.com/pulp/pulpcore-plugin/pull/93 Required PR: https://github.com/pulp/pulpcore/pull/103/files
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Add master-detail Publications
fixes #4678 https://pulp.plan.io/issues/4678
Required PR: https://github.com/pulp/pulp_file/pull/205 Required PR: https://github.com/PulpQE/pulp-smash/pull/1201