Issue #4817
closed"remote" field on BaseDistribution considered harmful (in the general case)
Description
Problem¶
The "remote" field in the BaseDistribution
triggers the "pull-through" cache behavior in the default content app (https://github.com/pulp/pulpcore/blob/15e28bf669e5c5cb318b06fa59a5b6eadccab817/pulpcore/content/handler.py#L239-L252). While this is the right thing to do for content types that implement pull-through caching, it definitively is not for plugins that do not implement pull-through caching (because they have enough metadata to know the locations of their artifacts).
Currently, it is very easy to trigger this behavior by accident, a user just has to provide a remote when creating a distribution (which is part of the API description).
Solution¶
Remove the field from the BaseDistributionSerializer
, i.e. make it invisible & non accessible in the API by default. Plugins that implement pull-through caching will have to add the field to their distribution subclass.
Added by gmbnomis over 5 years ago
Updated by gmbnomis over 5 years ago
Updated by gmbnomis over 5 years ago
- Status changed from ASSIGNED to MODIFIED
Applied in changeset pulpcore|17201f04d44c7024a46a787eac562bb98c9864de.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Remove the "remote" field from the BaseDistributionSerializer
It should not be available by default, but only in those plugins that implement pull-through caching.
closes #4817 https://pulp.plan.io/issues/4817