New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.05][BUG] Tolerate IOError in tool and data table watcher #4981

Merged
merged 1 commit into from Nov 13, 2017

Conversation

Projects
None yet
3 participants
@mvdbeek
Member

mvdbeek commented Nov 11, 2017

Without these changes the watcher thread may die when manually deleting loc files:

Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/events.py", line 322, in dispatch
    self.on_any_event(event)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/toolbox/watcher.py", line 226, in on_any_event
    self._handle(event)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/toolbox/watcher.py", line 235, in _handle
    cur_hash = md5_hash_file(path)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/util/hash_util.py", line 23, in md5_hash_file
    with open(path, 'rb') as afile:
IOError: [Errno 2] No such file or directory: '/Users/mvandenb/src/galaxy/tool-data/toolshed.g2.bx.psu.edu/repos/lparsons/htseq_count/620d5603d1a8/sam_fa_indices.loc'

Similar problems could occur when deleting tool xml files.

Tolerate IOError in tool and data table watcher
Without these changes the watcher thread may die when manually deleting loc files:
```
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python2.7/site-packages/watchdog/events.py", line 322, in dispatch
    self.on_any_event(event)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/toolbox/watcher.py", line 226, in on_any_event
    self._handle(event)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/toolbox/watcher.py", line 235, in _handle
    cur_hash = md5_hash_file(path)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/util/hash_util.py", line 23, in md5_hash_file
    with open(path, 'rb') as afile:
IOError: [Errno 2] No such file or directory: '/Users/mvandenb/src/galaxy/tool-data/toolshed.g2.bx.psu.edu/repos/lparsons/htseq_count/620d5603d1a8/sam_fa_indices.loc'
```
Similar problems could occur when deleting tool xml files.

@dannon dannon merged commit 6915007 into galaxyproject:release_17.05 Nov 13, 2017

7 checks passed

api test Build finished. 275 tests run, 0 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 148 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 34 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
selenium test Build finished. No test results found.
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
@dannon

This comment has been minimized.

Member

dannon commented Nov 13, 2017

+1

@dannon

This comment has been minimized.

Member

dannon commented Nov 13, 2017

Merged forward to 17.09 and dev.

@galaxyproject galaxyproject deleted a comment from galaxybot Nov 13, 2017

@nsoranzo nsoranzo added this to the 18.01 milestone Nov 13, 2017

@mvdbeek mvdbeek deleted the mvdbeek:watcher_error_delete branch Jun 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment