Skip to content

Chore: Address Clickhouse Cloud test flakiness#3782

Merged
erindru merged 4 commits intomainfrom
erin/fix-clickhouse-cloud
Feb 4, 2025
Merged

Chore: Address Clickhouse Cloud test flakiness#3782
erindru merged 4 commits intomainfrom
erin/fix-clickhouse-cloud

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Feb 4, 2025

This PR attempts to debug the following issue noticed in the failing clickhouse cloud tests on main:

 http.client.RemoteDisconnected: Remote end closed connection without response

It looks like Clickhouse Cloud can now go into an idle state. I added a pre-ping to ensure the cicd instance is running before triggering the tests.

However, the issue still occurred. So I set:

connect_timeout: 30

on the connection config (previously it was using the default value of 10).

This actually did fix the connection issue but it raised another issue:

DB::Exception: Too many databases. The limit (server configuration parameter `max_database_num_to_throw`) is set to 100, the current number of databases is 272.

So it looks like Clickhouse Cloud is now limiting the number of "databases" (schemas) that you can have on a single instance. I cleared out a bunch of test schemas left over from failed runs and now the tests can run successfully again.

After this, I still experienced some flakiness. I reduced the pytest concurrency to 1 and increased the number of HTTP retries on the Clickhouse connection pool. I also removed the -x option because I notice it conflicts with pytest-retry and results in pytest-retry not retrying tests (this is a problem for the other engine adapter integration tests too, however that can be addressed in a different PR)

#filters:
# branches:
# only:
# - main
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: reinstate prior to merge

@erindru erindru requested a review from treysp February 4, 2025 02:04
@erindru erindru force-pushed the erin/fix-clickhouse-cloud branch from b0c3a3b to 454cef9 Compare February 4, 2025 02:05
@erindru erindru marked this pull request as ready for review February 4, 2025 02:05
@erindru erindru changed the title Chore: Pre-ping clickhouse cloud instance to ensure its running before starting tests Chore: Address Clickhouse Cloud test flakiness Feb 4, 2025
@erindru erindru merged commit d36c2d4 into main Feb 4, 2025
21 checks passed
@erindru erindru deleted the erin/fix-clickhouse-cloud branch February 4, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants