Project

Profile

Help

Issue #4437

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

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

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 49

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

Associated revisions

Revision 0eb7032f View on GitHub
Added by dkliban@redhat.com about 1 year ago

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

Revision 753d49bf View on GitHub
Added by dkliban@redhat.com about 1 year ago

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

Revision 753d49bf View on GitHub
Added by dkliban@redhat.com about 1 year ago

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

Revision 753d49bf View on GitHub
Added by dkliban@redhat.com about 1 year ago

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

Revision 753d49bf View on GitHub
Added by dkliban@redhat.com about 1 year ago

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

History

#1 Updated by bmbouter over 1 year 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.

#2 Updated by bmbouter over 1 year ago

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

#4 Updated by bmbouter over 1 year ago

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

#5 Updated by jortel@redhat.com over 1 year 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?

#6 Updated by bmbouter over 1 year 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.

#7 Updated by CodeHeeler over 1 year ago

  • Triaged changed from No to Yes

#8 Updated by daviddavis over 1 year ago

  • Sprint set to Sprint 49

#9 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from NEW to ASSIGNED

#10 Updated by dkliban@redhat.com about 1 year ago

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

#11 Updated by daviddavis about 1 year ago

  • Sprint/Milestone set to 3.0.0

#12 Updated by bmbouter about 1 year ago

  • Tags deleted (Pulp 3, Pulp 3 RC Blocker)

#13 Updated by bmbouter 6 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF