[ 
https://issues.apache.org/jira/browse/AIRFLOW-5027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16891086#comment-16891086
 ] 

ASF GitHub Bot commented on AIRFLOW-5027:
-----------------------------------------

StevenReitsma commented on pull request #5645: [AIRFLOW-5027] Generalized 
CloudWatch log grabbing for ECS and SageMaker operators
URL: https://github.com/apache/airflow/pull/5645
 
 
   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
   
   - [x] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-5027
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI 
changes:
   
   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
   
   - [x] My PR adds the following unit tests:
   
   Added: `tests.contrib.hooks.TestAwsLogsHook`
   Changed: `tests.contrib.hooks.TestSageMakerHook`
   Changed: `tests.contrib.sensors.TestSageMakerTrainingSensor`
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)"
   
   ### Documentation
   
   - [x] In case of new functionality, my PR adds documentation that describes 
how to use it.
     - All the public functions and the classes in the PR contain docstrings 
that explain what it does
   
   ### Code Quality
   
   - [x] Passes `flake8`
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Generalized CloudWatch log grabbing for ECS and SageMaker operators
> -------------------------------------------------------------------
>
>                 Key: AIRFLOW-5027
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5027
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: aws, contrib, logging
>    Affects Versions: 1.10.3, 1.10.4
>            Reporter: Steven Reitsma
>            Assignee: Steven Reitsma
>            Priority: Major
>
> 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 operator to a hook 
> and both the SageMaker and ECS operators now call that hook at the end of a 
> job.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to