From 6179a6365be29986b1761537e9ed0e9ad4fd6d34 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Wed, 11 Dec 2024 15:58:19 -0500 Subject: [PATCH] revert changes that were addressed in other pull requests and just create pr noise here --- dbt/adapters/bigquery/impl.py | 2 ++ dbt/adapters/bigquery/python_submissions.py | 2 +- dbt/adapters/bigquery/retry.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dbt/adapters/bigquery/impl.py b/dbt/adapters/bigquery/impl.py index 66e6bffea..51c457129 100644 --- a/dbt/adapters/bigquery/impl.py +++ b/dbt/adapters/bigquery/impl.py @@ -671,6 +671,7 @@ def load_dataframe( table_name, table_schema, field_delimiter, + fallback_timeout=300, ) @available.parse_none @@ -691,6 +692,7 @@ def upload_file( database, table_schema, table_name, + fallback_timeout=300, **kwargs, ) diff --git a/dbt/adapters/bigquery/python_submissions.py b/dbt/adapters/bigquery/python_submissions.py index 8eea838f8..cd7f7d86f 100644 --- a/dbt/adapters/bigquery/python_submissions.py +++ b/dbt/adapters/bigquery/python_submissions.py @@ -43,7 +43,7 @@ def __init__(self, parsed_model: Dict, credentials: BigQueryCredentials) -> None # set retry policy, default to timeout after 24 hours retry = RetryFactory(credentials) - self._polling_retry = retry.create_job_execution_polling( + self._polling_retry = retry.create_polling( model_timeout=parsed_model["config"].get("timeout") ) diff --git a/dbt/adapters/bigquery/retry.py b/dbt/adapters/bigquery/retry.py index 171598160..7d94080cb 100644 --- a/dbt/adapters/bigquery/retry.py +++ b/dbt/adapters/bigquery/retry.py @@ -91,7 +91,7 @@ def __call__(self, error: Exception) -> bool: def _create_reopen_on_error(connection: Connection) -> Callable[[Exception], None]: - def on_error(error: Exception) -> None: + def on_error(error: Exception): if isinstance(error, (ConnectionResetError, ConnectionError)): _logger.warning("Reopening connection after {!r}".format(error)) connection.handle.close()