This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
tests.system.test_system.TestLogging: test_api_equality_list_logs failed #662
Copy link
Copy link
Closed
Labels
api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.Tells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.An issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Note: #613 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.
commit: 77e621c
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:915: in retryable
self.assertEqual(gapic_list[0].insert_id, http_list[0].insert_id)
E AssertionError: '14ir4wyfet854d' != '2rxfajffjoimb'
E - 14ir4wyfet854d
E + 2rxfajffjoimb
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/python-logging API.Issues related to the googleapis/python-logging API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.Tells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.An issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
flaky-bot commentedon Nov 6, 2022
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 (77e621c), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).
daniel-sanche commentedon Nov 7, 2022
So far I haven't been able to reproduce this issue, but I'll keep an eye on it