smtp_batch: proper exit code when non-interactive#2608
Conversation
|
From my side this would be already finished (if the tests pass, but I expect them to do so with that little changes). Is there anything left to do for me? |
|
The tests are broken, #2602 would fix that. Do you mean smtp_batch: proper exit code when |
|
No I think it's right this way. When the bot is interactive, I assume the exit code is not that important since a human is reading the output anyhow (also how to set the exit code if the first command (e.g. sending the first debug mail failed) but the second command succeded?). So this change is supposed to handle the case when the bot is run via cli, but e.g. as cron job (so not interactively but with the
So do I understand this correctly, are all PRs suspended at the moment, until that test-case is fixed? |
Sending mails with the smtp_batch output might fail e.g. due to wrong settings regarding the SMTP-Server. So far this is not reflected in the exit code when running the bot via cli to trigger sending the mails. Fixing this (at least for the non-interactive call) enables users to integrate this into their monitoring properly.
|
Now with the tests fixed, can you trigger the workflows on this? |
Thanks for the explanation. I confused (non-)interactive with the bot run mode (continuous/scheduled). Your logic makes sense of course :)
My 2 cents on this - but I'm not a user of this bot: If any error occurred, the exit code would be non-zero (or the maximum of all potential exit codes). But that's neither important nor urgent to do. |
This is only related to #2586 as that issue covers more than this PR. For the rest see the commit message.