justinpakzad commented on code in PR #77275:
URL: https://github.com/apache/airflow/pull/77275#discussion_r4636395907


##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowpark_containers.py:
##########
@@ -194,7 +194,16 @@ def _run_one(self, sql: str, return_dictionaries: bool = 
False) -> Any:
     def _submit_job(self) -> str:
         """Submit the job and return the name."""
         response = self._run_one(self._build_sql())
-        job_name = response[0].split("'")[1]
+
+        if not isinstance(response, (list, tuple)) or not response or not 
isinstance(response[0], str):
+            raise RuntimeError(f"Unexpected job submission response: 
{response!r}")
+
+        parts = response[0].split("'")
+        if len(parts) < 3 or not parts[1]:

Review Comment:
   `execute()` has a `if not self.job_name: raise RuntimeError(...)` guard 
which would now be redundant. Can we remove it there?  If so, we can also drop 
the `test_execute_raises_when_job_name_not_returned` test. 



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