Closed
Bug 1203146
Opened 9 years ago
Closed 9 years ago
Pulse Actions throws an unreadable exception when the proper env variables are not set up
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: armenzg, Assigned: nikkibee, Mentored)
Details
(Whiteboard: [good first bug])
Attachments
(1 file)
adusca: what am I doing wrong?
These are the steps I followed:
* Checkout https://github.com/adusca/pulse_actions.git
* Setup a virtualenv
* Install the project inside of it with python setup.py develop
* Run python pulse_actions/worker.py --topic-base backfilling --dry-run
Traceback (most recent call last):
File "pulse_actions/worker.py", line 61, in run_pulse
pulse.listen()
File "build/bdist.macosx-10.6-intel/egg/mozillapulse/consumers.py", line 148, in listen
on_connect_callback=on_connect_callback
File "build/bdist.macosx-10.6-intel/egg/mozillapulse/consumers.py", line 166, in _build_consumer
exchange(self.connection).declare(passive=True)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/abstract.py", line 66, in __call__
return self.bind(channel)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/abstract.py", line 70, in bind
return copy(self).maybe_bind(channel)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/abstract.py", line 75, in maybe_bind
self._channel = maybe_channel(channel)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/connection.py", line 1054, in maybe_channel
return channel.default_channel
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/connection.py", line 756, in default_channel
self.connection
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/connection.py", line 741, in connection
self._connection = self._establish_connection()
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/connection.py", line 696, in _establish_connection
conn = self.transport.establish_connection()
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/kombu-3.0.26-py2.7.egg/kombu/transport/pyamqp.py", line 116, in establish_connection
conn = self.Connection(**opts)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/amqp-1.4.6-py2.7.egg/amqp/connection.py", line 180, in __init__
(10, 30), # tune
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/amqp-1.4.6-py2.7.egg/amqp/abstract_channel.py", line 67, in wait
self.channel_id, allowed_methods)
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/amqp-1.4.6-py2.7.egg/amqp/connection.py", line 240, in _wait_method
self.method_reader.read_method()
File "/Users/armenzg/venv/pulse_actions/lib/python2.7/site-packages/amqp-1.4.6-py2.7.egg/amqp/method_framing.py", line 189, in read_method
raise m
IOError: Socket closed
Updated•9 years ago
|
Mentor: armenzg
Summary: Running automatic backfilling locally fails → Pulse Actions throws an unreadable exception when the proper env variables are not set up
Whiteboard: [good first bug]
Comment 1•9 years ago
|
||
Pulse Actions throws the above error when the env variables "PULSE_USER" and "PULSE_PW" are not set.
That is because on [1] we only do os.environ.get('PULSE_USER'), it just returns None and then when we try to create a pulse user with user = None, password = None we get an authentication error.
Instead we should verify if the env variables are set up and throw a more meaningful error when they are not, or maybe even ask the user to supply their credentials.
[1] https://github.com/adusca/pulse_actions/blob/master/pulse_actions/worker.py#L39
Assignee | ||
Comment 2•9 years ago
|
||
I'd like to work on this.
Comment 3•9 years ago
|
||
Nikki, feel free to ask questions here or on IRC. You can checkout the Readme here: https://github.com/adusca/pulse_actions
Assignee: nobody → nikkicubed
Reporter | ||
Comment 4•9 years ago
|
||
Hi nikkibee,
Thanks for your help!
Could you please try the steps from the description so you reproduce the same issue?
Please put any questions you have with regards to understanding what adusca or I mention. All questions are good.
Assignee | ||
Comment 5•9 years ago
|
||
Thanks to both of you! I've taken a good look at the readme and reproduced the issue as outlined. I'll take my questions to irc since I will find that faster to do.
Assignee | ||
Comment 6•9 years ago
|
||
I've made my pull request here: https://github.com/adusca/pulse_actions/pull/18
Reporter | ||
Comment 7•9 years ago
|
||
Hi @nikkibee,
Thanks for the PR.
Here's a bugzilla trick of the day, you can "attach" a PR to a bugzilla ticket and request a review from a bugzilla user.
I gave this one to :adusca since she's more experience in this code.
adusca: let me know if you would like me to look at it.
If you click on "attach file", you will get to a new page.
On that page (which I'm using to write this comment and attach the PR), you can click on "paste text as attachment".
In that box, you can paste the URL to the PR.
You add a short description and you change the "review" dropbox to be a question mark "?". On the filed after the question mark you can enter a user's nick name preceded by ":" (e.g. :adusca, :armenzg).
By doing this, Bugzilla will show on the reviewer's bugzilla a big red circle on the top left with a number inside it making reference to how many review requests or need info request they have.
It makes it less easy for a reviewer to miss a review request.
Attachment #8662359 -
Flags: review?(alicescarpa)
Updated•9 years ago
|
Attachment #8662359 -
Flags: review?(alicescarpa) → review+
Comment 8•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•