Project

Profile

Help

Issue #2330

closed

`KeyError: 'url'` is raised when syncing. Pulp silently ignores the error.

Added by Ichimonji10 over 7 years ago. Updated about 5 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Python:
master
Platform Release:
Target Release - Python:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Try executing the following:

pulp-admin python repo create --repo-id foo --feed https://pypi.python.org/ --package-names shelf-reader
pulp-admin python repo sync run --repo-id foo
pulp-admin python repo packages --repo-id foo
pulp-admin python repo delete --repo-id foo

It'll work. Now, do the same with a feed URL of https://repos.fedorapeople.org/pulp/pulp/fixtures/python/, and it'll fail. Pulp will give no indication that anything has wrong, but the sync will pull in no packages. journalctl indicates why the sync doesn't pull in packages:

Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120) 'url'
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120) Traceback (most recent call last):
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)   File "/usr/lib/python2.7/site-packages/nectar/downloaders/base.py", line 145, in _fire_event_to_listener
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)     event_listener_callback(*args, **kwargs)
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)   File "/usr/lib/python2.7/site-packages/pulp_python/plugins/importers/sync.py", line 68, in download_succeeded
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)     self._process_manifest(destination.read())
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)   File "/usr/lib/python2.7/site-packages/pulp_python/plugins/importers/sync.py", line 108, in _process_manifest
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120)     url = package['url']
Oct 11 10:49:58 pulp.example.com pulp[4838]: nectar.downloaders.base:ERROR: (4838-41120) KeyError: 'url'

Pulp should be able to sync without raising a KeyError. In my opinion, Pulp shouldn't silently ignore the error.

Also available in: Atom PDF