feat: Add ExternalRuntimeOptions to BigQuery routine#2311
Conversation
This change introduces the `ExternalRuntimeOptions` class to the `google.cloud.bigquery.routine` module, allowing users to configure runtime options for external routines. Key changes: - Created the `ExternalRuntimeOptions` class with setters and getters for `container_memory`, `container_cpu`, `runtime_connection`, `max_batching_rows`, and `runtime_version`. - Updated the `Routine` class to include an `external_runtime_options` property that accepts an `ExternalRuntimeOptions` object. - Added comprehensive unit tests for the new class and its integration with the `Routine` class, including tests for both valid and invalid input values.
This change introduces the `ExternalRuntimeOptions` class to the `google.cloud.bigquery.routine` module, allowing users to configure runtime options for external routines. Key changes: - Created the `ExternalRuntimeOptions` class with setters and getters for `container_memory`, `container_cpu`, `runtime_connection`, `max_batching_rows`, and `runtime_version`. - Updated the `Routine` class to include an `external_runtime_options` property that accepts an `ExternalRuntimeOptions` object. - Added comprehensive unit tests for the new class and its integration with the `Routine` class, including tests for both valid and invalid input values.
|
Jules: We lack some coverage via unit tests. |
I have added new unit tests to cover the missing lines of code. The test suite now passes with 100% coverage for the new functionality. |
This change introduces the `ExternalRuntimeOptions` class to the `google.cloud.bigquery.routine` module, allowing users to configure runtime options for external routines. Key changes: - Created the `ExternalRuntimeOptions` class with setters and getters for `container_memory`, `container_cpu`, `runtime_connection`, `max_batching_rows`, and `runtime_version`. - Updated the `Routine` class to include an `external_runtime_options` property that accepts an `ExternalRuntimeOptions` object. - Added comprehensive unit tests for the new class and its integration with the `Routine` class, including tests for both valid and invalid input values. - Added additional tests to improve code coverage based on feedback.
|
Jules: PyType is making guesses about the types of some objects in the routine.py file. Here are two examples. Any suggestions? |
I have applied the suggested changes to address the type-checking errors. The tests all pass, and the code should now be free of any type-related issues. |
This change introduces the `ExternalRuntimeOptions` class to the `google.cloud.bigquery.routine` module, allowing users to configure runtime options for external routines. Key changes: - Created the `ExternalRuntimeOptions` class with setters and getters for `container_memory`, `container_cpu`, `runtime_connection`, `max_batching_rows`, and `runtime_version`. - Updated the `Routine` class to include an `external_runtime_options` property that accepts an `ExternalRuntimeOptions` object. - Added comprehensive unit tests for the new class and its integration with the `Routine` class, including tests for both valid and invalid input values. - Added additional tests to improve code coverage based on feedback. - Addressed PyType errors by using helper functions for type conversion.
This change introduces the `ExternalRuntimeOptions` class to the `google.cloud.bigquery.routine` module, allowing users to configure runtime options for external routines. Key changes: - Created the `ExternalRuntimeOptions` class with setters and getters for `container_memory`, `container_cpu`, `runtime_connection`, `max_batching_rows`, and `runtime_version`. - Updated the `Routine` class to include an `external_runtime_options` property that accepts an `ExternalRuntimeOptions` object. - Added comprehensive unit tests for the new class and its integration with the `Routine` class, including tests for both valid and invalid input values. - Added additional tests to improve code coverage based on feedback. - Addressed PyType errors by using helper functions for type conversion. - Addressed formatting nits from code review.
| runtime_connection: Optional[str] = None, | ||
| max_batching_rows: Optional[int] = None, | ||
| runtime_version: Optional[str] = None, | ||
| _properties: Optional[Dict] = None, |
There was a problem hiding this comment.
I wonder if this is necessary?
Linchin
left a comment
There was a problem hiding this comment.
Approved with a minor comment
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>google-cloud-bigquery: 3.39.0</summary> ## [3.39.0](v3.38.0...v3.39.0) (2025-12-12) ### Features * adds support for Python runtime 3.14 (#2322) ([6065e14](6065e14c)) * Add ExternalRuntimeOptions to BigQuery routine (#2311) ([fa76e31](fa76e310)) ### Bug Fixes * remove ambiguous error codes from query retries (#2308) ([8bbd3d0](8bbd3d01)) * include `io.Base` in the `PathType` (#2323) ([b11e09c](b11e09cb)) * honor custom `retry` in `job.result()` (#2302) ([e118b02](e118b029)) ### Documentation * remove experimental annotations from GA features (#2303) ([1f1f9d4](1f1f9d41)) </details> Co-authored-by: Daniel Sanche <d.sanche14@gmail.com>

This change introduces the
ExternalRuntimeOptionsclass to thegoogle.cloud.bigquery.routinemodule, allowing users to configureruntime options for external routines.
Key changes:
ExternalRuntimeOptionsclass with setters and getters forcontainer_memory,container_cpu,runtime_connection,max_batching_rows, andruntime_version.Routineclass to include anexternal_runtime_optionsproperty that accepts an
ExternalRuntimeOptionsobject.with the
Routineclass, including tests for both valid and invalidinput values.
Fixes #2240
Replaces PR #2305
PR created automatically by Jules for task 17042493298890483722