From a37c41a2b09899374c988c628a893ebab9eeb530 Mon Sep 17 00:00:00 2001 From: Gary Elliott Date: Thu, 9 Feb 2017 10:21:45 -0500 Subject: [PATCH 1/4] Remove invalid chunk validation Fixes #2980 --- bigtable/google/cloud/bigtable/row_data.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bigtable/google/cloud/bigtable/row_data.py b/bigtable/google/cloud/bigtable/row_data.py index f293c93d3c43..60fc1f0ef1e8 100644 --- a/bigtable/google/cloud/bigtable/row_data.py +++ b/bigtable/google/cloud/bigtable/row_data.py @@ -366,8 +366,6 @@ def _validate_chunk_row_in_progress(self, chunk): """Helper for :meth:`_validate_chunk`""" assert self.state == self.ROW_IN_PROGRESS self._validate_chunk_status(chunk) - if not chunk.HasField('commit_row') and not chunk.reset_row: - _raise_if(not chunk.timestamp_micros or not chunk.value) _raise_if(chunk.row_key and chunk.row_key != self._row.row_key) _raise_if(chunk.HasField('family_name') and From 6a7942d06ae0db1fd357d9605bfe38cb6dd118aa Mon Sep 17 00:00:00 2001 From: Gary Elliott Date: Mon, 13 Feb 2017 15:49:03 -0500 Subject: [PATCH 2/4] remove invalid test case --- bigtable/unit_tests/test_row_data.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/bigtable/unit_tests/test_row_data.py b/bigtable/unit_tests/test_row_data.py index 8a2fb6a7e5e6..b7fd9eec80b9 100644 --- a/bigtable/unit_tests/test_row_data.py +++ b/bigtable/unit_tests/test_row_data.py @@ -416,21 +416,6 @@ def test_invalid_empty_chunk(self): with self.assertRaises(InvalidChunk): prd.consume_next() - def test_invalid_empty_second_chunk(self): - from google.cloud.bigtable.row_data import InvalidChunk - - chunks = _generate_cell_chunks(['', '']) - first = chunks[0] - first.row_key = b'RK' - first.family_name.value = 'A' - first.qualifier.value = b'C' - response = _ReadRowsResponseV2(chunks) - iterator = _MockCancellableIterator(response) - prd = self._make_one(iterator) - with self.assertRaises(InvalidChunk): - prd.consume_next() - - class TestPartialRowsData_JSON_acceptance_tests(unittest.TestCase): _json_tests = None From 32cec25ba243c385a0359cb4e065077e39982bde Mon Sep 17 00:00:00 2001 From: Gary Elliott Date: Mon, 13 Feb 2017 15:59:00 -0500 Subject: [PATCH 3/4] fix spacing --- bigtable/unit_tests/test_row_data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bigtable/unit_tests/test_row_data.py b/bigtable/unit_tests/test_row_data.py index b7fd9eec80b9..7e993bca5d0d 100644 --- a/bigtable/unit_tests/test_row_data.py +++ b/bigtable/unit_tests/test_row_data.py @@ -416,6 +416,7 @@ def test_invalid_empty_chunk(self): with self.assertRaises(InvalidChunk): prd.consume_next() + class TestPartialRowsData_JSON_acceptance_tests(unittest.TestCase): _json_tests = None From 4c59daa1e7112407d6d99e3f5535521a9782202f Mon Sep 17 00:00:00 2001 From: Gary Elliott Date: Tue, 14 Feb 2017 09:54:35 -0500 Subject: [PATCH 4/4] update whitespace --- bigtable/unit_tests/test_row_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigtable/unit_tests/test_row_data.py b/bigtable/unit_tests/test_row_data.py index 7e993bca5d0d..cc90ced67dcc 100644 --- a/bigtable/unit_tests/test_row_data.py +++ b/bigtable/unit_tests/test_row_data.py @@ -416,7 +416,7 @@ def test_invalid_empty_chunk(self): with self.assertRaises(InvalidChunk): prd.consume_next() - + class TestPartialRowsData_JSON_acceptance_tests(unittest.TestCase): _json_tests = None