SameerMesiah97 commented on code in PR #77355:
URL: https://github.com/apache/airflow/pull/77355#discussion_r4670290911


##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py:
##########
@@ -544,8 +548,12 @@ def get_job_status(self, external_id: JsonValue, context: 
Context) -> str:
                 raise
         if "error" in statuses:
             return "error"
+        if any(status not in {"success", "running"} for status in statuses):
+            raise RuntimeError(f"Unexpected Snowflake SQL API query statuses: 
{statuses}")
         if "running" in statuses:
             return "running"
+        if not statuses:
+            raise RuntimeError("No Snowflake SQL API query statuses returned")

Review Comment:
   `submit_job `now has the exact same validation.



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