Skip to content

fix(bigquery): default query results polling timeout - #18887

Open
huong8373tt-beep wants to merge 1 commit into
googleapis:mainfrom
huong8373tt-beep:fix/bigquery-query-results-timeout-18857
Open

huong8373tt-beep wants to merge 1 commit into
googleapis:mainfrom
huong8373tt-beep:fix/bigquery-query-results-timeout-18857

Conversation

@huong8373tt-beep

Copy link
Copy Markdown

Summary

  • apply the existing DEFAULT_GET_JOB_TIMEOUT to default jobs.getQueryResults polling requests from QueryJob.result()
  • preserve explicitly supplied numeric timeouts and the intentional unbounded timeout=None behavior
  • cover default and explicit-None transport timeout selection, and update affected polling expectations

Fixes #18857.

Testing

  • .venv\Scripts\python.exe -m pytest tests/unit/job/test_query.py -q (64 passed)
  • black --check google\cloud\bigquery\job\query.py tests\unit\job\test_query.py
  • git diff --check
  • .venv\Scripts\python.exe -m compileall -q google tests\unit\job\test_query.py

Disclosure

Slai Agent Runtime assisted with the investigation, implementation, and testing of this contribution. The account owner authorized the submitted changes and is responsible for the submission.

@huong8373tt-beep
huong8373tt-beep requested review from a team as code owners October 28, 2026 19:51
@huong8373tt-beep
huong8373tt-beep requested review from tswast and removed request for a team October 28, 2026 19:51

@gemini-code-assist gemini-code-assist Bot 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 updates the default timeout behavior in _reload_query_results within the BigQuery query job module. Specifically, the default timeout parameter is changed from None to POLLING_DEFAULT_VALUE. When the timeout is set to this default, the method falls back to the transport timeout, and if that is not set, it now defaults to DEFAULT_GET_JOB_TIMEOUT instead of None. Unit tests have been added and updated to reflect these changes. There are no review comments, so I have no feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to 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.

bigquery: QueryJob.result() waits forever if a jobs.getQueryResults response is lost (no default request timeout)

1 participant