Task #3763
closed
Story #3693: Lazy for Pulp3
Add "policy" attribute to Remote
Status:
CLOSED - CURRENTRELEASE
Description
A choice field with three choices: on_demand
and cache_only
, and immediate
. The default is "immediate".
When set to "on_demand", any time the Streamer downloads that ContentArtifact it will save the Artifact and associate it correctly so that it won't be re-downloaded.
- Parent issue set to #3693
- Has duplicate Story #3526: As a user, I can disable lazy_sync from storing packages added
- Status changed from NEW to ASSIGNED
- Assignee set to CodeHeeler
- Assignee changed from CodeHeeler to bmbouter
- Subject changed from Add "policy" attribute to ContentArtifact to Add "policy" attribute to Remote
- Description updated (diff)
- Related to Test #4126: Test sync with different download policies added
- Status changed from ASSIGNED to POST
Adding to sprint because it's a sub-story of the streamer work which is also on sprint.
- Sprint changed from Sprint 46 to Sprint 45
- Related to Test #4182: Test Remote "policy" attribute added
- Has duplicate Story #3320: Support On_demand and Background downloaders added
- Sprint changed from Sprint 45 to Sprint 46
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Related to Test #4220: Test update download policy with invalid field added
- Sprint/Milestone set to 3.0.0
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Adds 'policy' to Remote
Required PR: https://github.com/pulp/pulp_file/pull/132
This includes a serializer that validates input correctly.
This also switches the finalize, write_data, and handle_headers callbacks to be coroutines themselves. This is required because within those callbacks the streamer needs to await on coroutines and that can only be done from withing a coroutine itself.
This also adjusts the Remote.get_downloader() method signature to take
url
orremote_artifact
as kwargs instead ofurl
as a positional parameter. This allows plugin writers (and the streamer) to get downloaders configured with digest and size validation automatically from remote_artifacts.https://pulp.plan.io/issues/3763 closes #3763