Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit e2de96b

Browse files
fix test issues
1 parent 33f5727 commit e2de96b

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

bigframes/functions/_function_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def provision_bq_remote_function(
586586
cloud_function_vpc_connector_egress_settings: str | None,
587587
cloud_function_memory_mib: int | None,
588588
cloud_function_cpus: float | None,
589-
cloud_function_ingress_settings: str | None,
589+
cloud_function_ingress_settings: str,
590590
):
591591
"""Provision a BigQuery remote function."""
592592
# Augment user package requirements with any internal package
@@ -620,7 +620,7 @@ def provision_bq_remote_function(
620620
or "private-ranges-only",
621621
memory_mib=cloud_function_memory_mib,
622622
cpus=cloud_function_cpus,
623-
ingress_settings=cloud_function_ingress_settings or "internal_only",
623+
ingress_settings=cloud_function_ingress_settings,
624624
workers=workers,
625625
threads=threads,
626626
concurrency=concurrency,

bigframes/functions/udf_def.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ def bf_type(self) -> bigframes.dtypes.Dtype:
113113
@property
114114
def sql_type(self) -> str:
115115
sdk_type = function_typing.sdk_type_from_python_type(self._py_type)
116-
assert sdk_type.type_kind is not None
117-
return sdk_type.type_kind.name
116+
return function_typing.sdk_type_to_sql_string(sdk_type)
118117

119118
def stable_hash(self) -> bytes:
120119
hash_val = hashlib.md5()
@@ -229,13 +228,15 @@ def to_sql_input_signature(self) -> str:
229228
)
230229

231230
@property
232-
def protocol_metadata(self) -> str:
231+
def protocol_metadata(self) -> str | None:
233232
import bigframes.functions._utils
234233

235234
# TODO: The output field itself should handle this, to handle protocol versioning.
236-
return bigframes.functions._utils.get_bigframes_metadata(
237-
python_output_type=self.output.py_type
238-
)
235+
if isinstance(self.output, VirtualListTypeV1):
236+
return bigframes.functions._utils.get_bigframes_metadata(
237+
python_output_type=self.output.py_type
238+
)
239+
return None
239240

240241
@property
241242
def is_virtual(self) -> bool:

tests/system/large/ml/test_ensemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_xgbclassifier_default_params(penguins_df_default_index, dataset_id):
155155
)
156156

157157

158-
# @pytest.mark.flaky(retries=2)
158+
@pytest.mark.flaky(retries=2)
159159
def test_xgbclassifier_dart_booster_multiple_params(
160160
penguins_df_default_index, dataset_id
161161
):

tests/system/large/ml/test_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_create_load_gemini_text_generator_model(
6363
"gemini-2.5-flash-lite",
6464
),
6565
)
66-
# @pytest.mark.flaky(retries=2)
66+
@pytest.mark.flaky(retries=2)
6767
def test_gemini_text_generator_predict_default_params_success(
6868
llm_text_df, model_name, session, bq_connection
6969
):

tests/system/small/functions/test_remote_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_bq_connection_id_path_format(connection_id_dot_format):
106106
return f"projects/{fields[0]}/locations/{fields[1]}/connections/{fields[2]}"
107107

108108

109-
# @pytest.mark.flaky(retries=2, delay=120)
109+
@pytest.mark.flaky(retries=2, delay=120)
110110
def test_remote_function_direct_no_session_param(
111111
bigquery_client,
112112
bigqueryconnection_client,

0 commit comments

Comments
 (0)