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

Commit 04ec723

Browse files
committed
chore: make precommit token check emulator-proof
1 parent ffa5c9e commit 04ec723

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/integration-tests-against-emulator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
services:
1212
emulator:
13-
image: gcr.io/cloud-spanner-emulator/emulator:1.5.37
13+
image: gcr.io/cloud-spanner-emulator/emulator
1414
ports:
1515
- 9010:9010
1616
- 9020:9020

google/cloud/spanner_v1/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def before_next_retry(nth_retry, delay_in_seconds):
328328
# successfully commit, and must be retried with the new precommit token.
329329
# The mutations should not be included in the new request, and no further
330330
# retries or exception handling should be performed.
331-
if commit_response_pb.precommit_token:
331+
if commit_response_pb._pb.HasField("precommit_token"):
332332
add_span_event(span, commit_retry_event_name)
333333
commit_response_pb = api.commit(
334334
request=CommitRequest(

0 commit comments

Comments
 (0)