Skip to content

fix: handle empty endpoints during cloud function reuse - #17501

Merged
shuoweil merged 3 commits into
mainfrom
shuowei-disable-remote-function-test-temp
Jun 18, 2026
Merged

fix: handle empty endpoints during cloud function reuse#17501
shuoweil merged 3 commits into
mainfrom
shuowei-disable-remote-function-test-temp

Conversation

@shuoweil

@shuoweilshuoweil commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes an issue where reusing recently created Cloud Functions during Remote Function creation would sometimes result in an empty endpoint (endpoint="").

When a Cloud Function has been recently provisioned, its endpoint URI (response.service_config.uri) may occasionally be returned as an empty string if URL propagation is still pending. The remote function decorator previously only checked for None, proceeding to create the BigQuery Remote Function with OPTIONS(endpoint=''), which leads to validation failures when queries invoke the function.

This PR changes the check to if not cf_endpoint: to handle both None and empty strings. If the endpoint is empty, it will route to create_cloud_function, which catches the AlreadyExists exception and safely retries/waits for the endpoint URI propagation to complete.

Fixes #<525124882> 🦕

@shuoweilshuoweil self-assigned this Jun 17, 2026
@shuoweil
shuoweil requested review from a team as code ownersJune 17, 2026 22:01

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request skips the test_remote_function_connection_w_location system test due to a connection failure tracked under issue b/525124882. There are no review comments, and I have no feedback to provide.

