-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5027] Get logs from CloudWatch for ECSOperators #5645
Conversation
@StevenReitsma please rebase and push so that Travis can build it. Travis had a problem whole day yesterday. |
Could someone take a look at this PR? |
PTAL @ashb |
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.
Few more small changes please.
Thanks for the reviews so far @ashb, PTAL :) |
@ashb Made the change and Travis is green again. PTAL :) |
(cherry picked from commit 786db8b)
My first Airflow PR so I hope I adhered to all the contribution guidelines. All comments welcome.
Make sure you have checked all steps below.
Jira
Description
It's very useful to have the CloudWatch task logs of an ECS/SageMaker job available within Airflow. Currently, this is not possible for ECS tasks.
The SageMaker operator starts a job on AWS SageMaker. It already supports grabbing the CloudWatch logs of the (finished) job to the Airflow instance.
The ECS operator is very similar in that it starts a job on AWS ECS. It doesn't, however, support grabbing CloudWatch logs at the end of a job.
I've separated the existing log grabbing of the SageMaker hook to a separate logs hook and both the SageMaker hook and ECS operator now call that logs hook at the end of a job.
Tests
Added:
tests.contrib.hooks.TestAwsLogsHook
Changed:
tests.contrib.hooks.TestSageMakerHook
Changed:
tests.contrib.sensors.TestSageMakerTrainingSensor
Commits
Documentation
Code Quality
flake8