Skip to content

Separate MySQL and MariaDB tests - #4517

Merged
pfcoperez merged 6 commits into
mainfrom
separate-mysql-mariadb-tests
Jun 30, 2026
Merged

Separate MySQL and MariaDB tests#4517
pfcoperez merged 6 commits into
mainfrom
separate-mysql-mariadb-tests

Conversation

@ilidemi

@ilidemi ilidemi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • Incorporate DBI-829: MariaDB as iteration dimension #4516 making Maria a separate DB in the matrix
  • Spawn out the maria-roots of e2e suites
  • Introduce TestIntegraion.../mysql and .../mariadb naming pattern for integration tests, filter from tilt with a matcher. MySQL-only are TestMySQLOnlyIntegration... to avoid running them from maria targets as parent tests are first ran to discover subtests. Unit tests are out of scope for tilt as they don't need any infra

Also GitHub seems to not handle indentation diffs very well, most of the line changes are just subtest indentation

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
2653 8 2645 350
View the top 3 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationCloseSyncerWithTimeout
Stack Traces | 0.03s run time
=== RUN   TestMySQLOnlyIntegrationCloseSyncerWithTimeout
=== PAUSE TestMySQLOnlyIntegrationCloseSyncerWithTimeout
=== CONT  TestMySQLOnlyIntegrationCloseSyncerWithTimeout
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:2222
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:12001
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:2222
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:12003
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:2222
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:12005
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:12002
2026/06/30 07:49:19 INFO Setting up SSH connection x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} Server=localhost:12004
    ssh_keepalive_test.go:293: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:105
        	            				.../connectors/mysql/ssh_keepalive_test.go:293
        	Error:      	Received unexpected error:
        	            	MySQL execute error: readInitialHandshake: io.ReadFull(header) failed. err EOF: connection was bad
        	Test:       	TestMySQLOnlyIntegrationCloseSyncerWithTimeout
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationCloseSyncerWithTimeout (0.03s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown
Stack Traces | 0.03s run time
=== RUN   TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown
=== PAUSE TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown
=== CONT  TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown
    ssh_keepalive_test.go:129: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:68
        	            				.../connectors/mysql/ssh_keepalive_test.go:114
        	            				.../connectors/mysql/ssh_keepalive_test.go:129
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationSSHKeepaliveTunnelDown (0.03s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSyncerClose
Stack Traces | 0.03s run time
=== RUN   TestMySQLOnlyIntegrationSyncerClose
=== PAUSE TestMySQLOnlyIntegrationSyncerClose
=== CONT  TestMySQLOnlyIntegrationSyncerClose
    ssh_test.go:47: 
        	Error Trace:	.../connectors/mysql/ssh_test.go:38
        	            				.../connectors/mysql/ssh_test.go:47
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSyncerClose
--- FAIL: TestMySQLOnlyIntegrationSyncerClose (0.03s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationBinlogStalenessThreshold
Stack Traces | 0.04s run time
=== RUN   TestMySQLOnlyIntegrationBinlogStalenessThreshold
=== PAUSE TestMySQLOnlyIntegrationBinlogStalenessThreshold
=== CONT  TestMySQLOnlyIntegrationBinlogStalenessThreshold
    ssh_keepalive_test.go:334: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:105
        	            				.../connectors/mysql/ssh_keepalive_test.go:334
        	Error:      	Received unexpected error:
        	            	MySQL execute error: readInitialHandshake: io.ReadFull(header) failed. err EOF: connection was bad
        	Test:       	TestMySQLOnlyIntegrationBinlogStalenessThreshold
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationBinlogStalenessThreshold (0.04s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang
Stack Traces | 0.04s run time
=== RUN   TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang
=== PAUSE TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang
=== CONT  TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang
    ssh_keepalive_test.go:238: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:68
        	            				.../connectors/mysql/ssh_keepalive_test.go:238
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationSSHKeepaliveCDCCloseHang (0.04s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSSHKeepaliveCDCHang
Stack Traces | 0.04s run time
=== RUN   TestMySQLOnlyIntegrationSSHKeepaliveCDCHang
=== PAUSE TestMySQLOnlyIntegrationSSHKeepaliveCDCHang
=== CONT  TestMySQLOnlyIntegrationSSHKeepaliveCDCHang
    ssh_keepalive_test.go:188: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:68
        	            				.../connectors/mysql/ssh_keepalive_test.go:188
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSSHKeepaliveCDCHang
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationSSHKeepaliveCDCHang (0.04s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSSHKeepaliveLatency
Stack Traces | 0.04s run time
=== RUN   TestMySQLOnlyIntegrationSSHKeepaliveLatency
=== PAUSE TestMySQLOnlyIntegrationSSHKeepaliveLatency
=== CONT  TestMySQLOnlyIntegrationSSHKeepaliveLatency
    ssh_keepalive_test.go:136: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:68
        	            				.../connectors/mysql/ssh_keepalive_test.go:114
        	            				.../connectors/mysql/ssh_keepalive_test.go:136
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSSHKeepaliveLatency
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationSSHKeepaliveLatency (0.04s)
github.com/PeerDB-io/peerdb/flow/connectors/mysql::TestMySQLOnlyIntegrationSSHResetPeer
Stack Traces | 0.04s run time
=== RUN   TestMySQLOnlyIntegrationSSHResetPeer
=== PAUSE TestMySQLOnlyIntegrationSSHResetPeer
=== CONT  TestMySQLOnlyIntegrationSSHResetPeer
    ssh_keepalive_test.go:143: 
        	Error Trace:	.../connectors/mysql/ssh_keepalive_test.go:68
        	            				.../connectors/mysql/ssh_keepalive_test.go:114
        	            				.../connectors/mysql/ssh_keepalive_test.go:143
        	Error:      	Received unexpected error:
        	            	MySQL execute error: ssh: rejected: connect failed (Connection refused)
        	Test:       	TestMySQLOnlyIntegrationSSHResetPeer
        	Messages:   	Initial connection should work
--- FAIL: TestMySQLOnlyIntegrationSSHResetPeer (0.04s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A real workflow misconfiguration on the separate-mysql-mariadb-tests branch left DB_IMG/DB_ENV empty for some matrix combinations, causing docker run -e to fail deterministically (exit 125) and downstream test-result ingestion to fail.
Confidence: 0.95

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: All failures are MariaDB/MySQL test suites failing instantly at setup with "connection refused"/EOF errors against localhost:3306, indicating the MariaDB service container failed to start or be ready — an infrastructure flake, not a code bug.
Confidence: 0.93

✅ Automatically retrying the workflow

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The PR's restructured TestMySQLOnlyIntegration* SSH-tunnel tests in flow/connectors/mysql fail deterministically and identically across all three MySQL matrix jobs with instant "ssh: rejected: connect failed (Connection refused)" errors, indicating a real PR-introduced bug in the SSH-tunnel-to-MySQL test setup rather than a flaky/intermittent failure.
Confidence: 0.9

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Eight newly-added SSH-tunnel MySQL integration tests (TestMySQLOnlyIntegration*, nonexistent on main) fail 100% deterministically across both independent matrix jobs with "ssh: rejected: connect failed (Connection refused)" at initial connection, indicating a real setup/code defect in PR #4517's new tests rather than intermittent flakiness.
Confidence: 0.85

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@dtunikov dtunikov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me
i would maybe add smth to claude.md to make it more likely to catch cases when someone adds a test for mysql and forgets about mariadb (and vice versa), it mostly affects integration tests (not e2e suite):

func TestIntegrationGetTableSchemaCaseSensitiveIdentifiers(t *testing.T) {
	for _, tc := range []struct {
		name string
	}{
		{name: "mysql"},
		{name: "mariadb"},
	} {
		t.Run(tc.name, func(t *testing.T) {

func TestIntegrationMySQLGetMasterGTIDSet(t *testing.T) {
for _, tc := range []struct {
name string
}{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't this struct:

{
		{name: "mysql"},
		{name: "mariadb"},
	}

Be factored out as a common constant or the table test structure factored out as a test helper?

This way we don't only stop repeating ourselves but also prevent accidentally missing one of the flavors.

@ilidemi ilidemi Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It can but we then would lose the IDE codelenses as the VS Code extensions are not that smart to match through the layers of indirection

@pfcoperez
pfcoperez marked this pull request as ready for review June 30, 2026 08:54
@pfcoperez
pfcoperez requested a review from a team as a code owner June 30, 2026 08:54

@pfcoperez pfcoperez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Proceeding to force merge and update the branch protection

@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown

Code review

One issue found. Checked for bugs and CLAUDE.md compliance.

Dependency version change in .github/workflows/flow.yml (lines 54-64)

Per .claude/REVIEW.md: When changes are bumping dependencies, check whether the version bump brings regressions. Read the upstream release notes and commit log for the bumped range.

This PR introduces new MariaDB Docker image versions and removes the previously pinned digest:

  • mariadb:lts-ubi9 -- was pinned to @sha256:55a81b2d..., now uses a floating tag
  • mariadb:12-ubi -- new major version
  • mariadb:13.0-ubi-rc -- new major version, release candidate (inherently unstable -- may cause CI flakiness)

See lines 54-64.

Please confirm that upstream MariaDB 12 and 13 release notes have been reviewed for breaking changes affecting the MySQL connector, and consider whether the RC image is appropriate for CI.

@ilidemi

ilidemi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

to make it more likely to catch cases when someone adds a test for mysql and forgets about mariadb (and vice versa)

Addressed in #4518. When this one is merged, I thiiink that one should switch to main as base and kick off the CI.

@pfcoperez
pfcoperez merged commit a7eee79 into main Jun 30, 2026
23 checks passed
@pfcoperez
pfcoperez deleted the separate-mysql-mariadb-tests branch June 30, 2026 09:43
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.

3 participants