Skip to content

feat: add second postgres instance for local testing#4281

Merged
Amogh-Bharadwaj merged 2 commits into
mainfrom
add-second-postgres
May 7, 2026
Merged

feat: add second postgres instance for local testing#4281
Amogh-Bharadwaj merged 2 commits into
mainfrom
add-second-postgres

Conversation

@Amogh-Bharadwaj

Copy link
Copy Markdown
Contributor

For testing Postgres to Postgres mirrors, it would be good to have a second Postgres instance rather than have source and destination be same, for testing things like roles being copied over

@Amogh-Bharadwaj Amogh-Bharadwaj requested a review from pfcoperez May 6, 2026 11:50
@claude

claude Bot commented May 6, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: The e2e test suite hit the 900-second global timeout (panic: test timed out after 15m0s), causing all in-progress tests to fail simultaneously — this is a timeout flake, not individual test logic bugs.
Confidence: 0.92

✅ Automatically retrying the workflow

View workflow run

@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.

LGTM!


postgres2:
container_name: peerdb-postgres2
image: ${POSTGRES_IMAGE}

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.

This is not a change request, I'd rather keep it simpler, but I wonder if you foresee needing to test different PG versions in source and destination.

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.

Yup that's a great shout @pfcoperez, would probably need to test PG16 to PG18 type mirrors

@Amogh-Bharadwaj Amogh-Bharadwaj requested a review from a team as a code owner May 7, 2026 14:45
@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2245 2 2243 189
View the top 2 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestApiPg
Stack Traces | 0.01s run time
=== RUN   TestApiPg
=== PAUSE TestApiPg
=== CONT  TestApiPg
--- FAIL: TestApiPg (0.01s)
2026/05/07 14:58:08 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/05/07 14:58:08 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/05/07 14:58:08 INFO Executing and processing query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id"
2026/05/07 14:58:08 INFO Executing and processing query stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id"
2026/05/07 14:58:08 INFO [pg_query_executor] declared cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursorQuery="DECLARE peerdb_cursor_3039150018973745938 CURSOR FOR SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id" args=[]
2026/05/07 14:58:08 INFO [pg_query_executor] fetching rows start x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id" channelLen=0
2026/05/07 14:58:08 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_3039150018973745938
2026/05/07 14:58:08 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_3039150018973745938 records=2 bytes=15 channelLen=1
2026/05/07 14:58:08 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id" rows=2 bytes=15 channelLen=1
2026/05/07 14:58:08 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_3039150018973745938
2026/05/07 14:58:08 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_3039150018973745938 records=0 bytes=0 channelLen=0
2026/05/07 14:58:08 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id" rows=0 bytes=0 channelLen=0
2026/05/07 14:58:08 INFO [pg_query_executor] committing transaction x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart
2026/05/07 14:58:08 INFO [pg_query_executor] committed transaction for query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,ky,val,n,t FROM e2e_test_pgch_ocebdmkk.\"test_nullable_column\" ORDER BY id" rows=2 bytes=15 channelLen=0
github.com/PeerDB-io/peerdb/flow/e2e::TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns
Stack Traces | 0.03s run time
=== RUN   TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns
=== PAUSE TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns
=== CONT  TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns
    e2eshared.go:34: 
        	Error Trace:	.../flow/e2e/api_test.go:224
        	            				.../flow/e2eshared/e2eshared.go:34
        	Error:      	Received unexpected error:
        	            	unable to establish connection with catalog: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)
        	Test:       	TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns
--- FAIL: TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns (0.03s)

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

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: The sole failing test (TestApiPg/TestPostgresDestinationValidation_WithExcludedColumns) hit SQLSTATE 57P01 ("terminating connection due to administrator command"), a transient PostgreSQL catalog shutdown caused by CI infrastructure — not a code defect.
Confidence: 0.95

✅ Automatically retrying the workflow

View workflow run

@Amogh-Bharadwaj Amogh-Bharadwaj merged commit 0f86445 into main May 7, 2026
15 of 16 checks passed
@Amogh-Bharadwaj Amogh-Bharadwaj deleted the add-second-postgres branch May 7, 2026 15:24
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.

2 participants