Skip to content

Conversation

heavycrystal
Copy link
Contributor

@heavycrystal heavycrystal commented Oct 16, 2025

Also fixing INSERT statement for create_qrep_flow_job_entry, it had more placeholders than columns post #3493

@heavycrystal heavycrystal requested review from a team and Copilot October 16, 2025 15:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds base64 decoding functionality for SSH private keys in the postgres connection module. The change ensures that base64-encoded SSH private keys are properly decoded before being used for authentication.

Key changes:

  • Added base64 dependency and decoding logic for SSH private key authentication
  • Improved error handling for private key decoding failures
  • Minor code formatting improvement for SQL parameter types array

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
nexus/postgres-connection/src/lib.rs Added base64 decoding of SSH private keys with proper error handling
nexus/postgres-connection/Cargo.toml Added base64 dependency version 0.22
nexus/catalog/src/lib.rs Reformatted SQL parameter types array for better readability
Comments suppressed due to low confidence (1)

nexus/postgres-connection/src/lib.rs:1

  • The SQL query has 7 placeholders ($1 through $7) but the parameter types array only has 6 elements. This mismatch will cause a runtime error.
use base64::Engine;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 16, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
1302 2 1300 130
View the full list of 4 ❄️ flaky test(s)
github.com/PeerDB-io/peerdb/flow/e2e::TestGenericBQ

Flake rate in main: 36.67% (Passed 19 times, Failed 11 times)

Stack Traces | 0s run time
=== RUN   TestGenericBQ
=== PAUSE TestGenericBQ
=== CONT  TestGenericBQ
--- FAIL: TestGenericBQ (0.00s)
github.com/PeerDB-io/peerdb/flow/e2e::TestGenericBQ/Test_Inheritance_Table_With_Dynamic_Setting

Flake rate in main: 36.67% (Passed 19 times, Failed 11 times)

Stack Traces | 33.4s run time
=== RUN   TestGenericBQ/Test_Inheritance_Table_With_Dynamic_Setting
=== PAUSE TestGenericBQ/Test_Inheritance_Table_With_Dynamic_Setting
=== CONT  TestGenericBQ/Test_Inheritance_Table_With_Dynamic_Setting
2025/10/16 15:57:12 INFO Executing and processing query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id"
2025/10/16 15:57:12 INFO Executing and processing query stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id"
2025/10/16 15:57:12 INFO [pg_query_executor] declared cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursorQuery="DECLARE peerdb_cursor_12094665953859605942 CURSOR FOR SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id" args=[]
2025/10/16 15:57:12 INFO [pg_query_executor] fetching rows start x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id" channelLen=0
2025/10/16 15:57:12 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_12094665953859605942
2025/10/16 15:57:12 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_12094665953859605942 records=13 bytes=293 channelLen=12
2025/10/16 15:57:12 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id" rows=13 bytes=293 channelLen=12
2025/10/16 15:57:12 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_12094665953859605942
2025/10/16 15:57:12 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_12094665953859605942 records=0 bytes=0 channelLen=0
2025/10/16 15:57:12 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id" rows=0 bytes=0 channelLen=0
2025/10/16 15:57:12 INFO [pg_query_executor] committing transaction x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart
2025/10/16 15:57:12 INFO [pg_query_executor] committed transaction for query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,name,created_at FROM e2e_test_pgchclg_t1w0epah.\"test_partition_noroot\" ORDER BY id" rows=13 bytes=293 channelLen=0
    generic_test.go:739: UNEXPECTED STATUS TIMEOUT STATUS_SNAPSHOT
    bigquery.go:86: begin tearing down postgres schema bq_judp68ug_20251016155712
--- FAIL: TestGenericBQ/Test_Inheritance_Table_With_Dynamic_Setting (33.35s)
github.com/PeerDB-io/peerdb/flow/e2e::TestGenericPG

Flake rate in main: 36.67% (Passed 19 times, Failed 11 times)

Stack Traces | 0s run time
=== RUN   TestGenericPG
=== PAUSE TestGenericPG
=== CONT  TestGenericPG
--- FAIL: TestGenericPG (0.00s)
2025/10/16 15:11:00 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2025/10/16 15:11:00 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2025/10/16 15:11:00 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychg_or0qftks.test_simple
github.com/PeerDB-io/peerdb/flow/e2e::TestGenericPG/Test_Partitioned_Table_Without_Publish_Via_Partition_Root

Flake rate in main: 36.67% (Passed 19 times, Failed 11 times)

Stack Traces | 31.2s run time
=== RUN   TestGenericPG/Test_Partitioned_Table_Without_Publish_Via_Partition_Root
=== PAUSE TestGenericPG/Test_Partitioned_Table_Without_Publish_Via_Partition_Root
=== CONT  TestGenericPG/Test_Partitioned_Table_Without_Publish_Via_Partition_Root
    generic_test.go:608: UNEXPECTED STATUS TIMEOUT STATUS_SETUP
    postgres.go:92: begin tearing down postgres schema pg_kixcijal
--- FAIL: TestGenericPG/Test_Partitioned_Table_Without_Publish_Via_Partition_Root (31.17s)

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

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