You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/29 17:12:33 UTC

[GitHub] [airflow] wojsamjan commented on a change in pull request #22280: Add links for BigQuery Data Transfer

wojsamjan commented on a change in pull request #22280:
URL: https://github.com/apache/airflow/pull/22280#discussion_r837716565



##########
File path: airflow/providers/google/cloud/sensors/bigquery_dts.py
##########
@@ -130,4 +131,7 @@ def poke(self, context: 'Context') -> bool:
             metadata=self.metadata,
         )
         self.log.info("Status of %s run: %s", self.run_id, str(run.state))
+
+        if run.state in (TransferState.FAILED, TransferState.CANCELLED):
+            raise AirflowException(f"Transfer {self.run_id} did not succeed")

Review comment:
       Actually, without this it did not work correctly. Before only checking is state in expected (succeed), but what if this already failed? As I understand and implement sensors is: if succeed then return True, if waiting - False, if failed - raise. Otherwise we are waiting for the result which has already failed - what is the reason in this situation?
   The problem I noticed is that the sensor was waiting in loop for the already failed result - what I think is not something expected




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org