Tests reliability improvements: Connection parameters extraction logic unification#4192
Conversation
❌ 2 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
🔄 Flaky Test DetectedAnalysis: Two different TestApiPg subtests failed across different CI matrix runs (mysql-gtid vs mysql-pos) with WaitFor timeout and teardown errors, indicating timing-dependent flakiness under high-parallelism test load rather than a real bug. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: BigQuery E2E test ✅ Automatically retrying the workflow |
❌ Test FailureAnalysis: The e2e test |
🔄 Flaky Test DetectedAnalysis: The e2e test suite hit the exact 900-second timeout ceiling (900.602s), indicating a flaky timeout failure rather than a deterministic assertion error. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The test failed due to PostgreSQL catalog connection being terminated by an admin command (SQLSTATE 57P01), a transient infrastructure event unrelated to the JSON support logic under test. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The test failed due to a PostgreSQL catalog connection being terminated by an administrator shutdown (SQLSTATE 57P01), which is a transient infrastructure error unrelated to the code under test. ✅ Automatically retrying the workflow |
be414a3 to
640de99
Compare
🔄 Flaky Test DetectedAnalysis: The test failed because the PostgreSQL catalog connection was forcibly terminated mid-test ( ✅ Automatically retrying the workflow |
There was a problem hiding this comment.
Pull request overview
Unifies how test suites read DB connection parameters (host/port/version/credentials) by centralizing the logic and updating e2e/connector tests to use the shared helpers.
Changes:
- Added shared test environment helpers for ClickHouse/MySQL/Mongo/RDS IAM auth.
- Replaced duplicated env parsing in e2e and connector tests with calls into the shared helpers.
- Simplified MySQL/ClickHouse host/port/version checks across suites.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| flow/internal/test_env.go | New centralized helpers for test DB env configuration and RDS IAM auth test inputs. |
| flow/e2e/switchboard_mysql_test.go | Uses shared MySQL version helper to decide skipping CTE test. |
| flow/e2e/mysql.go | Uses shared MySQL host/port/version helpers instead of local parsing functions. |
| flow/e2e/mongo.go | Uses shared Mongo credential helpers for admin/user connections. |
| flow/e2e/clickhouse_mysql_test.go | Uses shared MySQL version helper for enum ordinal behavior. |
| flow/e2e/clickhouse.go | Uses shared ClickHouse host/port helpers. |
| flow/connectors/postgres/rds_test.go | Uses shared RDS IAM auth env/config helpers. |
| flow/connectors/mysql/ssh_keepalive_test.go | Uses shared MySQL host/port/version helpers; removes duplicated parsing. |
| flow/connectors/mysql/rds_test.go | Uses shared RDS IAM auth env/config helpers. |
| flow/connectors/clickhouse/s3_iam_role_test.go | Uses shared ClickHouse host/port helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
|
|
||
| func TestAwsRDSIAMAuthConnectForPostgres(t *testing.T) { | ||
| t.Skip("flaky") |
There was a problem hiding this comment.
Would be good to validate that this and the other one still pass when not skipped (maybe it was, just going off of PR commits)
There was a problem hiding this comment.
That's a good point. One green is enough, added an ephemeral commit to try it out: 84f4ae3
There was a problem hiding this comment.
The test still occasionally pass:
The query compares it with a control PR #4214 created just for this purpose.
|
Should catalog.go GetAncillaryPostgresConfigFromEnv also be moved to test_env.go? |
I was tempted to do this in the same PR too but finally decided not to given that this is production code. This PR factors out everything that load tests env vars not production code. |
…Decided to start the path for mongo even if they were used just in one SetupMongo function
…` and `TestAwsRDSIAMAuthConnectForPostgresViaProxy`
…nection-parameters
84f4ae3 to
7c49893
Compare
🔄 Flaky Test DetectedAnalysis: All failures are network errors ("unexpected EOF") connecting to an external AWS RDS instance at 34.216.16.103:5432 in the IAM auth tests, consistent across all CI matrix variants and unrelated to the recent code changes. ✅ Automatically retrying the workflow |
@ilidemi You are absolutely right! I did run the search for the method above it! That's embarrassing, moved in 6058d5c |
🔄 Flaky Test DetectedAnalysis: All 3 failures are transient infrastructure/network errors: unexpected EOF connecting to AWS RDS, PAM auth failure via proxy, and Postgres catalog connection terminated by admin command — none are related to recent code changes. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: All primary failures are network errors ("unexpected EOF" connecting to external AWS RDS at 34.216.16.103:5432) across all matrix jobs, indicating the external RDS test infrastructure was temporarily unreachable rather than a code regression. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: All CI matrix jobs failed because the external AWS RDS instance at 34.216.16.103:5432 was unreachable ("unexpected EOF"), causing TestAwsRDSIAMAuthConnectForPostgres and TestAwsRDSIAMAuthConnectForPostgresViaProxy to fail with a network error unrelated to any code change. ✅ Automatically retrying the workflow |
…Postgres` and `TestAwsRDSIAMAuthConnectForPostgresViaProxy`" This reverts commit feeec76.
🔄 Flaky Test DetectedAnalysis: Tests ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: All failures are transient: RDS IAM auth tests hit ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: All matrix variants failed simultaneously at 11:02:56 with "unexpected EOF" connecting to the external RDS endpoint (34.216.16.103:5432), indicating a transient network outage against the AWS RDS test instance rather than a code bug. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: Two AWS RDS IAM auth tests failed due to transient network errors ("unexpected EOF") and PAM auth failure against a real external RDS host, which are classic infrastructure flakiness symptoms unrelated to code changes. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The test failed with PostgreSQL SQLSTATE 57P01 (admin_shutdown) — the catalog DB connection was terminated by an external command mid-run, an infrastructure issue unrelated to code logic. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: TestAwsRDSIAMAuthConnectForPostgresViaProxy failed with a network-level "unexpected EOF" connecting to an external AWS RDS proxy (34.216.16.103:5432), indicating a transient connectivity issue rather than a code bug. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: TestAwsRDSIAMAuthConnectForPostgres and TestAwsRDSIAMAuthConnectForPostgresViaProxy failed with "PAM authentication failed" on an external RDS instance, indicating a transient AWS IAM credential or infrastructure issue unrelated to the recent code change. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: E2E tests timed out (900s limit hit in mysql-gtid) and had teardown failures across different matrix configurations, with different tests failing in each run — classic flaky CI behavior from resource contention, not a code regression. ✅ Automatically retrying the workflow |


This PR unifies test DB connection parameters acquisition into common functions used across all test suites.
Ready when
What does this PR resolve?
Closes: https://linear.app/clickhouse/issue/DBI-674