Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add all expid_dir_path functions to autosubmit.py, add attached files to emails #1997
base: master
Are you sure you want to change the base?
Add all expid_dir_path functions to autosubmit.py, add attached files to emails #1997
Changes from all commits
f067bc3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to confirm if this is the best option. I remember the discussion, but I didn't have time to ponder about it, sorry.
@mcastril, here we have a few options, basically,
I think I am more included towards 1) to simplify or a 1.5) option, where we let users choose whether they want the location or the attachment, but I had seen a comment about doing the option 2), which is implemented here.
WDYT, Miguel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if we fail to attach any file, we just print the log? Or should we move this into the for-loop in attach_files? (i.e. log when a file fails, but keep trying the remaining ones?)
And should we just log, or fail the process?
And should we perhaps log but also add something in the email/mime-message, in the notification saying "Here's your notification, but sorry I couldn't attach file ABC.log for reasons"? 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ideally we'd want to attach as many log files as possible; so omit the ones we can't retrieve (if any) but still attach the rest. Modifying the mail body to explain this would also be nice, i.e. "This email has attached all the log files we could retrieve, there might be some missing".
I can add another log in the
attach_files
function and write more specific log messages. I'd rather have a new one than moving this one since they can catch different exceptions - for instance, what if the ASLOGS dir doesn't exist? -.I'm also wondering if we should compress the log files before attaching them, to delay reaching the file attachment limit (what is it?) Overall, attaching the files is a nice touch but the most relevant information for the user is the log path, which is always printed in the mail body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If any of these logs include things like compilation of a model like IFS with debug info, that might be a very-very-very large file (I've seen >100MB when someone enabled some print+debug in the compilation). Even zipping it could fail to send notifications due to server size limit.
IMHO it would be safer to add location, and if we want to give the file for the user convenience, then maybe a toggle that enables the files to be attached.