ciancolo commented on a change in pull request #16365:
URL: https://github.com/apache/airflow/pull/16365#discussion_r666967855



##########
File path: airflow/providers/tableau/hooks/tableau.py
##########
@@ -61,7 +57,10 @@ def __init__(self, site_id: Optional[str] = None, 
tableau_conn_id: str = default
         self.tableau_conn_id = tableau_conn_id
         self.conn = self.get_connection(self.tableau_conn_id)
         self.site_id = site_id or self.conn.extra_dejson.get('site_id', '')
-        self.server = Server(self.conn.host, use_server_version=True)
+        self.server = Server(self.conn.host)
+        self.server.add_http_options(options_dict={'verify': 
self.conn.extra_dejson.get('verify', True),

Review comment:
       Hi @eladkal, 
   sorry for the late response, but I was very busy at work.
   
   Anyway, I applied some of the changes as you suggested, in particular:
   
   - Introduced the conversion to boolean 
   - Renamed some variables and comments in tests
   
   Just a comment, the parameter `verify` in Requests module can be a boolean 
(True or False) or a string that contains the path to the certificate. This is 
necessary because Certifi, the module used to manage SSL certificates from 
Requests, reads (as default) only the certificates contained in file 
`cacert.pem` of contained in the module itself ([here 
](https://github.com/certifi/python-certifi)the official docs). There are 
cases, for example mine, that the user wants to use the certificates installed 
in the OS, then he/she has to specify the path to the certificate. To better 
clarify the utilization of the parameter I added an extra test. 
   
   I'm currently using the first version of this PR in my Airflow installation. 
I tested both the default and the path case and they work, but until now I 
never tested the False case. I tested just before these new updates and with 
the Boolean conversion, it works as well. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to