ashb commented on a change in pull request #2488: [AIRFLOW-1342] enable S3Hook
to use host from connection
URL: https://github.com/apache/incubator-airflow/pull/2488#discussion_r215181444
##########
File path: airflow/hooks/S3_hook.py
##########
@@ -105,7 +105,9 @@ def __init__(
self._creds_in_conn = 'aws_secret_access_key' in self.extra_params
self._creds_in_config_file = 's3_config_file' in self.extra_params
self._default_to_boto = False
- if 'host' in self.extra_params:
+ if self.s3_conn.host is not None:
+ self.s3_host = self.s3_conn.host
+ elif 'host' in self.extra_params:
Review comment:
I'm guessing this is to support S3 compatible services etc?
Can we add an something to the docs (somewhere? Not sure where) mentioning
that this is supported? And also probably add a deprecation warning if `host'
in self.extra_params` - pulling that from the connection's host field makes
much more sense.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services