Project

Profile

Help

Task #3763

Story #3693: Lazy for Pulp3

Add "policy" attribute to Remote

Added by bmbouter over 1 year ago. Updated 6 months ago.

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

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 46

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 policies CLOSED - COMPLETE Actions
Related to Pulp - Test #4182: Test Remote "policy" attribute CLOSED - COMPLETE Actions
Related to Pulp - Test #4220: Test update download policy with invalid field CLOSED - COMPLETE Actions
Duplicated by Pulp - Story #3526: As a user, I can disable lazy_sync from storing packages CLOSED - DUPLICATE Actions
Duplicated by Pulp - Story #3320: Support On_demand and Background downloaders CLOSED - DUPLICATE Actions

Associated revisions

Revision 3daf3bf7 View on GitHub
Added by bmbouter 11 months ago

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

Revision 3daf3bf7 View on GitHub
Added by bmbouter 11 months ago

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

Revision 3daf3bf7 View on GitHub
Added by bmbouter 11 months ago

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

History

#1 Updated by bmbouter over 1 year ago

  • Parent task set to #3693

#2 Updated by bmbouter over 1 year ago

  • Duplicated by Story #3526: As a user, I can disable lazy_sync from storing packages added

#3 Updated by CodeHeeler about 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to CodeHeeler

#4 Updated by CodeHeeler 12 months ago

  • Assignee changed from CodeHeeler to bmbouter

#5 Updated by bmbouter 12 months 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 12 months ago

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

#7 Updated by bmbouter 11 months ago

  • Status changed from ASSIGNED to POST

#8 Updated by bmbouter 11 months 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 11 months ago

  • Sprint changed from Sprint 46 to Sprint 45

#10 Updated by kersom 11 months ago

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

#11 Updated by amacdona@redhat.com 11 months ago

  • Duplicated by Story #3320: Support On_demand and Background downloaders added

#12 Updated by rchan 11 months ago

  • Sprint changed from Sprint 45 to Sprint 46

#13 Updated by bmbouter 11 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#14 Updated by kersom 11 months ago

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

#15 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#16 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF