Project

Profile

Help

Story #7117

closed

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

Added by bmbouter about 2 years ago. Updated about 2 years 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 - CURRENTRELEASEActions
Actions #1

Updated by bmbouter about 2 years ago

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

Updated by bmbouter about 2 years ago

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

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

Actions #3

Updated by rchan about 2 years ago

  • Sprint changed from Sprint 77 to Sprint 78
Actions #4

Updated by fao89 about 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89
Actions #5

Updated by pulpbot about 2 years ago

  • Status changed from ASSIGNED to POST

Added by Fabricio Aguiar about 2 years ago

Revision ea18dc97

HttpDownloader control on response codes 400+

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

Actions #6

Updated by Anonymous about 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by dkliban@redhat.com about 2 years ago

  • Sprint/Milestone set to 3.6.0
Actions #8

Updated by pulpbot about 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF