potiuk commented on a change in pull request #8534:
URL: https://github.com/apache/airflow/pull/8534#discussion_r415023032
##########
File path: airflow/providers/amazon/aws/hooks/base_aws.py
##########
@@ -62,16 +63,14 @@ class AwsBaseHook(BaseHook):
def __init__(
self,
- aws_conn_id="aws_default",
+ aws_conn_id: str = "aws_default",
Review comment:
Should not that be Optional[str] ?
##########
File path: airflow/utils/log/s3_task_handler.py
##########
@@ -48,7 +48,7 @@ def hook(self):
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
return S3Hook(remote_conn_id)
except Exception: # pylint: disable=broad-except
- self.log.error(
+ self.log.exception(
Review comment:
nice!
##########
File path: tests/providers/amazon/aws/hooks/test_base_aws.py
##########
@@ -208,3 +208,8 @@ def test_expand_role(self):
arn = hook.expand_role('test-role')
expect_arn = conn.get_role(RoleName='test-role').get('Role').get('Arn')
self.assertEqual(arn, expect_arn)
+
Review comment:
We need test for None I guess.
----------------------------------------------------------------
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]