potiuk commented on code in PR #24931:
URL: https://github.com/apache/airflow/pull/24931#discussion_r918705328
##########
tests/providers/google/cloud/utils/gcp_authenticator.py:
##########
@@ -107,8 +107,8 @@ def set_key_path_in_airflow_connection(self):
extras[PROJECT_EXTRA] = self.project_extra if self.project_extra
else self.project_id
conn.extra = json.dumps(extras)
session.commit()
- except BaseException as ex:
- self.log.error('Airflow DB Session error: %s', str(ex))
+ except BaseException:
+ self.log.error('Airflow DB Session error.')
Review Comment:
Same here. we do not need to catch BaseException here, we just need a
fixture that calls rollback() (it is safe to call rollback even after commit)
. then we do not heed to have try/except at all.
##########
tests/providers/google/cloud/utils/gcp_authenticator.py:
##########
@@ -133,8 +133,8 @@ def set_dictionary_in_airflow_connection(self):
extras[PROJECT_EXTRA] = self.project_extra
conn.extra = json.dumps(extras)
session.commit()
- except BaseException as ex:
- self.log.error('Airflow DB Session error: %s', str(ex))
+ except BaseException:
+ self.log.error('Airflow DB Session error.')
Review Comment:
Same 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]