Story #4020
Updated by bmbouter about 6 years ago
h2. 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 <code>ContentArtifact.relative_path</code> 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. h2. Solution Introduce an attribute on Since Publication called <code>pass_through</code> that defaults already has "a ForeignKey to False. If True, RepositoryVersion":https://github.com/pulp/pulp/blob/master/pulpcore/pulpcore/app/models/publication.py#L43 update the content Content app would: to: 1. Query like it does normally, looking First query for PublishedArtifact and PublishedMetadata objects with FK to this publication 2. Second, if <code>Publication.pass_through == True</code> also search in the ContentArtifact.relative_path query for units in the associated RepositoryVersion. This is pretty easy to add because Publication already has "a ForeignKey to RepositoryVersion":https://github.com/pulp/pulp/blob/master/pulpcore/pulpcore/app/models/publication.py#L43 Also note that PublishedArtifact and PublishedMetadata are still searched first. artifact by its ContetnArtifact.relative_path h2. Benefits * Users who don't need PublishedMetadata will have a simpler experience (as they requested)