neon icon indicating copy to clipboard operation
neon copied to clipboard

proxy: use postgres_protocol scram/sasl code

Open conradludgate opened this issue 2 years ago • 4 comments

  1. scram::password was used in tests only. can be replaced with postgres_protocol::password.
  2. postgres_protocol::authentication::sasl provides a client impl of SASL which improves our ability to test

Checklist before requesting a review

  • [X] I have performed a self-review of my code.
  • [ ] If it is a core feature, I have added thorough tests.
  • [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • [ ] Do not forget to reformat commit message to not include the above checklist

conradludgate avatar Jul 18 '23 14:07 conradludgate

2442 tests run: 2323 passed, 0 failed, 119 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_vm_bit_clear_on_heap_lock: debug
  • test_wal_restore_initdb: release
  • test_wal_restore: release

Code coverage (full report)

  • functions: 55.7% (12909 of 23156 functions)
  • lines: 82.5% (69821 of 84680 lines)

The comment gets automatically updated with the latest test results
8e5f15ffc7a8884d55665e00d41ec8b464f5ad83 at 2024-02-18T22:59:39.466Z :recycle:

github-actions[bot] avatar Jul 18 '23 14:07 github-actions[bot]

~I'm not sure it is a good idea to replace a Rust dependency with a C one in a component as exposed as the proxy.~

Edit: Reading again, it seems that there have only been testing changes. I think this PR is fine but to make sure one should make postgres-protocol a dev dependency.

arpad-m avatar Jul 19 '23 06:07 arpad-m

I'm not sure it is a good idea to replace a Rust dependency with a C one in a component as exposed as the proxy.

What do you mean? postgres-protocol is a fully Rust library and we already indirectly depend on it through tokio-postgres. You can verify this given the tiny change to the Cargo.lock. Infact, we even have our own fork of postgres-protocol

but to make sure one should make postgres-protocol a dev dependency.

I have direct plans to use postgres-protocol further soon (i plan on removing some uses of tokio-postgres), so I see no point to this

conradludgate avatar Jul 19 '23 07:07 conradludgate

postgres-protocol is a fully Rust library

Oh it is indeed, my concern is moot then. I'm still getting familiar to everything, I apologize.

I have direct plans to use postgres-protocol further soon

fair

arpad-m avatar Jul 19 '23 07:07 arpad-m