-
Notifications
You must be signed in to change notification settings - Fork 516
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
Failed GLS job log files are not uploaded to bucket AND --show-failed-logs does not work on instance #1992
Comments
It's been a while since I worked on this, but at least when I used this API I used the command as you described above: but that would only work if you put more verbose printing in your job. Maybe it would be a matter of adding |
Yeah, that only works if you don't redirect the stderr/stdout of your job to a log file. Which then defeats the purpose of the I just tried adding snakemake/snakemake/executors/__init__.py Line 302 in a5c3523
However, Edit: I guess we could just hardcode |
@cademirch remember that the container the life sciences worker is using is the latest snakemake - so if you want to try changing something you'd need to build a container, push to a registry, and then provide the container URI to the executor. |
Right, but what I'm proposing is just adding See: |
Ok great! Glad you found a solution. |
Opened a PR but further discussion is probably needed. Thanks for your help @vsoch! :) |
Haha I didn’t do anything - all you @cademirch! 🙌 |
+1 on this feature. It was very frustrating to have a job failing all afternoon because a file in a What is surprising is, just like OP and in opposition to what is written here, logs of a rule are actually not written in the bucket if the rule is failing. I can only see rule logs when the rule passes (which is a bit sad). |
@oxenit, I haven't had a chance to work on this unfortunately but my workaround above has been sufficient for our use. I expect that this behavior won't change anytime soon as we will eventually have to migrate to Google Batch. Hopefully we can solve this issue when that happens. |
Snakemake version
7.18.2
Describe the bug
When a job fails on GLS the stdout/stderr from the instance is captured and uploaded to the specified bucket. However, if the stderr/stdout is captured in a log file, that file is not uploaded to the bucket. Looking at the executor code, it doesn't seem like this is a feature - so I guess this isn't really a bug - but it would be a nice feature.
I attempted a quick work around by passing the option
--show-failed-logs
, expecting that would cat the log file to stdout (on the instance), which would be captured. However, it seems that--show-failed-logs
is not passed to the snakemake command on the instance, rather it tries to display the log file locally, which of course does not exist.Logs
--show-failed-logs
:snakemake --google-lifesciences --default-remote-prefix gls-log-test -j1 --show-failed-logs
Minimal example
Additional context
Would appreciate your insight @vsoch. It seems to me that uploading the job log file could be handled by gls_helper.py but it would probably take me a bit to implement that. It would probably be easier to pass
--show-failed-logs
similar to how--use-conda
. Though I'm not sure where/how that is handled.@CowanCS1 Interested if/how you handle this too!
The text was updated successfully, but these errors were encountered: