shahar1 commented on code in PR #60712:
URL: https://github.com/apache/airflow/pull/60712#discussion_r2702728664
##########
providers/google/src/airflow/providers/google/cloud/hooks/bigtable.py:
##########
@@ -251,9 +251,11 @@ def delete_table(self, instance_id: str, table_id: str,
project_id: str) -> None
"""
instance = self.get_instance(instance_id=instance_id,
project_id=project_id)
if instance is None:
- raise RuntimeError(f"Instance {instance_id} did not exist; unable
to delete table {table_id}")
- table = instance.table(table_id=table_id)
- table.delete()
+ self.log.warning("Instance '%s' does not exist in project '%s'.
Exiting", instance_id, project_id)
Review Comment:
Here it actually makes sense to raise a `RuntimeError`, because the instance
needs to exists so we could actually delete the table. After we ensure that it
exists, then we could actually use `try..except` to supress the table if it
doesn't exist - which apparently we already do in the operator.
--
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]