Project

Profile

Help

Story #7117

As a plugin writer, I can be in control when the server returns a 400+ response code

Added by bmbouter 4 months ago. Updated 2 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:
No
Tags:
Sprint:
Sprint 78
Quarter:

Description

Background

Currently the HttpDownloader will raise an exception at response.raise_for_status() anytime the server responds with a 400+ response code. The plugin writers are not in control of this.

In some cases a 404 should not raise an exception because a file being missing is normal. This is the case with pulp_rpm .treeinfo files. See https://pulp.plan.io/issues/7095 for that issue.

Proposal

Add a new hook method on HttpDownloader like this:

def raise_for_status(response):
    response.raise_for_status()

Then HttpDownloader subclasses could intercept this call and customize it.


Related issues

Blocks RPM Support - Issue #7095: Pulp 3 Sync issue (.treeinfo)CLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision ea18dc97 View on GitHub
Added by Fabricio Aguiar 3 months ago

HttpDownloader control on response codes 400+

https://pulp.plan.io/issues/7117 closes #7117

History

#1 Updated by bmbouter 4 months ago

  • Blocks Issue #7095: Pulp 3 Sync issue (.treeinfo) added

#2 Updated by bmbouter 3 months ago

  • Groomed changed from No to Yes
  • Sprint set to Sprint 77

Adding to sprint after grooming at pulpcore planning meeting on July 14th.

#3 Updated by rchan 3 months ago

  • Sprint changed from Sprint 77 to Sprint 78

#4 Updated by fao89 3 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89

#5 Updated by pulpbot 3 months ago

  • Status changed from ASSIGNED to POST

#6 Updated by Anonymous 3 months ago

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

#7 Updated by dkliban@redhat.com 2 months ago

  • Sprint/Milestone set to 3.6.0

#8 Updated by pulpbot 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF