-
Notifications
You must be signed in to change notification settings - Fork 16.3k
fix(snowflake_oauth): Fix infinite recursive call of _get_conn_params while getting oauth token from snowflake #50344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bugraoz93
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Sharashchandra !
|
Tests are failing |
|
Yes, most probably, the property is now a method and needs to be updated in the test accordingly |
|
Fixed that. Reverting the account_identifier property to remain as it was before because it's used in multiple places in the SnowflakeSqlApiHook cc: @eladkal @bugraoz93 |
providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py
Outdated
Show resolved
Hide resolved
|
Tests are still failing |
|
Yes, because we remove the region now tests are expecting it |
… while getting oauth token from snowflake
…ng account to construct oauth_token url
…ion to be part of the url
…sing region in the url for the oauth call
|
Fixed the test cases, eveything is passing |
…oken from snowflake (apache#50344) * fix(snowflake_oauth): Fix infinite recursive call of _get_conn_params while getting oauth token from snowflake * fix(snowflake_oauth): Reverting account_identifier as a property, using account to construct oauth_token url * fix(snowflake_oauth): Adding https:// for the snowflake oauth url * fix(snowflake_oauth): Fix test case for oauth which was expecting region to be part of the url * fix(snowflake_oauth): Fix failing text cases for snowflake api hook using region in the url for the oauth call
Bug introduced in: #49482
The infinite loop was caused by calling the property self._get_conn_params in the property self.account_identifier. The self.account_identifier was used in the get_oauth_token function, thus resulting in the infinite loop of calls to self._get_conn_params