Story #4745
closed
As a plugin writer, I can create distributions for repository versions
Status:
CLOSED - CURRENTRELEASE
Description
Problem¶
Some plugins like pulp_ansible and pulp_docker have no need for publications since they don't use metadata. Give these plugins a way to attach distributions directly to repo versions.
Solution¶
1. Add a "repository_version" attribute to the Distribution model
2. Update the content app to serve up content from that RepositoryVersion
3. The "repository_version" and "publication" fields should not be used together and should error somehow.
We will also remove the 'publisher' option because we expect it will not be used in 3.0 and will introduce more confusion than value.
We will also adjust the auto-distribution behavior as follows:
When the Distribution.repository field is set, the Distribution will be updated to have the repository_verison field point at the newly created repository_version.
This won't actually help docker, since docker has its own implementation of distributions. But +1 to this idea for the general case
I think pass-through is still useful because in cases where you have metadata and a huge number of artifacts you just want to let the repo version handle the rest. The think that doesn't seem as useful is having PublishedArtifact at all but I'm not proposing we get rid of it.
+1 to this story. We need to have a technical proposal on how to implement.
Heres another question: How will autodistribution work? Should it just be repository based?
I think the "respository" field should autodistribute whenever a new repo-version is made. Also the existing "publisher" field should continue to auto-distribute whenever it publishes a publication as it does today.
The change would be that today I think the repository and publisher field are used together. Will this change cause any problems?
- Blocks Story #4680: As a user I have lifecycle docs in pulpcore workflows added
- Description updated (diff)
Removing some of the questions that were answered in comments and on irc.
- Description updated (diff)
Removing some of the questions that were answered in comments and on irc and rewriting with a full solution.
bmbouter, take a look at what I did for pulp_docker to handle this use case: https://github.com/pulp/pulp_docker/pull/341/files
We use the serializer to enforce repository or repository version.
The content app does the auto distribution when repository is set. We added a method for looking up the latest repo version. So no extra updating of Distribution is needed at repo version creation time.
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
- Sprint set to Sprint 52
- Description updated (diff)
updating description based on convo w/ other devs
- Status changed from NEW to POST
- Assignee set to bmbouter
- Blocked by Issue #4791: Cannot `make diagrams` on F29 w/ pulplift added
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Status changed from MODIFIED to POST
There is followon work for this so I need to move back to POST.
- Status changed from POST to MODIFIED
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Distributions serve RepositoryVersion
This adds the field 'repository_version' to a Distribution which will serve the content in that RepositoryVersion.
This also removes the 'publisher' field which was decided to no longer be something we want at this time.
It adds some docs in the workflow section that describing 3 auto-distribution workflows.
Lastly, it adjusts auto-distribution so that the 'repository' field will serve the latest RepositoryVersion automatically.
The 'repository', 'repository_version', and 'publication' fields cannot be used together.
https://pulp.plan.io/issues/4745 closes #4745