Skip to content

Commit 451c665

Browse files
authored
Uninstall google-cloud-bigquery-storage library. (#977)
This library is part of our base image (deeplearning-platform-release) but not other libraries depend on it. Removing this library ensures the bigquery library fall backs on using regular BQ queries to fetch data. The BigQuery storage APIs are not supported by our data proxy and we don't monkey patch this client. This change simply revert to the behavior we had with BQ 1.x libraries. http://b/183041606
1 parent d9ccd5f commit 451c665

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ RUN pip install --upgrade cython && \
276276
pip install google-cloud-language==2.* && \
277277
pip install google-cloud-videointelligence==2.* && \
278278
pip install google-cloud-vision==2.* && \
279+
# b/183041606#comment5: the Kaggle data proxy doesn't support these APIs. If the library is missing, it falls back to using a regular BigQuery query to fetch data.
280+
pip uninstall -y google-cloud-bigquery-storage && \
279281
# After launch this should be installed from pip
280282
pip install git+https://github.com/googleapis/python-aiplatform.git@mb-release && \
281283
pip install ortools && \

tests/test_bigquery_storage.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import unittest
2+
3+
class TestBigQueryStorage(unittest.TestCase):
4+
5+
def test_ensure_bq_storage_is_not_installed(self):
6+
# b/183041606#comment5: Ensures bigquery_storage is not installed.
7+
# bigquery falls back on using regular BQ queries which are supported by the BQ proxy.
8+
with self.assertRaises(ImportError):
9+
from google.cloud import bigquery_storage

0 commit comments

Comments
 (0)