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.unit.test_reader_v1: test_to_dataframe_by_page failed #683

Closed
flaky-bot bot opened this issue Oct 4, 2023 · 2 comments
Closed

tests.unit.test_reader_v1: test_to_dataframe_by_page failed #683

flaky-bot bot opened this issue Oct 4, 2023 · 2 comments
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage 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 Oct 4, 2023

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: cbde9a6
buildURL: Build Status, Sponge
status: failed

Test output
class_under_test = 
mock_gapic_client = 
def test_to_dataframe_by_page(class_under_test, mock_gapic_client):
    bq_columns = [
        {"name": "int_col", "type": "int64"},
        {"name": "bool_col", "type": "bool"},
    ]
    avro_schema = _bq_to_avro_schema(bq_columns)
    block_1 = [{"int_col": 123, "bool_col": True}, {"int_col": 234, "bool_col": False}]
    block_2 = [{"int_col": 345, "bool_col": True}, {"int_col": 456, "bool_col": False}]
    block_3 = [{"int_col": 567, "bool_col": True}, {"int_col": 789, "bool_col": False}]
    block_4 = [{"int_col": 890, "bool_col": True}]
    # Break blocks into two groups to test that iteration continues across
    # reconnection.
    bq_blocks_1 = [block_1, block_2]
    bq_blocks_2 = [block_3, block_4]
    avro_blocks_1 = _bq_to_avro_blocks(bq_blocks_1, avro_schema)
    avro_blocks_2 = _bq_to_avro_blocks(bq_blocks_2, avro_schema)

    mock_gapic_client.read_rows.side_effect = (
        _pages_w_unavailable(avro_blocks_1),
        avro_blocks_2,
    )

    reader = class_under_test(
        mock_gapic_client,
        "teststream",
        0,
        {"metadata": {"test-key": "test-value"}},
    )
    got = reader.rows()
    pages = iter(got.pages)

    page_1 = next(pages)
    pandas.testing.assert_frame_equal(
      page_1.to_dataframe().reset_index(drop=True),
        pandas.DataFrame(block_1, columns=["int_col", "bool_col"]).reset_index(
            drop=True
        ),
    )

tests/unit/test_reader_v1.py:596:


google/cloud/bigquery_storage_v1/reader.py:556: in to_dataframe
return self._stream_parser.to_dataframe(self._message, dtypes=dtypes)
google/cloud/bigquery_storage_v1/reader.py:670: in to_dataframe
for row in self.to_rows(message):
google/cloud/bigquery_storage_v1/reader.py:714: in to_rows
yield fastavro.schemaless_reader(messageio, self._fastavro_schema)
fastavro/_read.pyx:1126: in fastavro._read.schemaless_reader
???
fastavro/_read.pyx:1153: in fastavro._read.schemaless_reader
???
fastavro/_read.pyx:743: in fastavro._read._read_data
???
fastavro/_read.pyx:616: in fastavro._read.read_record
???
fastavro/_read.pyx:735: in fastavro._read._read_data
???
fastavro/_read.pyx:526: in fastavro._read.read_union
???


???
E EOFError

fastavro/_read.pyx:176: EOFError

@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 Oct 4, 2023
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. label Oct 4, 2023
@flaky-bot
Copy link
Author

flaky-bot bot commented Oct 5, 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 (cbde9a6), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Oct 5, 2023
@Linchin
Copy link
Contributor

Linchin commented Oct 5, 2023

closed by #687

@Linchin Linchin closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage 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