Project

Profile

Help

Task #3763

closed

Story #3693: Lazy for Pulp3

Add "policy" attribute to Remote

Added by bmbouter over 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 46
Quarter:

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

Related to Pulp - Test #4126: Test sync with different download policiesCLOSED - COMPLETEkersomActions
Related to Pulp - Test #4182: Test Remote "policy" attributeCLOSED - COMPLETEdalleyActions
Related to Pulp - Test #4220: Test update download policy with invalid fieldCLOSED - COMPLETEbherringActions
Has duplicate Pulp - Story #3526: As a user, I can disable lazy_sync from storing packagesCLOSED - DUPLICATE

Actions
Has duplicate Pulp - Story #3320: Support On_demand and Background downloadersCLOSED - DUPLICATE

Actions
Actions #1

Updated by bmbouter over 6 years ago

  • Parent issue set to #3693
Actions #2

Updated by bmbouter over 6 years ago

  • Has duplicate Story #3526: As a user, I can disable lazy_sync from storing packages added
Actions #3

Updated by CodeHeeler over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to CodeHeeler
Actions #4

Updated by CodeHeeler about 6 years ago

  • Assignee changed from CodeHeeler to bmbouter
Actions #5

Updated by bmbouter about 6 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

Actions #6

Updated by kersom about 6 years ago

  • Related to Test #4126: Test sync with different download policies added
Actions #7

Updated by bmbouter about 6 years ago

  • Status changed from ASSIGNED to POST
Actions #8

Updated by bmbouter about 6 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.

Actions #9

Updated by ttereshc about 6 years ago

  • Sprint changed from Sprint 46 to Sprint 45
Actions #10

Updated by kersom almost 6 years ago

  • Related to Test #4182: Test Remote "policy" attribute added
Actions #11

Updated by amacdona@redhat.com almost 6 years ago

  • Has duplicate Story #3320: Support On_demand and Background downloaders added
Actions #12

Updated by rchan almost 6 years ago

  • Sprint changed from Sprint 45 to Sprint 46

Added by bmbouter almost 6 years ago

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.

https://pulp.plan.io/issues/3763 closes #3763

Added by bmbouter almost 6 years ago

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.

https://pulp.plan.io/issues/3763 closes #3763

Actions #13

Updated by bmbouter almost 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #14

Updated by kersom almost 6 years ago

  • Related to Test #4220: Test update download policy with invalid field added
Actions #15

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #16

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #17

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF