-
Notifications
You must be signed in to change notification settings - Fork 69
Add Cloudwatch console link for container insight logs #74
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
Conversation
**Description** When executing get-logs function, after printing all the logs, we also provide the cloudwatch link to container insight logs (if the CW observability add-on is enabled) **Testing Done** Tested in my personal account and verified the link, and added unit test
|
|
||
| return cloudwatch_link | ||
|
|
||
| def get_log_url(self, eks_cluster_name, region, node_name, pod_name, namespace, container_name, container_id): |
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 add validation here. Like https://github.com/aws/sagemaker-hyperpod-cli/blob/main/src/hyperpod_cli/utils.py#L124
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.
Added validation in new commit
|
Per review from security guardian, failure in generating cloudwatch link would lead to system exit I'm adding a new try-except block for CW link creation. If there's any failure we skip and continue |
|
Added try except for CW link creation. Manually raised error in the creation process and error message can be loaded correctly |
adheshgarg
left a comment
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.
LGTM
Description
When executing get-logs function, after printing all the logs, we also provide the cloudwatch link to container insight logs (if the CW observability add-on is enabled)
Testing Done
Tested in my personal account and verified the link, and added unit test
PR Approval Steps
For Requester
For Reviewer
For Requestersection to double check each item.