Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy: use postgres_protocol scram/sasl code #4748

Merged
merged 6 commits into from
Feb 19, 2024
Merged

proxy: use postgres_protocol scram/sasl code #4748

merged 6 commits into from
Feb 19, 2024

Conversation

conradludgate
Copy link
Contributor

  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

  • 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

@github-actions
Copy link

github-actions bot commented Jul 18, 2023

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
8e5f15f at 2024-02-18T22:59:39.466Z :recycle:

@arpad-m
Copy link
Member

arpad-m commented Jul 19, 2023

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.

@conradludgate
Copy link
Contributor Author

conradludgate commented Jul 19, 2023

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

@arpad-m
Copy link
Member

arpad-m commented Jul 19, 2023

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

@conradludgate conradludgate marked this pull request as ready for review December 8, 2023 17:37
@conradludgate conradludgate requested a review from a team as a code owner December 8, 2023 17:37
proxy/src/scram.rs Outdated Show resolved Hide resolved
@conradludgate conradludgate enabled auto-merge (squash) February 18, 2024 22:18
@conradludgate conradludgate merged commit d0d4871 into main Feb 19, 2024
50 checks passed
@conradludgate conradludgate deleted the proxy/sasl branch February 19, 2024 12:54
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