As a plugin writer, declarative artifacts without a "remote" will not have RemoteArtifacts created
If a plugin writer does not declarate a "remote" on a declarative Artifact have no RemoteArtifact objects be created.
The validation there will need to be loosened to allow remote to be unset. When unset, the Artifact must already have it's binary data attached to the in-memory Artifact causing ArtifactDownloader to pass it through unmodified.
The Artifact can be saved or unsaved. If saved the ArtifactSaver stage will effectively pass it through unmodified. If unsaved the ArtifactSaver stage will perform its usual operation.
Useful for example in modularity support when we got artifact from first stage which doesn't need to be downloaded but should go through stage to create right relations with content.
Skip downloading DeclarativeArtifacts if a file is already present
This patch introduces an additional check to the method that schedules Artifact
downloading. DeclarativeArtifacts that contain an Artifact that already has a file
are not scheduled for download.
This patch also makes the remote required for the DeclarativeArtifact unless the Artifact
already has a file associated with it.
#1 Updated by bmbouter about 1 month ago
- Subject changed from Possibility to skip artifact download and remote artifact saver stages at Sync to As a plugin writer, declarative artifacts without a "remote" will not have RemoteArtifacts created
- Description updated (diff)
This doesn't have an affect on the ArtifactDownload or ArtifactSaver stages so I edited it to remove that part. @ppicka does this sound right?
#3 Updated by bmbouter about 1 month ago
I can see value in the created in-memory Artifact being unsaved because then the ArtifactSaver can efficiently save them in batches.
Regarding the ArtifactDownloader I don't think we need explicit skipping, as much as the current behavior should recognize the Artifact as already downloaded. So in that way it would be "skipped" with the existing logic.
#12 Updated by email@example.com about 1 month ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore-plugin|e2fe778f9f486c8ce58066682f35f0893f7c4a4f.
Please register to edit this issue