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_system.TestLogging: test_api_equality_list_logs failed #715

Closed
flaky-bot bot opened this issue Jan 25, 2023 · 1 comment
Closed
Assignees
Labels
api: logging Issues related to the googleapis/python-logging 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: p2 Moderately-important priority. Fix may not be included in 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 Jan 25, 2023

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


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

Test output
self = 
@skip_for_mtls
def test_api_equality_list_logs(self):
    import google.cloud.logging_v2

    # Skip diagnostic log for this system test
    google.cloud.logging_v2._instrumentation_emitted = True

    unique_id = uuid.uuid1()
    gapic_logger = Config.CLIENT.logger(f"api-list-{unique_id}")
    http_logger = Config.HTTP_CLIENT.logger(f"api-list-{unique_id}")
    # write logs
    log_count = 5
    for i in range(log_count):
        gapic_logger.log_text(f"test {i}")

    def retryable():
        max_results = 3
        gapic_generator = gapic_logger.list_entries(max_results=max_results)
        http_generator = http_logger.list_entries(max_results=max_results)
        # returned objects should be consistent
        self.assertEqual(type(gapic_generator), type(http_generator))
        gapic_list, http_list = list(gapic_generator), list(http_generator)
        # max_results should limit the number of logs returned
        self.assertEqual(len(gapic_list), max_results)
        self.assertEqual(len(http_list), max_results)
        # returned logs should be the same
        self.assertEqual(gapic_list[0].insert_id, http_list[0].insert_id)
        # should return in ascending order
        self.assertEqual(gapic_list[0].payload, "test 0")
        # test reverse ordering
        gapic_generator = gapic_logger.list_entries(
            max_results=max_results, order_by=google.cloud.logging_v2.DESCENDING
        )
        http_generator = http_logger.list_entries(
            max_results=max_results, order_by=google.cloud.logging_v2.DESCENDING
        )
        gapic_list, http_list = list(gapic_generator), list(http_generator)
        self.assertEqual(len(gapic_list), max_results)
        self.assertEqual(len(http_list), max_results)
        # http and gapic results should be consistent
        self.assertEqual(gapic_list[0].insert_id, http_list[0].insert_id)
        # returned logs should be in descending order
        self.assertEqual(gapic_list[0].payload, f"test {log_count-1}")
  RetryErrors(
        (ServiceUnavailable, InternalServerError, AssertionError),
        delay=2,
        backoff=2,
        max_tries=3,
    )(retryable)()

tests/system/test_system.py:933:


.nox/system-3-8/lib/python3.8/site-packages/test_utils/retry.py:115: in wrapped_function
return to_wrap(*args, **kwargs)
tests/system/test_system.py:917: in retryable
self.assertEqual(gapic_list[0].payload, "test 0")
E AssertionError: 'test 1' != 'test 0'
E - test 1
E ? ^
E + test 0
E ? ^

@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 Jan 25, 2023
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Jan 25, 2023
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Jan 26, 2023
@flaky-bot
Copy link
Author

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

@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging 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: p2 Moderately-important priority. Fix may not be included in 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

2 participants