storage: Fix for runtime invalid-socket-address error #26806
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Postgres connections over AWS PrivateLink were broken by #26186 which introduced a runtime error because
tokio::net::lookup_host
here requires a port provided:materialize/src/postgres-util/src/tunnel.rs
Lines 305 to 306 in 80e3fe9
We unfortunately did not have a PrivateLink + Postgres Source test in CI. This work is tracked here https://github.com/MaterializeInc/cloud/issues/8238 and will be prioritized for implementation during the next 2 weeks (cc @jubrad @pH14 @benesch )
I reproduced this error on my staging environment using a debug build (from #26804) and then verified this fix with a second debug build (from #26805)
This also fixes the
thiserror
conversion forPostgresError
that caused us to originally attribute the error to something related to ssh-connections.Tips for reviewer
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.