Task #3763
Story #3693: Lazy for Pulp3
Add "policy" attribute to Remote
100%
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.
Related issues
Associated revisions
Revision 3daf3bf7
View on GitHub
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
or remote_artifact
as kwargs instead of url
as a positional
parameter. This allows plugin writers (and the streamer) to get
downloaders configured with digest and size validation automatically
from remote_artifacts.
History
#1
Updated by bmbouter over 2 years ago
- Parent task set to #3693
#2
Updated by bmbouter over 2 years ago
- Has duplicate Story #3526: As a user, I can disable lazy_sync from storing packages added
#3
Updated by CodeHeeler over 2 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to CodeHeeler
#4
Updated by CodeHeeler about 2 years ago
- Assignee changed from CodeHeeler to bmbouter
#5
Updated by bmbouter about 2 years ago
- Subject changed from Add "policy" attribute to ContentArtifact to Add "policy" attribute to Remote
- Description updated (diff)
This is supposed to be on the Remote since that is where the user configures it. Also it's a choice of 3 things, immediate, on_demand, and cache_only. This was from the mailing list: https://www.redhat.com/archives/pulp-dev/2018-June/msg00016.html
#6
Updated by kersom about 2 years ago
- Related to Test #4126: Test sync with different download policies added
#7
Updated by bmbouter about 2 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulp/pull/3738
#8
Updated by bmbouter about 2 years ago
- Sprint set to Sprint 46
Adding to sprint because it's a sub-story of the streamer work which is also on sprint.
#9
Updated by ttereshc about 2 years ago
- Sprint changed from Sprint 46 to Sprint 45
#10
Updated by kersom about 2 years ago
- Related to Test #4182: Test Remote "policy" attribute added
#11
Updated by amacdona@redhat.com about 2 years ago
- Has duplicate Story #3320: Support On_demand and Background downloaders added
#12
Updated by rchan about 2 years ago
- Sprint changed from Sprint 45 to Sprint 46
#13
Updated by bmbouter about 2 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|3daf3bf7e48b6dcb99046b518e17ac226cb10245.
#14
Updated by kersom about 2 years ago
- Related to Test #4220: Test update download policy with invalid field added
#15
Updated by daviddavis almost 2 years ago
- Sprint/Milestone set to 3.0.0
#16
Updated by bmbouter almost 2 years ago
- Tags deleted (
Pulp 3)
#17
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
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