From 8edd1606e1b8241fdcb651a91f0cb3ffec5d47e7 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Date: Fri, 16 Dec 2022 00:30:16 +0000 Subject: [PATCH 1/2] Specifies timeout in exception polling Signed-off-by: gbmarc1 --- sdk/python/feast/infra/offline_stores/bigquery.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index bf010c82aaf..062c14172ed 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -608,8 +608,11 @@ def _wait_until_done(bq_job): client.cancel_job(bq_job.job_id) raise BigQueryJobCancelled(job_id=bq_job.job_id) - if bq_job.exception(): - raise bq_job.exception() + # We explicitly set the timeout to None because `google-api-core` keeps changing default value and + # breaks downstream libraries. + # https://github.com/googleapis/python-api-core/issues/479 + if bq_job.exception(timeout=None): + raise bq_job.exception(timeout=None) def _get_table_reference_for_new_entity( From 6d46485b59b6f4be97e5638ed6c977e314ae2668 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Date: Thu, 15 Dec 2022 20:01:24 -0500 Subject: [PATCH 2/2] Update bigquery.py Signed-off-by: gbmarc1 --- sdk/python/feast/infra/offline_stores/bigquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index 062c14172ed..fbea3dc5c3e 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -608,7 +608,7 @@ def _wait_until_done(bq_job): client.cancel_job(bq_job.job_id) raise BigQueryJobCancelled(job_id=bq_job.job_id) - # We explicitly set the timeout to None because `google-api-core` keeps changing default value and + # We explicitly set the timeout to None because `google-api-core` changed the default value and # breaks downstream libraries. # https://github.com/googleapis/python-api-core/issues/479 if bq_job.exception(timeout=None):