Project

Profile

Help

Story #8083

As a user, I can specify `headers` as an option for all remote types

Added by bmbouter 11 months ago. Updated 10 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Quarter:

Description

Use Cases

  1. For RPM content, oracle linux needs headers sent for the server to respond properly. You can see this work started in these PR: https://github.com/pulp/pulpcore/pull/1041 and https://github.com/pulp/pulp_rpm/pull/1896/

  2. For syncing content using Alternate Content Sources from Pulp instances in EC2, e.g. RHUI servers it also requires headers to be sent with downloads.

Solution

Given that there are two use cases for headers, and headers are a generic HTTP downloading concept, let's add them to Remote and have the DownloaderFactory create downloaders with them.

These headers are ultimately passed to aiohttp as a dictionary per their docs so let's store the field in DRF as a DictField. Probably defined as DictField(child=CharField()).

That means on Remote the new field would be:

headers = models.JsonField(null=True)

Related issues

Blocks RPM Support - Story #7905: As a user I want to synchronise oracle ropositories via ULNCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 032f3361 View on GitHub
Added by ThikaXer 10 months ago

Add headers option in aiohttp client session

Aiohttp client session now supports a headers field. Headers should be provided as a dictionary or a JSON field. Headers can be set for entire client seession or for requests.

fixes #8083

History

#1 Updated by bmbouter 11 months ago

  • Description updated (diff)

#2 Updated by bmbouter 11 months ago

  • Description updated (diff)

#3 Updated by bmbouter 11 months ago

  • Description updated (diff)

#4 Updated by daviddavis 11 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#5 Updated by ThikaXer 10 months ago

  • Assignee set to ThikaXer

#6 Updated by ThikaXer 10 months ago

  • Status changed from NEW to MODIFIED
  • % Done changed from 0 to 100

#7 Updated by ttereshc 10 months ago

  • Sprint/Milestone set to 3.10.0

#8 Updated by pulpbot 10 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#9 Updated by quba42 9 months ago

  • Blocks Story #7905: As a user I want to synchronise oracle ropositories via ULN added

Please register to edit this issue

Also available in: Atom PDF