|
49 | 49 | import bigframes_vendored.pandas.io.parsers.readers as third_party_pandas_readers |
50 | 50 | import bigframes_vendored.pandas.io.pickle as third_party_pandas_pickle |
51 | 51 | import google.cloud.bigquery as bigquery |
52 | | -import google.cloud.storage as storage # type: ignore |
53 | 52 | import numpy as np |
54 | 53 | import pandas |
55 | 54 | from pandas._typing import ( |
@@ -1424,7 +1423,7 @@ def _check_file_size(self, filepath: str): |
1424 | 1423 | if filepath.startswith("gs://"): # GCS file path |
1425 | 1424 | bucket_name, blob_path = filepath.split("/", 3)[2:] |
1426 | 1425 |
|
1427 | | - client = storage.Client() |
| 1426 | + client = self._clients_provider.storageclient |
1428 | 1427 | bucket = client.bucket(bucket_name) |
1429 | 1428 |
|
1430 | 1429 | list_blobs_params = inspect.signature(bucket.list_blobs).parameters |
@@ -1510,6 +1509,9 @@ def remote_function( |
1510 | 1509 | cloud_function_timeout: Optional[int] = 600, |
1511 | 1510 | cloud_function_max_instances: Optional[int] = None, |
1512 | 1511 | cloud_function_vpc_connector: Optional[str] = None, |
| 1512 | + cloud_function_vpc_connector_egress_settings: Literal[ |
| 1513 | + "all", "private-ranges-only", "unspecified" |
| 1514 | + ] = "private-ranges-only", |
1513 | 1515 | cloud_function_memory_mib: Optional[int] = 1024, |
1514 | 1516 | cloud_function_ingress_settings: Literal[ |
1515 | 1517 | "all", "internal-only", "internal-and-gclb" |
@@ -1675,6 +1677,13 @@ def remote_function( |
1675 | 1677 | function. This is useful if your code needs access to data or |
1676 | 1678 | service(s) that are on a VPC network. See for more details |
1677 | 1679 | https://cloud.google.com/functions/docs/networking/connecting-vpc. |
| 1680 | + cloud_function_vpc_connector_egress_settings (str, Optional): |
| 1681 | + Egress settings for the VPC connector, controlling what outbound |
| 1682 | + traffic is routed through the VPC connector. |
| 1683 | + Options are: `all`, `private-ranges-only`, or `unspecified`. |
| 1684 | + If not specified, `private-ranges-only` is used by default. |
| 1685 | + See for more details |
| 1686 | + https://cloud.google.com/run/docs/configuring/vpc-connectors#egress-job. |
1678 | 1687 | cloud_function_memory_mib (int, Optional): |
1679 | 1688 | The amounts of memory (in mebibytes) to allocate for the cloud |
1680 | 1689 | function (2nd gen) created. This also dictates a corresponding |
@@ -1732,6 +1741,7 @@ def remote_function( |
1732 | 1741 | cloud_function_timeout=cloud_function_timeout, |
1733 | 1742 | cloud_function_max_instances=cloud_function_max_instances, |
1734 | 1743 | cloud_function_vpc_connector=cloud_function_vpc_connector, |
| 1744 | + cloud_function_vpc_connector_egress_settings=cloud_function_vpc_connector_egress_settings, |
1735 | 1745 | cloud_function_memory_mib=cloud_function_memory_mib, |
1736 | 1746 | cloud_function_ingress_settings=cloud_function_ingress_settings, |
1737 | 1747 | cloud_build_service_account=cloud_build_service_account, |
|
0 commit comments