Eason09053360 commented on code in PR #74804:
URL: https://github.com/apache/airflow/pull/74804#discussion_r4290818262


##########
providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:
##########
@@ -628,6 +633,17 @@ def _add_authentication_config(
                 "scope",
             )
 
+            if conn_config["grant_type"] == "password":

Review Comment:
   `grant_type` is only set when the extra has `grant_type` or `refresh_token`, 
so an OAuth connection with neither now fails here with `KeyError: 
'grant_type'` instead of "Grant type must be provided…". 
`get_oauth_token(grant_type="client_credentials")` breaks for it too.
   
   ```suggestion
               if conn_config.get("grant_type") == "password":
   ```



##########
providers/snowflake/docs/connections/snowflake.rst:
##########
@@ -1,3 +1,4 @@
+

Review Comment:
   This blank line seems unrelated to this PR.
   ```suggestion
   ```



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