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

Smart routing for sql command execution against running local servers #5966

Merged
merged 18 commits into from
May 22, 2023

Conversation

macneale4
Copy link
Contributor

@macneale4 macneale4 commented May 16, 2023

When dolt sql commands are executed against a database which is in used by a sql server, connect to it through the sql port. Currently this does not support authenticated transport. If the root user is still active, we'll use that be default. Otherwise, the --user flag can be used to specify a user, but no authentication token is supported. That will come in the next round of changes.

A step towards: #3922

@macneale4 macneale4 requested a review from fulghum May 16, 2023 22:25
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Generally looking good; the command startup feels like it's getting complex, but I guess that's unavoidable to some extent since we're including more logic. I held off from approving just to make sure I understood a couple questions/thoughts first.

Looks like there's just one failing BATS test left, too! 🎉

go/libraries/doltcore/env/multi_repo_env.go Outdated Show resolved Hide resolved
integration-tests/bats/sql-server.bats Show resolved Hide resolved
go/libraries/doltcore/env/multi_repo_env.go Outdated Show resolved Hide resolved
go/cmd/dolt/commands/utils.go Outdated Show resolved Hide resolved
go/cmd/dolt/dolt.go Outdated Show resolved Hide resolved
@macneale4 macneale4 requested a review from fulghum May 18, 2023 23:48
Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Logic looks good. I still think it's worth a little more time on the error messaging. Ideally the error message would be crystal clear about what's happening and include a concrete next step for how the user can correct it. Otherwise we get more support requests and customer get blocked in their usage.

go/cmd/dolt/commands/sql.go Outdated Show resolved Hide resolved
@macneale4 macneale4 merged commit 82cc919 into main May 22, 2023
29 checks passed
@macneale4 macneale4 deleted the macneale4/sql-local-remote branch May 22, 2023 17:28
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.

None yet

2 participants