Story #4020
closedExtend Content App to serve Artifacts from ContentArtifact.relative_path data associated w/ the repo_version associated with the publication
100%
Description
Problem¶
Publishing a large repository, many times will create a huge number of PublishedArtifact objects. These effectively duplicate data that already exists in Pulp, e.g. ContentArtifact.relative_path.
Also recently a plugin writer pointed out they don't need PublishedMetadata objects, the content itself being served by a distribution at ContentArtifact.relative_path
is enough. They indicated (a) having them provide a publisher didn't add value for them and (b) having to make a huge number of duplicate records they don't need was concerning.
Solution¶
Introduce an attribute on Publication called pass_through
that defaults to False. If True, the content app would:
1. Query like it does normally, looking for PublishedArtifact and PublishedMetadata objects
2. Second, if Publication.pass_through == True
also search in the ContentArtifact.relative_path for units in the associated RepositoryVersion.
This is pretty easy to add because Publication already has a ForeignKey to RepositoryVersion Also note that PublishedArtifact and PublishedMetadata are still searched first.
Benefits¶
- Users who don't need PublishedMetadata will have a simpler experience (as they requested)
Related issues
Add support for pass-through publications. closes #4020