Skip to content
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

get_auditlogpath/get_auditdirpath/get_wflogpath return absolute paths #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vnaum
Copy link

@vnaum vnaum commented Dec 20, 2017

relative paths break logging if workflow changes working directory:
2017-12-19 14:50:43 | ERROR | Error in event callback for 'event.core.processing_time'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/luigi/task.py", line 155, in trigger_event
callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 76, in save_end_time
self.add_auditinfo('task_exectime_sec', '%.3f' % task_exectime_sec)
File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 26, in add_auditinfo
return self._add_auditinfo(self.instance_name, infotype, infoval)
File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 40, in _add_auditinfo
with open(auditfile, 'w') as afile:
IOError: [Errno 2] No such file or directory: 'audit/.audit_XXXXXXXXXworkflow_20171219_145030_384056/XXXXXXXXXXXXXXXXXXXXXXXXXXXX'

relative paths break logging if workflow changes working directory:
2017-12-19 14:50:43 |    ERROR | Error in event callback for 'event.core.processing_time'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/luigi/task.py", line 155, in trigger_event
    callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 76, in save_end_time
    self.add_auditinfo('task_exectime_sec', '%.3f' % task_exectime_sec)
  File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 26, in add_auditinfo
    return self._add_auditinfo(self.instance_name, infotype, infoval)
  File "/usr/local/lib/python2.7/dist-packages/sciluigi/audit.py", line 40, in _add_auditinfo
    with open(auditfile, 'w') as afile:
IOError: [Errno 2] No such file or directory: 'audit/.audit_XXXXXXXXXworkflow_20171219_145030_384056/XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
@samuell
Copy link
Member

samuell commented Feb 2, 2018

Hi @vnaum and many thanks for the pull request!

Let me have a look in the coming week or so, if I can manage to set up automated testing / CI, to have this automatically checked against the relevant python versions etc, and then come back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants