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
Adding monitoring to send clean logging emails #420
Adding monitoring to send clean logging emails #420
Changes from 1 commit
bb29302
7c22220
d03f7a3
35c8dc4
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 should always get jobName or jobId from batch job event. So can we remove the unknown options and handle error instead and return something else?
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.
Shouldn't we still send an email if the event is "batch job failed" even if we don't know the job name or job id? How would you handle the error instead?
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.
For sure. I will try my best. I will add some clarification as well.
What I meant above is batch job event will be in this format where it should always have 'jobName' or 'jobId' or 'attempts' or 'container' and so on keys. I took out below example batch job event json from
indexer.py
lambda code. It's missing some other fields because I only kept information that indexer cares about. But batch event job will always has fixed keys.Given above reason, we should never receive batch job event json that didn't have
jobName
orjobId
and so on. If we do, then it's a bug and we need to correct our event source or lambda trigger source and update accordingly. I hope that helps add some context I missed to add last time.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.
To your question about how we should handle error, I would check event source. If it's not 'aws.batch', then raise error and shouldn't send message to the SNS. That's my thought.
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.
Ok, that makes sense! I'll add that case.