Actions
Issue #2899
closedPulp Python plugin spams logs when downloading wrong filetypes from pypi
Start date:
Due date:
Estimated time:
Severity:
3. High
Version - Python:
master
Platform Release:
2.14.0
Target Release - Python:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Some python packages (setuptools, argparse, pyzqm, to name a few) contain some operating system packages (*.msi, *.rpm, etc). When pulp_python comes across these files, it pukes exceptions into the log file.
I assume that we actually want to mirror these files, but if they're not required these exceptions should be caught and logged as info or something rather than dumping uncaught exceptions into the log file
Jul 13 02:52:21 dac21654prs501 pulp: pulp_python.plugins.importers.sync:INFO: Processing package retrieved from https://pypi.python.org/packages/16/47/b2f6126fc281f9822bf41a23f5dfbd8fc95d027ba5949ac2089e26ea2414/setuptools-0.6c7-1.src.rpm.
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) ValidationError (Package:773d6179-b1a3-45e1-9f45-c57cec6186c4) (Value must be one of ('sdist', 'bdist_egg', 'bdist_wheel', 'bdist_wininst'): ['packagetype'])
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) Traceback (most recent call last):
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) File "/usr/lib/python2.6/site-packages/nectar/downloaders/base.py", line 145, in _fire_event_to_listener
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) event_listener_callback(*args, **kwargs)
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) File "/usr/lib/python2.6/site-packages/pulp_python_plugins-2.1a1-py2.6.egg/pulp_python/plugins/importers/sync.py", line 121, in download_succeeded
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) package.save()
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) File "/usr/lib/python2.6/site-packages/mongoengine/document.py", line 304, in save
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) self.validate(clean=clean)
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) File "/usr/lib/python2.6/site-packages/mongoengine/base/document.py", line 413, in validate
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-64640) raise ValidationError(message, errors=errors)
Jul 13 02:52:21 dac21654prs501 pulp: pulp_python.plugins.importers.sync:INFO: Processing package retrieved from https://pypi.python.org/packages/bf/5b/35b761a62c19b8f21032eb7f6791ec728b962264c6178260c8a8cf28cae6/argparse-1.1.win32.msi.
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) ValidationError (Package:70bfc943-2421-4191-b72e-3982be4a129f) (Value must be one of ('sdist', 'bdist_egg', 'bdist_wheel', 'bdist_wininst'): ['packagetype'])
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) Traceback (most recent call last):
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) File "/usr/lib/python2.6/site-packages/nectar/downloaders/base.py", line 145, in _fire_event_to_listener
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) event_listener_callback(*args, **kwargs)
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) File "/usr/lib/python2.6/site-packages/pulp_python_plugins-2.1a1-py2.6.egg/pulp_python/plugins/importers/sync.py", line 121, in download_succeeded
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) package.save()
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) File "/usr/lib/python2.6/site-packages/mongoengine/document.py", line 304, in save
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) self.validate(clean=clean)
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) File "/usr/lib/python2.6/site-packages/mongoengine/base/document.py", line 413, in validate
Jul 13 02:52:21 dac21654prs501 pulp: nectar.downloaders.base:ERROR: (25009-53056) raise ValidationError(message, errors=errors)
This us using the latest pulp_python code from github as of 2017/07/12 at 8:00PM PST. I compared the 2.0 release branch to the current master and there's only been some cosmetic changes, so it's safe to say this is an issue with at least pulp_python 2.0
Actions
add MSI and RPM as valid package types