@shuoweil
shuoweil enabled auto-merge (squash) June 17, 2026 22:07
@shuoweilshuoweil added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 17, 2026
@shuoweil
shuoweil disabled auto-merge June 17, 2026 22:33
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 17, 2026
@shuoweilshuoweil changed the title tests: skip test_remote_function_connection_w_locationfix: handle empty endpoints during cloud function reuseJun 17, 2026
@shuoweil
shuoweil merged commit 4f5593a into mainJun 18, 2026
31 checks passed
@shuoweil
shuoweil deleted the shuowei-disable-remote-function-test-temp branch June 18, 2026 01:05
chalmerlowe pushed a commit that referenced this pull request Jun 25, 2026
Fixes an issue where reusing recently created Cloud Functions during
Remote Function creation would sometimes result in an empty endpoint
(`endpoint=""`).
When a Cloud Function has been recently provisioned, its endpoint URI
(`response.service_config.uri`) may occasionally be returned as an empty
string if URL propagation is still pending. The remote function
decorator previously only checked for `None`, proceeding to create the
BigQuery Remote Function with `OPTIONS(endpoint='')`, which leads to
validation failures when queries invoke the function.
This PR changes the check to `if not cf_endpoint:` to handle both `None`
and empty strings. If the endpoint is empty, it will route to
`create_cloud_function`, which catches the `AlreadyExists` exception and
safely retries/waits for the endpoint URI propagation to complete.
Fixes #<525124882> 🦕
shuoweil pushed a commit that referenced this pull request Jun 25, 2026
🤖 I have created a release *beep* *boop*
---
##
[2.44.0](bigframes-v2.43.0...bigframes-v2.44.0)
(2026-06-25)
### Features
* add date functions to `bigframes.bigquery` module
([#17514](#17514))
([e5d2e35](e5d2e35))
* **bigframes:** add AI TVFs to the pandas bq accessor
([#17402](#17402))
([ee74e31](ee74e31))
* Experimental transpilation of unannotated python callables
([#17419](#17419))
([ea9aad9](ea9aad9))
* support gemini-3.x models in loader and update default model to
gemini-3.5-flash
([#17557](#17557))
([3619b29](3619b29))
* support interactive execution of deferred DataFrames in TableWidget
([#17486](#17486))
([421eebd](421eebd))
### Bug Fixes
* avoid invalid CAST(NULL AS NULL) in SQLGlot compiler
([#17487](#17487))
([3b79caa](3b79caa))
* **bigframes:** world-readable temp zip in create_cloud_function
([#17522](#17522))
([e726878](e726878))
* bump @angular/common, @angular/forms, @angular/platform-browser and
@angular/router in
/packages/bigframes/bigframes/display/table_widget_angular
([#17525](#17525))
([2f893b1](2f893b1))
* bump langsmith from 0.8.0 to 0.8.18 in /packages/bigframes
([#17518](#17518))
([f23063f](f23063f))
* bump msgpack from 1.1.1 to 1.2.1 in /packages/bigframes
([#17520](#17520))
([36b5b7e](36b5b7e))
* bump undici and @angular/build in
/packages/bigframes/bigframes/display/table_widget_angular
([#17519](#17519))
([6fc45e3](6fc45e3))
* handle empty endpoints during cloud function reuse
([#17501](#17501))
([4f5593a](4f5593a))
### Documentation
* ensure that PlotAccessor is included in the API reference
([#17513](#17513))
([6febabf](6febabf))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
copybara-serviceBot pushed a commit to google/bigframes that referenced this pull request Aug 12, 2026
🤖 I have created a release *beep* *boop*
---
##
[2.44.0](googleapis/google-cloud-python@bigframes-v2.43.0...bigframes-v2.44.0)
(2026-06-25)
### Features
* add date functions to `bigframes.bigquery` module
([#17514](googleapis/google-cloud-python#17514))
([e5d2e35](googleapis/google-cloud-python@e5d2e35))
* **bigframes:** add AI TVFs to the pandas bq accessor
([#17402](googleapis/google-cloud-python#17402))
([ee74e31](googleapis/google-cloud-python@ee74e31))
* Experimental transpilation of unannotated python callables
([#17419](googleapis/google-cloud-python#17419))
([ea9aad9](googleapis/google-cloud-python@ea9aad9))
* support gemini-3.x models in loader and update default model to
gemini-3.5-flash
([#17557](googleapis/google-cloud-python#17557))
([3619b29](googleapis/google-cloud-python@3619b29))
* support interactive execution of deferred DataFrames in TableWidget
([#17486](googleapis/google-cloud-python#17486))
([421eebd](googleapis/google-cloud-python@421eebd))
### Bug Fixes
* avoid invalid CAST(NULL AS NULL) in SQLGlot compiler
([#17487](googleapis/google-cloud-python#17487))
([3b79caa](googleapis/google-cloud-python@3b79caa))
* **bigframes:** world-readable temp zip in create_cloud_function
([#17522](googleapis/google-cloud-python#17522))
([e726878](googleapis/google-cloud-python@e726878))
* bump @angular/common, @angular/forms, @angular/platform-browser and
@angular/router in
/packages/bigframes/bigframes/display/table_widget_angular
([#17525](googleapis/google-cloud-python#17525))
([2f893b1](googleapis/google-cloud-python@2f893b1))
* bump langsmith from 0.8.0 to 0.8.18 in /packages/bigframes
([#17518](googleapis/google-cloud-python#17518))
([f23063f](googleapis/google-cloud-python@f23063f))
* bump msgpack from 1.1.1 to 1.2.1 in /packages/bigframes
([#17520](googleapis/google-cloud-python#17520))
([36b5b7e](googleapis/google-cloud-python@36b5b7e))
* bump undici and @angular/build in
/packages/bigframes/bigframes/display/table_widget_angular
([#17519](googleapis/google-cloud-python#17519))
([6fc45e3](googleapis/google-cloud-python@6fc45e3))
* handle empty endpoints during cloud function reuse
([#17501](googleapis/google-cloud-python#17501))
([4f5593a](googleapis/google-cloud-python@4f5593a))
### Documentation
* ensure that PlotAccessor is included in the API reference
([#17513](googleapis/google-cloud-python#17513))
([6febabf](googleapis/google-cloud-python@6febabf))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
GitOrigin-RevId: b9692a1500fbfe8e301e48126737336eb9814d96
Change-Id: Ida3b2ee1d56338edb4458761ad675f600531e6c2
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@shuoweil@sycai@yoshi-kokoro