As a plugin writer, I can create distributions for repository versions
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.
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.
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
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.
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.
I think we should add a field to Distribution called "repository_version"https://github.com/pulp/pulpcore/blob/6eef8fc14df37a4e1f52af53848b5cb75f08a736/pulpcore/app/models/publication.py#L248.
The "repository_version" and the "publication" field should not be used together. Having a distribution serve both content from a Repository Version and a Publication would be confusing and could lead to unexpected results.
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?
#10 Updated by email@example.com 6 months ago
@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.
Please register to edit this issue