Currently the Add-on validator executes scripts by first copying the source to /tmp/temp.js -- this will not work when many versions of the validator are running on the same server in parallel. Consider using the tempfile module http://docs.python.org/library/tempfile.html or sending stdin to spidermonkey (if possible). Or Paul Davis' python bindings for spidermonkey http://pypi.python.org/pypi/python-spidermonkey/ I've used this latter one and it's pretty comprehensive, last I checked.
Assignee: nobody → mbasta
python-spidermonkey looks awesome, whether we use it here or not, there are probably other places we could mess with it. As far as this bug, if you go with extracting to disk somewhere make sure to clean up after yourself (temp[file|dir] makes this easy).
Target Milestone: --- → 5.12.4
I like the idea of python-spidermonkey. I'll play around with it a little and try to get it worked in with my next iteration of the JS stuff.
I ended up using tempfile; python-spidermonkey wouldn't install on my machine. I also figure that keeping dependencies to a minimum is best. https://github.com/mattbasta/amo-validator/commit/f2e5f343ba9c677e7a4a8ffa6712fb32d7f8ff83
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.