From d7397971ea4a89ed7f802b36be8ec55d76b97dc1 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Mon, 11 Nov 2024 16:43:17 -0800 Subject: [PATCH] fixed merge error --- google/cloud/bigtable/data/_async/_mutate_rows.py | 10 ++-------- tests/unit/data/_async/test__mutate_rows.py | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/google/cloud/bigtable/data/_async/_mutate_rows.py b/google/cloud/bigtable/data/_async/_mutate_rows.py index f9baf3a5d..3abb9d75c 100644 --- a/google/cloud/bigtable/data/_async/_mutate_rows.py +++ b/google/cloud/bigtable/data/_async/_mutate_rows.py @@ -16,7 +16,6 @@ from typing import Sequence, TYPE_CHECKING from dataclasses import dataclass -import functools from google.api_core import exceptions as core_exceptions from google.api_core import retry as retries @@ -82,14 +81,8 @@ def __init__( f"{_MUTATE_ROWS_REQUEST_MUTATION_LIMIT} mutations across " f"all entries. Found {total_mutations}." ) - # create partial function to pass to trigger rpc call self._table = table - self._gapic_fn = functools.partial( - gapic_client.mutate_rows, - table_name=table.table_name, - app_profile_id=table.app_profile_id, - retry=None, - ) + self._gapic_fn = gapic_client.mutate_rows # create predicate for determining which errors are retryable self.is_retryable = retries.if_exception_type( # RPC level errors @@ -177,6 +170,7 @@ async def _run_attempt(self): app_profile_id=self._table.app_profile_id, ), timeout=next(self.timeout_generator), + retry=None ) async for result_list in result_generator: for result in result_list.entries: diff --git a/tests/unit/data/_async/test__mutate_rows.py b/tests/unit/data/_async/test__mutate_rows.py index 2f6e2190e..f68d5b086 100644 --- a/tests/unit/data/_async/test__mutate_rows.py +++ b/tests/unit/data/_async/test__mutate_rows.py @@ -104,10 +104,6 @@ def test_ctor(self): assert client.mutate_rows.call_count == 0 instance._gapic_fn() assert client.mutate_rows.call_count == 1 - # gapic_fn should call with table details - inner_kwargs = client.mutate_rows.call_args[1] - assert len(inner_kwargs) == 3 - assert inner_kwargs["retry"] is None # entries should be passed down entries_w_pb = [_EntryWithProto(e, e._to_pb()) for e in entries] assert instance.mutations == entries_w_pb