Skip to content

storage: Fix for runtime invalid-socket-address error #26806

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

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

rjobanp
Copy link
Contributor

@rjobanp rjobanp commented Apr 25, 2024

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:

let privatelink_host = mz_cloud_resources::vpc_endpoint_name(*connection_id);
let privatelink_addrs = tokio::net::lookup_host(privatelink_host).await?;

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 for PostgresError that caused us to originally attribute the error to something related to ssh-connections.

Tips for reviewer

Checklist

@rjobanp rjobanp requested review from benesch, guswynn and a team April 25, 2024 16:07
Copy link
Contributor

@guswynn guswynn left a comment

Choose a reason for hiding this comment

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

I feel like tokio's ToSocketAddr's has a broken api that it lets this happen!

@rjobanp rjobanp merged commit fcda42c into MaterializeInc:main Apr 25, 2024
@rjobanp rjobanp deleted the fix-pl-invalid-socket-addr branch April 25, 2024 17:06
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