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

tests.system.test_session_api: test_transaction_execute_update_read_commit failed #959

Closed

Description

@flaky-bot

Note: #887 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 72a56ac
buildURL: Build Status, Sponge
status: failed

Test output
args = (session: "projects/precise-truck-742/instances/google-cloud-1686719223739/databases/test_sessions_1686719440099/sessi..._name, email) VALUES (3, \'Wylma\', \'Phlyntstone\', \'wylma@example.com\')"
params {
}
seqno: 2
request_options {
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1686719223739/databa...DV3qg3kq86kchg'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.56.0rc2 gax/2.11.1rc1 gccl/3.36.0')], 'timeout': 30.0}
@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
      return callable_(*args, **kwargs)

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:72:


self = <grpc._channel._UnaryUnaryMultiCallable object at 0x7f16046f6c40>
request = session: "projects/precise-truck-742/instances/google-cloud-1686719223739/databases/test_sessions_1686719440099/sessio...st_name, email) VALUES (3, 'Wylma', 'Phlyntstone', 'wylma@example.com')"
params {
}
seqno: 2
request_options {
}

timeout = 30.0
metadata = [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1686719223739/databases/test_sess...VNww_xM0Hk6JQGJBGUDV3qg3kq86kchg'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.56.0rc2 gax/2.11.1rc1 gccl/3.36.0')]
credentials = None, wait_for_ready = None, compression = None

def __call__(self,
             request: Any,
             timeout: Optional[float] = None,
             metadata: Optional[MetadataType] = None,
             credentials: Optional[grpc.CallCredentials] = None,
             wait_for_ready: Optional[bool] = None,
             compression: Optional[grpc.Compression] = None) -> Any:
    state, call, = self._blocking(request, timeout, metadata, credentials,
                                  wait_for_ready, compression)
  return _end_unary_response_blocking(state, call, False, None)

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/grpc/_channel.py:1030:


state = <grpc._channel._RPCState object at 0x7f1604592550>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f1604590800>
with_call = False, deadline = None

def _end_unary_response_blocking(
    state: _RPCState, call: cygrpc.SegregatedCall, with_call: bool,
    deadline: Optional[float]
) -> Union[ResponseType, Tuple[ResponseType, grpc.Call]]:
    if state.code is grpc.StatusCode.OK:
        if with_call:
            rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
            return state.response, rendezvous
        else:
            return state.response
    else:
      raise _InactiveRpcError(state)  # pytype: disable=not-instantiable

E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.ABORTED
E details = "Transaction was aborted."
E debug_error_string = "UNKNOWN:Error received from peer ipv4:108.177.98.95:443 {grpc_message:"Transaction was aborted.", grpc_status:10, created_time:"2023-06-14T05:11:20.930862999+00:00"}"
E >

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/grpc/_channel.py:910: _InactiveRpcError

The above exception was the direct cause of the following exception:

sessions_database = <google.cloud.spanner_v1.database.Database object at 0x7f16045badf0>
sessions_to_delete = [<google.cloud.spanner_v1.session.Session object at 0x7f160458ab20>]

@_helpers.retry_mabye_conflict
def test_transaction_execute_update_read_commit(sessions_database, sessions_to_delete):
    # [START spanner_test_dml_read_your_writes]
    sd = _sample_data

    session = sessions_database.session()
    session.create()
    sessions_to_delete.append(session)

    with session.batch() as batch:
        batch.delete(sd.TABLE, sd.ALL)

    with session.transaction() as transaction:
        rows = list(transaction.read(sd.TABLE, sd.COLUMNS, sd.ALL))
        assert rows == []

        for insert_statement in _generate_insert_statements():
          row_count = transaction.execute_update(insert_statement)

tests/system/test_session_api.py:742:


google/cloud/spanner_v1/transaction.py:399: in execute_update
response = self._execute_request(
google/cloud/spanner_v1/transaction.py:109: in _execute_request
response = _retry(
google/cloud/spanner_v1/_helpers.py:334: in _retry
raise exc
google/cloud/spanner_v1/_helpers.py:320: in _retry
return func()
google/cloud/spanner_v1/services/spanner/client.py:1112: in execute_sql
response = rpc(
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py:113: in call
return wrapped_func(*args, **kwargs)
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/retry.py:349: in retry_wrapped_func
return retry_target(
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/retry.py:191: in retry_target
return target()
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/timeout.py:120: in func_with_timeout
return func(*args, **kwargs)


args = (session: "projects/precise-truck-742/instances/google-cloud-1686719223739/databases/test_sessions_1686719440099/sessi..._name, email) VALUES (3, 'Wylma', 'Phlyntstone', 'wylma@example.com')"
params {
}
seqno: 2
request_options {
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1686719223739/databa...DV3qg3kq86kchg'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.56.0rc2 gax/2.11.1rc1 gccl/3.36.0')], 'timeout': 30.0}

@functools.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
    try:
        return callable_(*args, **kwargs)
    except grpc.RpcError as exc:
      raise exceptions.from_grpc_error(exc) from exc

E google.api_core.exceptions.Aborted: 409 Transaction was aborted.

.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/grpc_helpers.py:74: Aborted

Activity

  1. added
    flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Jun 14, 2023
  2. added
    flakybot: flakyTells the Flaky Bot not to close or comment on this issue.
    on Jun 14, 2023
  3. flaky-bot commented on Jun 14, 2023

    @flaky-bot
    Author

    Looks like this issue is flaky. 😟

    I'm going to leave this open and stop commenting.

    A human should fix and close this.


    When run at the same commit (72a56ac), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions