Project

Profile

Help

Issue #3270

closed

Improve exception handling for incorrect feed_url

Added by amacdona@redhat.com almost 7 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix
Sprint:
Sprint 31
Quarter:

Description

For the File plugin, the feed_url points to the manifest file, rather than the directory. Other plugins use the directory, so it is likely that others will make this mistake also.

WRONG:
feed_url = https://repos.fedorapeople.org/pulp/pulp/fixtures/file/

RIGHT:
feed_url = https://repos.fedorapeople.org/pulp/pulp/fixtures/file/PULP_MANIFEST

This issue is to impove the exception handling, because it was tricky to debug.

Some notes:

  • os.path.basename returns "" when passed a string that ends with "/"
  • os.makedirs ignores the working directory when passed a string that starts with "/"
  • the combination of ^ means that using WRONG feed_url results in a PermissionsError, trying to write to /pulp/pulp/fixtures/file/
Actions #1

Updated by amacdona@redhat.com almost 7 years ago

  • Subject changed from Bad exception for incorrect feed_url to Improve exception handling for incorrect feed_url
Actions #2

Updated by dalley almost 7 years ago

  • Sprint/Milestone set to 53
  • Triaged changed from No to Yes
Actions #3

Updated by jortel@redhat.com almost 7 years ago

Easy fix: just need to rstrip('/') string passed to basename().

Actions #4

Updated by jortel@redhat.com almost 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com
  • Tags Easy Fix, Pulp 3 added

Added by jortel@redhat.com almost 7 years ago

Revision 9f995eeb | View on GitHub

Use asyncio downloader. closes #3270, closes #3272

Actions #5

Updated by jortel@redhat.com almost 7 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by jortel@redhat.com almost 7 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by bmbouter almost 7 years ago

  • Sprint set to Sprint 31
Actions #8

Updated by bmbouter almost 7 years ago

  • Sprint/Milestone deleted (53)
Actions #9

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #10

Updated by bmbouter about 5 years ago

  • Sprint/Milestone set to 0.1.0
Actions #11

Updated by bmbouter about 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF