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

Commit 0056aa2

Browse files
committed
incorporate suggestions
1 parent defd6aa commit 0056aa2

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

google/cloud/spanner_v1/_helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ def _retry(
624624
if is_allowed and retries < retry_count:
625625
if (
626626
allowed_exceptions is not None
627-
and exc.__class__ in allowed_exceptions
628627
and allowed_exceptions[exc.__class__] is not None
629628
):
630629
allowed_exceptions[exc.__class__](exc)

google/cloud/spanner_v1/request_id_header.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ def with_request_id(
5252
def with_request_id_metadata_only(
5353
client_id, channel_id, nth_request, attempt, other_metadata=[], span=None
5454
):
55-
req_id = build_request_id(client_id, channel_id, nth_request, attempt)
56-
all_metadata = (other_metadata or []).copy()
57-
all_metadata.append((REQ_ID_HEADER_KEY, req_id))
58-
59-
if span:
60-
span.set_attribute(X_GOOG_SPANNER_REQUEST_ID_SPAN_ATTR, req_id)
61-
55+
"""Return metadata with request ID header, discarding the request ID value."""
56+
all_metadata, _ = with_request_id(
57+
client_id, channel_id, nth_request, attempt, other_metadata, span
58+
)
6259
return all_metadata
6360

6461

0 commit comments

Comments
 (0)