Project

Profile

Help

Issue #4437

closed

Cannot adapt BaseUrl when serving Content at a custom URL using a custom aiohttp handler

Added by bmbouter about 5 years ago. Updated over 4 years ago.

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

Description

Problem

Assume that A plugin writer is adding custom routes to serve their content. They likely require this because they need more control when serving an Artifact, e.g. response headers. When their Distribution serializes the base_path it will serve all Pulp content at /pulp/content/. This is correct for most Content, but not for this type which serves it at a custom route in the content app, e.g. /mycustomurl/.

The Distributor Serializer/Viewset is also not part of the plugin API which prevents the reuse of that serializer/viewset.

This was originally identified by gmbnomis in this comment

Solution

Make the Serializer and Viewset part of the plugin API

Actions #1

Updated by bmbouter about 5 years ago

  • Tags Pulp 3 RC Blocker added

I believe this will produce an API change so I believe it needs to be done before the RC.

Actions #2

Updated by bmbouter about 5 years ago

gmbnomis the docker team told me they subclassed the Distribution object and implemented a different serializer for the BaseURL.

Actions #4

Updated by bmbouter about 5 years ago

gmbnomis do you want to go this subclassing route or try to reconfigure the URL on the BaseURL?

Actions #5

Updated by jortel@redhat.com about 5 years ago

This seems to be the same as https://pulp.plan.io/issues/4391 but not enough detail written here to tell. Could someone add more detail to the description, please?

Actions #6

Updated by bmbouter about 5 years ago

  • Description updated (diff)

I rewrote this with more detail. It's different than https://pulp.plan.io/issues/4391 which deals with the serialization of base_path in the common case.

Actions #7

Updated by CodeHeeler about 5 years ago

  • Triaged changed from No to Yes
Actions #8

Updated by daviddavis about 5 years ago

  • Sprint set to Sprint 49
Actions #9

Updated by dkliban@redhat.com about 5 years ago

  • Status changed from NEW to ASSIGNED

Added by dkliban@redhat.com about 5 years ago

Revision 0eb7032f | View on GitHub

Problem: DistributionSerializer is too prescriptive

Solution: Add a generic BaseDistributionSerializer

re: #4435 https://pulp.plan.io/issues/4435 re: #4437 https://pulp.plan.io/issues/4437

Added by dkliban@redhat.com about 5 years ago

Revision 753d49bf | View on GitHub

Problem: plugin code is not using new plugin API serializer

Solution: update the DockerDistribution serializer to use the BaseDistributionSerializer

re: #4435 https://pulp.plan.io/issues/4435 re: #4437 https://pulp.plan.io/issues/4437

Added by dkliban@redhat.com about 5 years ago

Revision 753d49bf | View on GitHub

Problem: plugin code is not using new plugin API serializer

Solution: update the DockerDistribution serializer to use the BaseDistributionSerializer

re: #4435 https://pulp.plan.io/issues/4435 re: #4437 https://pulp.plan.io/issues/4437

Added by dkliban@redhat.com about 5 years ago

Revision 753d49bf | View on GitHub

Problem: plugin code is not using new plugin API serializer

Solution: update the DockerDistribution serializer to use the BaseDistributionSerializer

re: #4435 https://pulp.plan.io/issues/4435 re: #4437 https://pulp.plan.io/issues/4437

Added by dkliban@redhat.com about 5 years ago

Revision 753d49bf | View on GitHub

Problem: plugin code is not using new plugin API serializer

Solution: update the DockerDistribution serializer to use the BaseDistributionSerializer

re: #4435 https://pulp.plan.io/issues/4435 re: #4437 https://pulp.plan.io/issues/4437

Actions #10

Updated by dkliban@redhat.com about 5 years ago

  • Status changed from ASSIGNED to MODIFIED
  • Assignee set to dkliban@redhat.com
Actions #11

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #12

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 RC Blocker)
Actions #13

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF