Skip to content

[WIP] Update gapic v1.38 - #18082

Draft
hebaalazzeh wants to merge 42 commits into
mainfrom
update-gapic-v1.38
Draft

[WIP] Update gapic v1.38#18082
hebaalazzeh wants to merge 42 commits into
mainfrom
update-gapic-v1.38

Conversation

@hebaalazzeh

Copy link
Copy Markdown
Contributor

WIP

@hebaalazzeh hebaalazzeh self-assigned this Aug 12, 2026

@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 refactors the REST transport layer across the google-cloud-build and google-cloud-iam packages by centralizing request transcoding logic into new _compat.py modules. It removes legacy version check logic and redundant _get_unset_required_fields methods, replacing them with a centralized transcode_request function. Additionally, it updates dependency constraints and adds a disable_mtls_env fixture to unit tests. The reviewer identified two issues in the new _compat.py files where dictionary-like access was incorrectly used on a NamedTuple returned by path_template.transcode, and provided code suggestions to use attribute access instead.

Comment on lines +198 to +200
if transcoded_request.get("body") is not None:
body_json = json_format.MessageToJson(
transcoded_request["body"],

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.

high

The transcoded_request object returned by path_template.transcode is a NamedTuple (TranscodedRequest), which does not support dictionary-like .get() access or string-based indexing (e.g., transcoded_request["body"]). Attempting to use .get() will raise an AttributeError, and string indexing will raise a TypeError. Please use attribute access instead (e.g., transcoded_request.body and transcoded_request.query_params).

Suggested change
if transcoded_request.get("body") is not None:
body_json = json_format.MessageToJson(
transcoded_request["body"],
if transcoded_request.body is not None:
body_json = json_format.MessageToJson(
transcoded_request.body,

Comment on lines +204 to +208
query_params_json = {}
if transcoded_request.get("query_params") is not None:
query_params_json = json.loads(
json_format.MessageToJson(
transcoded_request["query_params"],

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.

high

The transcoded_request object returned by path_template.transcode is a NamedTuple (TranscodedRequest), which does not support dictionary-like .get() access or string-based indexing (e.g., transcoded_request["query_params"]). Attempting to use .get() will raise an AttributeError, and string indexing will raise a TypeError. Please use attribute access instead (e.g., transcoded_request.query_params).

Suggested change
query_params_json = {}
if transcoded_request.get("query_params") is not None:
query_params_json = json.loads(
json_format.MessageToJson(
transcoded_request["query_params"],
query_params_json = {}
if transcoded_request.query_params is not None:
query_params_json = json.loads(
json_format.MessageToJson(
transcoded_request.query_params,

@hebaalazzeh
hebaalazzeh force-pushed the update-gapic-v1.38 branch 2 times, most recently from 88026bb to 4ede4ac Compare August 12, 2026 01:45
@hebaalazzeh
hebaalazzeh force-pushed the update-gapic-v1.38 branch 6 times, most recently from a4de440 to 3bc95a7 Compare August 12, 2026 07:35
@hebaalazzeh
hebaalazzeh force-pushed the update-gapic-v1.38 branch 2 times, most recently from c1dc426 to 5305d4f Compare August 12, 2026 20:37
hebaalazzeh and others added 23 commits August 12, 2026 20:56
…#18070)

Emits a deprecation `FutureWarning` when `google.auth.transport.grpc` is
imported with `grpcio < 1.83.0`.
In October 2026, Google Cloud client libraries (including `google-auth`)
will raise minimum requirements to enforce `grpcio >= 1.83.0` for
Post-Quantum Cryptography (PQC) support.

Towards: b/537446703
Fixes an issue where API method calls on DataFrame and Series objects
were recorded into global state instead of their specific session,
preventing cross-session and cross-test logging interference.

- Updated `log_adapter._find_session` to detect active sessions directly
from DataFrame and Series instances.
- Added recursion safeguards during session property lookup in
`log_adapter`.


Fixes #<545233537> 🦕

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Adds `check_python_version(__name__)` and
`check_dependency_versions(__name__)` to `google.cloud.bigquery` and
`google.cloud.ndb` at package import time.
This establishes parity with the standard GAPIC-generated packages
across the repository and ensures deprecation notices (such as Python
version deprecations and upcoming `grpcio >= 1.83.0` PQC requirements)
are consistently emitted when these packages are imported.

Towards: b/537446703
Made some adjustments to the client side metrics system after comparing
against node and java implemenations (with gemini)

The diffs for each commit can be looked it in isolation

1
([64acfa1)](64acfa1):
throttling_latencies is now recorded once per operation
- java records grpc time as part of throttling latencies. Python just
tracks flow-control time
- flow control happens once at the start of an operation: once the
mutations have made it past the flow control gate, retries don't have to
wait again, they have space reserved until they reach a terminal state
- Python was previously recording throttling_latencieson each attempt,
but recording the same per-operation value on each attempt. This would
give misleading data
  - Now, we only record it once per operation

2
[(c2c8daa)](c2c8daa):
removing backoff time from application blocking latencies
- previously, python was including time spent backing off between
attempts as part of the application_latencies metric
- other languages do not include this, so we can drop it from Python as
well
The diff logic in the new[ unit test sharding
system](https://github.com/googleapis/google-cloud-python/pulls?q=is%3Apr+is%3Aclosed+author%3Adaniel-sanche)
had an issue: when comparing against main to find the modified packages,
any packages that changed on main would be treated as packages that
changed in the PR

This could especially cause issues if a commit was added while a
workflow was running, because the changed package list would shift
mid-run

This PR fixes the issue by:
- Uses `...` and a depth of 200 to find the common ancestor commit to
diff against, instead of diffing against main directly
- To avoid repeated large fetches, calculates the package list once and
passes the list of modified packages through the workflow

---------

Co-authored-by: Shuowei Li <shuowei@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop*
---


##
[2.48.0](bigframes-v2.47.0...bigframes-v2.48.0)
(2026-08-12)


### Features

* **bigframes:** Transpiler supports more string ops
([#17693](#17693))
([7d2bc21](7d2bc21))


### Bug Fixes

* **bigframes:** fix field name typos for ai.generate* functions
([#17983](#17983))
([1b5c48b](1b5c48b))
* **bigframes:** resolve session-scoped API method logging
([#18076](#18076))
([ace618b](ace618b))
* **bigframes:** update GeminiTextGenerator default model to
gemini-2.5-flash
([#18060](#18060))
([5770ff6](5770ff6))
* bump @angular/compiler, @angular/common, @angular/core,
@angular/forms, @angular/platform-browser, @angular/router and
@angular/compiler-cli in
/packages/bigframes/bigframes/display/table_widget_angular
([#17992](#17992))
([346aaab](346aaab))
* bump fast-uri from 3.1.4 to 3.1.5 in
/packages/bigframes/bigframes/display/table_widget_angular
([#17989](#17989))
([3b3f3f4](3b3f3f4))
* bump hono from 4.12.31 to 4.13.1 in
/packages/bigframes/bigframes/display/table_widget_angular
([#18032](#18032))
([cddf35b](cddf35b))
* bump ip-address and express-rate-limit in
/packages/bigframes/bigframes/display/table_widget_angular
([#17985](#17985))
([02ed656](02ed656))
* bump undici and @angular/build in
/packages/bigframes/bigframes/display/table_widget_angular
([#17986](#17986))
([6938061](6938061))
* bump undici from 7.25.0 to 7.29.0 in /packages/bigframes/tests/js
([#17987](#17987))
([65a3571](65a3571))

---
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>
)

split_pdf builds each output filename from entity.type_, which is read
straight from the parsed Document (loaded via from_gcs or
from_document_path). Document AI entity types can contain "/" (the
fixtures already carry "vat/tax_amount"), and a document whose type_ is
set to something like ../../../../tmp/pwned makes
os.path.join(output_path, output_filename) write the split PDF outside
output_path. The entity type is now flattened before it goes into the
filename, so the write stays inside output_path.

- [ ] Make sure to open an issue as a
[bug/issue](https://github.com/googleapis/google-cloud-python/issues)
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Adds `pandas-gbq>=0.35.1` and `pyarrow>=3.0.0` to the `pandas` optional
extra in `google-cloud-bigquery-storage`, while keeping `pyarrow` extra
lightweight without pandas dependencies.

### Details
- Updates `extras["pandas"]` in setup.py to include `pyarrow>=3.0.0` and
`pandas-gbq>=0.35.1`.
- Keeps `extras["pyarrow"]` as `pyarrow>=3.0.0` only so pure
Arrow/Polars/DuckDB workflows avoid pulling in `pandas` and `numpy`.

Fixes #<526614511> 🦕

---------

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…ero_values (#18089)

`test_zero_values` is failing in newer environments because `proto-plus`
now wraps underlying `TypeErrors` in a more descriptive error message
`(e.g., "Failed to set field...")` following #17682. This broke our
rigid assertion which was looking for the exact raw tuple representation
`('bad argument type for built-in operation',)`.

This PR updates the assertion to look for the core error substring
instead, making the test robust to exception wrapping.
…18099)

Updates the client post-processing configuration for
`google-cloud-bigquery-storage` in
`.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml`
to ensure code generation produces zero diff.
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.

6 participants