-
Notifications
You must be signed in to change notification settings - Fork 52
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
Replace shell's proxy with new gRPC backed proxy #759
Conversation
1da84d0
to
34a851f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. Added couple of comments regarding style.
UpstreamAddr: cfg.UpstreamAddr, | ||
Authorization: auth.NewBasicAuth(cfg.Username, cfg.Password), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this extra package for constructing the server type. I would include this only if we reuse it in multiple places. Otherwise it'll just create an additional abstraction with no immediate benefits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's reused in subsequent PRs. I just didn't want to do them all in one big one. So if this were the only implementation, I'd agree, but it was intended to be shared by every use case of sql-proxy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks for the clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6d347a7
to
0cb7d4c
Compare
0cb7d4c
to
584394c
Compare
584394c
to
3d284fd
Compare
licensed was marking them as `other`. Manually reviewed each.
As it turns out, bringing in a dependency on vitess is going to be borderline impossible into our CLI since it completely restricts what environments we can compile to. Specifically, vitess has 0 support for anything Windows currently. So this will have to come back in a reimagined way. Revert "database/restore: port to using psdbproxy (#761)" This reverts commit 33bb6bd. Revert "database/dump: port to using psdbproxy (#760)" This reverts commit 067d436. Revert "Replace shell's proxy with new gRPC backed proxy (#759)" This reverts commit 3884029.
As it turns out, bringing in a dependency on vitess is going to be borderline impossible into our CLI since it completely restricts what environments we can compile to. Specifically, vitess has 0 support for anything Windows currently. So this will have to come back in a reimagined way. Revert "database/restore: port to using psdbproxy (#761)" This reverts commit 33bb6bd. Revert "database/dump: port to using psdbproxy (#760)" This reverts commit 067d436. Revert "Replace shell's proxy with new gRPC backed proxy (#759)" This reverts commit 3884029.
This replaces the sql-proxy implementation with the new psdbproxy implementation.
Swapping in pscale shell is the first on the chopping block but wanted to get this integrated into the codebase first to serve as the base for the other uses of sql-proxy.
In summary, this replaces the certificate based sql-proxy, which relies on deprecated infrastructure, with a new HTTP based proxy.
This new HTTP-based proxy will be more resilient to network issues as well as acting as a connection pooler for local mysql connections.
This relies on open sourcing the
planetscale/psdbproxy
repo yet.