Project

Profile

Help

Issue #4437

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

Added by bmbouter 8 months ago. Updated 6 months ago.

Status:
MODIFIED
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 502d4883 View on GitHub
Added by dkliban@redhat.com 8 months ago

Problem: BaserDistributionSerializer not available in plugin API

Solution: Add BaseDistributionSerializer to the plugin API

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

Revision 0eb7032f View on GitHub
Added by dkliban@redhat.com 8 months 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 8 months 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 8 months 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 8 months 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 8 months ago

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

#4 Updated by bmbouter 8 months 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 8 months 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 8 months 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 8 months ago

  • Triaged changed from No to Yes

#8 Updated by daviddavis 8 months ago

  • Sprint set to Sprint 49

#9 Updated by dkliban@redhat.com 8 months ago

  • Status changed from NEW to ASSIGNED

#10 Updated by dkliban@redhat.com 8 months ago

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

#11 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#12 Updated by bmbouter 6 months ago

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

Please register to edit this issue

Also available in: Atom PDF