dstandish commented on a change in pull request #19530:
URL: https://github.com/apache/airflow/pull/19530#discussion_r747062995
##########
File path: airflow/providers/salesforce/hooks/salesforce.py
##########
@@ -131,22 +131,39 @@ def get_conn(self) -> api.Salesforce:
if not self.conn:
connection = self.get_connection(self.conn_id)
extras = connection.extra_dejson
+ # all extras below (besides the version one) are explicitly
defaulted to None
+ # because simple-salesforce has a built-in authentication-choosing
method that
+ # relies on which arguments are None and without "or None" setting
this connection
+ # in the UI will result in the blank extras being empty strings
instead of None,
+ # which would break the connection if "get" was used on its own.
self.conn = Salesforce(
username=connection.login,
password=connection.password,
- security_token=extras["extra__salesforce__security_token"] or
None,
- domain=extras["extra__salesforce__domain"] or None,
+ security_token=extras.get('security_token')
Review comment:
I see.
I am pretty sure gcp ones use the extra format. @potiuk or @mik-laj may be
able to help guide us here
--
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]