As a user, I can perform an immediate sync to download artifacts for content units that are already created
Imagine the following scenario:
- Perform a sync with a download_policy of 'streamed' or 'on_demand'
- Change your mind, decide you want to download the artifacts after all, and do another sync with a remote download policy of "immediate", OR
- Perform an immediate sync of another repository which contains overlapping content units with the first sync
In either of these cases, Pulp will not do what you want. "mirror=False" mode only looks at whether the content unit exists, not whether its artifacts have been downloaded. So there is no way to perform an "immediate" sync thereafter which touches the already-created content units, unless you use "mirror=True", which can be extremely destructive.
Both of these schemes (leave the existing units alone vs. download the artifacts for the overlapping ones) should probably be supported (and documented). But it would make sense to flip the current behavior around, and default to the state requested by the last-performed sync.
Updated by firstname.lastname@example.org almost 5 years ago
I tested by:
- create repository
- create a remote with url to fixtures and policy=on_demand.
- syncd. no artifacts created.
- set policy=immediate on the remote.
- syncd using mirror=false. missing artifacts ARE downloaded/created.
It seems to work as designed. Did I miss something?