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

Logs are overwritten with new pipeline run #210

Closed
nsheff opened this issue Feb 17, 2024 · 6 comments
Closed

Logs are overwritten with new pipeline run #210

nsheff opened this issue Feb 17, 2024 · 6 comments
Labels

Comments

@nsheff
Copy link
Member

nsheff commented Feb 17, 2024

Log files are now being reset every time a pipeline runs.

Logs should be appended instead. It has worked this way for years, I'm not sure who changed this or how, but now I can no longer find logs for previous runs because they are being overwritten by the last run.

@vreuter
Copy link
Member

vreuter commented Feb 17, 2024

@nsheff is it known whether this is the case in the released 0.14.0 version?

@vreuter
Copy link
Member

vreuter commented Feb 17, 2024

@nsheff are you talking about the file pointed to by a pipeline manager's pipeline_log_file attribute, or something else?

@vreuter
Copy link
Member

vreuter commented Feb 17, 2024

From first glance, one way that seems this could happen (by no means am I saying necessarily that it's happening here) is that logmuse is given an argument for logfile that matches the value of the pipeline_log_file attribute on the manager.

https://github.com/databio/logmuse/blob/00f8e9f5fd769f7b10fc51dd0ee514f851707eb5/logmuse/est.py#L255-L261

A manager opens that file in append mode with tee, but logmuse appears to open the file in (over)write mode.

@vreuter
Copy link
Member

vreuter commented Feb 17, 2024

^^ Regardless of whether the above is responsible for what's being observed right now, it seems like...
a) the logger setup in the pipeline manager needs to protect against this (definitely) -- collision b/w filepath passed to logmuse as log message destination and the manager's own logfile
b) logmuse should change it's file opening mode from overwrite to append (perhaps)

@nsheff
Copy link
Member Author

nsheff commented Feb 17, 2024

False alarm. I was confusing the looper log file with the pypiper log file.

Basically, I was using a looper compute template that was teeing the output. This was just doing it per run, so it overwrites on each run. The pypiper log is separate, and it was correctly appending as expected. So, there's not actually anything wrong with pypiper.

To help users realize this more quickly in the future, I'm adding the path to the pypiper log file now in the logged preamble.

@vreuter
Copy link
Member

vreuter commented Feb 17, 2024

To help users realize this more quickly in the future, I'm adding the path to the pypiper log file now in the logged preamble.

👍 Nice!

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

No branches or pull requests

2 participants