Display task container names for ECS task state change events#175
Merged
kathy-t merged 6 commits intohotfix/0.4.1from Dec 11, 2024
Merged
Display task container names for ECS task state change events#175kathy-t merged 6 commits intohotfix/0.4.1from
kathy-t merged 6 commits intohotfix/0.4.1from
Conversation
coverbeck
approved these changes
Dec 10, 2024
denis-yuen
approved these changes
Dec 10, 2024
svonworl
approved these changes
Dec 11, 2024
| let messageText = `Task ${taskArn} is now ${lastStatus}`; | ||
| const taskContainers = message?.detail?.containers | ||
| ?.map((container) => container.name) | ||
| .join(", "); |
Contributor
There was a problem hiding this comment.
To be robust when the containers field is missing, probably needs a ?.join so that an undefined continues to propagate.
Also, right now, if the value of containers is a scalar (which it probably never will be, but you never know), this code will throw at the map invocation. What happens when the lambda throws, are we notified? If so, probably not worth worrying about.
Contributor
Author
There was a problem hiding this comment.
I don't believe we are notified. The lambda does have a dead queue configured but I don't think we do anything with it https://github.com/dockstore/dockstore-deploy/blob/38977e218b16a73d0a29167d00f3c89bbdb09b3d/cloudwatch-to-slack.yml.template#L146-L147
Contributor
Author
There was a problem hiding this comment.
svonworl
approved these changes
Dec 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR displays the containers that belong to the task when an ECS task state change event is received by the lambda.
See the dockstore-deploy PR https://github.com/dockstore/dockstore-deploy/pull/816 that redirects the events to different channels depending on if it's for the webservice task or a scheduled task.
The notifications now look like this for the webservice task:
and the topic updater task:
Issue
Implemented while doing https://ucsc-cgl.atlassian.net/browse/SEAB-6795, but technically tackles https://ucsc-cgl.atlassian.net/browse/SEAB-6746
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!