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 Since Publication already has "a Remove PublishedArtifact entirely from Pulp and instead have a publication contain a ForeignKey to RepositoryVersion":https://github.com/pulp/pulp/blob/master/pulpcore/pulpcore/app/models/publication.py#L43 RepositoryVersion. Then update the Content app to: 1. First to query for via the ContetnArtifact table instead of the PublishedArtifact and PublishedMetadata objects with FK table to this publication 2. Second, query for discover the artifact by its ContetnArtifact.relative_path Artifact. Repository versions are immutable too so it can serve as a record of the Publish. h2. Benefits * Publishers don't try to duplicate what we are already doing well with RepostioryVersion * Users who don't need PublishedMetadata will have a simpler experience (as they requested)