justinpakzad commented on code in PR #70103:
URL: https://github.com/apache/airflow/pull/70103#discussion_r3952909174
##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowpark_containers.py:
##########
@@ -203,7 +190,14 @@ def _submit_job(self) -> str:
def _poll_for_status(self) -> str:
"""Poll until the job reaches a terminal state."""
+ status = None
+ end_time = time.time() + self.timeout
Review Comment:
Good call, I've updated `_poll_for_status` to use `time.monotonic()`. Also
updated one of the tests since it was using time machine which doesn't seem to
mock `time.monotonic()`
##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowpark_containers.py:
##########
@@ -137,6 +117,8 @@ def __init__(
drop_on_completion: bool = True,
poll_interval: int = 10,
snowflake_conn_id: str = "snowflake_default",
+ deferrable: bool = conf.getboolean("operators", "default_deferrable",
fallback=False),
+ timeout: int = 24 * 60 * 60,
Review Comment:
Good call. I've added a line to the change log. I also squashed the commits
(I know maintainers do it anyways but the commit message weren't the best) and
added a more detailed message.
--
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]