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 #999

Closed

Description

@flaky-bot

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


commit: 5d91a28
buildURL: Build Status, Sponge
status: failed

Test output
args = (session: "projects/precise-truck-742/instances/google-cloud-1691643863048/databases/test_sessions_1691644077777/sessi...8ExdWveZCKww9sP6K59fGQqV_Q"
transaction_id: "AH67Lq5fE94ayY0EETbrFr0sAVy6J6VsWYfcjRCxzHTapE2RTA"
request_options {
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1691643863048/databa...K59fGQqV_Q'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.57.0rc1 gax/2.12.0.dev0 gccl/3.40.0')], 'timeout': 3600.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:


.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/grpc/_channel.py:1161: in call
return _end_unary_response_blocking(state, call, False, None)


state = <grpc._channel._RPCState object at 0x7f4a877b76a0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f4a877b9500>
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:74.125.197.95:443 {grpc_message:"Transaction was aborted.", grpc_status:10, created_time:"2023-08-10T05:08:35.45655307+00:00"}"
E >

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

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

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

@_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)
            assert row_count == 1

        # Rows inserted via DML *can* be read before commit.
        during_rows = list(transaction.read(sd.TABLE, sd.COLUMNS, sd.ALL))
      sd._check_rows_data(during_rows)

tests/system/test_session_api.py:747:


google/cloud/spanner_v1/transaction.py:528: in exit
self.commit()
google/cloud/spanner_v1/transaction.py:239: in commit
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:1805: in commit
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:365: in retry_wrapped_func
return retry_func(
.nox/prerelease_deps-3-8-database_dialect-postgresql/lib/python3.8/site-packages/google/api_core/retry.py:192: 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-1691643863048/databases/test_sessions_1691644077777/sessi...8ExdWveZCKww9sP6K59fGQqV_Q"
transaction_id: "AH67Lq5fE94ayY0EETbrFr0sAVy6J6VsWYfcjRCxzHTapE2RTA"
request_options {
}
,)
kwargs = {'metadata': [('google-cloud-resource-prefix', 'projects/precise-truck-742/instances/google-cloud-1691643863048/databa...K59fGQqV_Q'), ('x-goog-api-client', 'gl-python/3.8.13 grpc/1.57.0rc1 gax/2.12.0.dev0 gccl/3.40.0')], 'timeout': 3600.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. [retry_delay {
E nanos: 27868319
E }
E ]

.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 Aug 10, 2023
  2. added
    flakybot: flakyTells the Flaky Bot not to close or comment on this issue.
    on Aug 10, 2023
  3. flaky-bot commented on Aug 10, 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 (5d91a28), 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

No one assigned

    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