Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests.system.test_session_api: test_transaction_execute_update_read_commit failed #999

Closed
flaky-bot bot opened this issue Aug 10, 2023 · 1 comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Aug 10, 2023

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

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 10, 2023
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Aug 10, 2023
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Aug 10, 2023
@flaky-bot
Copy link
Author

flaky-bot bot commented Aug 10, 2023

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
Labels
api: spanner Issues related to the googleapis/python-spanner API. flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant