Project

Profile

Help

Issue #3270

Improve exception handling for incorrect feed_url

Added by amacdona@redhat.com almost 3 years ago. Updated 10 months 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/

Associated revisions

Revision 9f995eeb View on GitHub
Added by jortel@redhat.com almost 3 years ago

Use asyncio downloader. closes #3270, closes #3272

History

#1 Updated by amacdona@redhat.com almost 3 years ago

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

#2 Updated by dalley almost 3 years ago

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

#3 Updated by jortel@redhat.com almost 3 years ago

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

#4 Updated by jortel@redhat.com almost 3 years ago

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

#5 Updated by jortel@redhat.com almost 3 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by jortel@redhat.com almost 3 years ago

  • Status changed from POST to MODIFIED

#7 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 31

#8 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (53)

#9 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3)

#10 Updated by bmbouter 10 months ago

  • Sprint/Milestone set to 0.1.0

#11 Updated by bmbouter 10 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF