You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/16 18:17:22 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #17637: hdfs provider: allow SSL webhdfs connections

potiuk commented on a change in pull request #17637:
URL: https://github.com/apache/airflow/pull/17637#discussion_r689755902



##########
File path: tests/providers/apache/hdfs/hooks/test_webhdfs.py
##########
@@ -67,7 +68,7 @@ def test_get_conn_kerberos_security_mode(
         conn = self.webhdfs_hook.get_conn()
 
         connection = mock_get_connections.return_value[0]
-        mock_kerberos_client.assert_called_once_with(f'http://{connection.host}:{connection.port}')
+        mock_kerberos_client.assert_called_once_with(f'http://{connection.host}:{connection.port}', session=None)

Review comment:
       Could you please add test cases with "use_ssl" and `verify`? (Maybe a @parameterized) test even

##########
File path: airflow/providers/apache/hdfs/hooks/webhdfs.py
##########
@@ -93,12 +93,19 @@ def _find_valid_server(self) -> Any:
 
     def _get_client(self, connection: Connection) -> Any:
         connection_str = f'http://{connection.host}:{connection.port}'
+        session = None
+
+        if connection.extra_dejson.get('SSL', False):

Review comment:
       small NIT. Can we please change it to "use_ssl" instead of 'SSL' ?  We are mostly using lowercase for extra names.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org