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 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
1269 2 1267 142
View the top 2 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestApiMy
Stack Traces | 0.01s run time
=== RUN   TestApiMy
=== PAUSE TestApiMy
=== CONT  TestApiMy
--- FAIL: TestApiMy (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestApiMy/TestQRep
Stack Traces | 63.2s run time
=== RUN   TestApiMy/TestQRep
=== PAUSE TestApiMy/TestQRep
=== CONT  TestApiMy/TestQRep
2025/11/04 05:07:31 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2025/11/04 05:07:31 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
    api_test.go:1239: WaitFor qrep initial load 2025-11-04 05:07:31.187414739 +0000 UTC m=+444.003523681
2025/11/04 05:07:31 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_api_n6jmg1lo.qrepapi_api_n6jmg1lo
    api_test.go:1239: code: 60, message: Unknown table expression identifier 'qrepapi_api_n6jmg1lo' in scope SELECT id, val FROM qrepapi_api_n6jmg1lo FINAL WHERE _peerdb_is_deleted = 0 ORDER BY 1 ASC SETTINGS use_query_cache = false
2025/11/04 05:07:31 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_2z6uisns.test_update_pkey_chunking_initial_load_enabled
    api_test.go:1244: WaitFor insert post qrep initial load 2025-11-04 05:07:32.19786336 +0000 UTC m=+445.013972302
2025/11/04 05:07:32 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_api_n6jmg1lo.qrepapi_api_n6jmg1lo
    api_test.go:1244: q.NumRecords: 2
    api_test.go:1244: other.NumRecords: 1
2025/11/04 05:07:32 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_2z6uisns.test_update_pkey_chunking_initial_load_enabled
2025/11/04 05:07:32 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_lcnrs231.test_extra_ch_cols
    api_test.go:1244: q.NumRecords: 2
    api_test.go:1244: other.NumRecords: 1
2025/11/04 05:07:33 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_lcnrs231.test_extra_ch_cols
2025/11/04 05:07:33 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_2z6uisns.test_update_pkey_chunking_initial_load_enabled
    api_test.go:1256: WaitFor finish 2025-11-04 05:07:34.217959548 +0000 UTC m=+447.034068490
2025/11/04 05:07:34 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2025/11/04 05:07:34 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
    api_test.go:1256: UNEXPECTED TIMEOUT finish 2025-11-04 05:08:34.341154776 +0000 UTC m=+507.157263718
    api_test.go:44: begin tearing down postgres schema api_n6jmg1lo
--- FAIL: TestApiMy/TestQRep (63.20s)

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

@heavycrystal heavycrystal force-pushed the nexus-fix-ssh-privatekey branch 2 times, most recently from badee03 to 7093c3c Compare November 3, 2025 21:13
@jgao54 jgao54 force-pushed the nexus-fix-ssh-privatekey branch from 7093c3c to 0648d48 Compare November 3, 2025 21:14
@heavycrystal heavycrystal force-pushed the nexus-fix-ssh-privatekey branch from 0648d48 to 43da854 Compare November 4, 2025 04:56
@heavycrystal heavycrystal merged commit 339c1e2 into main Nov 4, 2025
25 of 27 checks passed
@heavycrystal heavycrystal deleted the nexus-fix-ssh-privatekey branch November 4, 2025 08:31
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