Project

Profile

Help

Issue #4817

closed

"remote" field on BaseDistribution considered harmful (in the general case)

Added by gmbnomis over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

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.

Also available in: Atom PDF