josh-fell commented on pull request #18800:
URL: https://github.com/apache/airflow/pull/18800#issuecomment-942342173


   @gigatexal Are you seeing `KeyError` exceptions when using the latest 
Salesforce provider?
   
   With how the custom connection fields currently work, there will always be a 
key for each of the custom fields in `Extra`.  Since each one of these 
Salesforce connection params have their own custom field in the connection 
form, if a value is not provided it defaults to `""`.  Users aren't required to 
enter a value for each extra param.
   
   In the `simple-salesforce` package, the logic that determines what 
authentication type to use are all similar in format to:
   ```python
   if all(arg is not None for arg in (username, password, security_token)):
       ...
   ```
   Unfortunately there is no `authentication_type` that is passed to explicitly 
state the authentication a user would like to integrate with.
   
   Because the empty string is not `None`, there are chances that the incorrect 
authentication type is chosen which was the choice for the slightly clunky 
`extras["extra__salesforce__<conn-field>"] or None` approach.


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