Story #4209
closedStory #3693: Lazy for Pulp3
As a plugin writer, I can implement lazy sync for plugins with multiple metadata files
0%
Description
Problem¶
For plugins such as Python and Docker that have many metadata files, we may need a different way to implement lazy sync than the current plan, which is to omit the ArtifactDownloader stage and the ArtifactSaver stage.
Because there are many metadata files, (and with Docker, these metadata files are also content units), we are using the ArtifactDownloader stage to download metadata. In this case, the metadata files need to be downloaded, and related content saved, but the non-metadata files should be skipped for downloading and saving.
Solution¶
The DeclarativeArtifact gets a new flag called 'deferred_download' defaulting to False to specify, that the artifact stages stop processing it (making it lazy).
At the same time the 'download_artifacts' flag of DeclarativeVersion is removed.
So the plugin must either use the deferred_download flag, or tailor its own Pipeline.
Related issues
Use deferred_download flag for lazy feature
Required PR: https://github.com/pulp/pulpcore-plugin/pull/50
https://pulp.plan.io/issues/4209 re #4209