[GitHub] XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error in case logs can't be fetched from S3

2018-12-26 Thread GitBox
XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error 
in case logs can't be fetched from S3
URL: https://github.com/apache/incubator-airflow/pull/4372#discussion_r243990149
 
 

 ##
 File path: airflow/utils/log/s3_task_handler.py
 ##
 @@ -124,7 +124,8 @@ def s3_log_exists(self, remote_log_location):
 try:
 return self.hook.get_key(remote_log_location) is not None
 except Exception:
-pass
+msg = 'Could not list logs at {}'.format(remote_log_location)
+self.log.exception(msg)
 
 Review comment:
   My two cents:
   
   1. maybe not necessary to have this intermediary variable `msg` here?
   2. This function is supposed to return `True`/`False` in whatever situation, 
instead of raising exception. Raising an exception here is breaking the logic. 
This is why the tests are failing.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error in case logs can't be fetched from S3

2018-12-26 Thread GitBox
XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error 
in case logs can't be fetched from S3
URL: https://github.com/apache/incubator-airflow/pull/4372#discussion_r243989664
 
 

 ##
 File path: airflow/utils/log/s3_task_handler.py
 ##
 @@ -124,7 +124,8 @@ def s3_log_exists(self, remote_log_location):
 try:
 return self.hook.get_key(remote_log_location) is not None
 except Exception:
-pass
+msg = 'Could not list logs at {}'.format(remote_log_location)
+self.log.exception(msg)
 
 Review comment:
   Maybe not necessary to have this intermediary variable `msg` here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error in case logs can't be fetched from S3

2018-12-26 Thread GitBox
XD-DENG commented on a change in pull request #4372: AIRFLOW-3567 Show an error 
in case logs can't be fetched from S3
URL: https://github.com/apache/incubator-airflow/pull/4372#discussion_r243989664
 
 

 ##
 File path: airflow/utils/log/s3_task_handler.py
 ##
 @@ -124,7 +124,8 @@ def s3_log_exists(self, remote_log_location):
 try:
 return self.hook.get_key(remote_log_location) is not None
 except Exception:
-pass
+msg = 'Could not list logs at {}'.format(remote_log_location)
+self.log.exception(msg)
 
 Review comment:
   Maybe not necessary to have this intermediary variable `msg` here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services