-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use Dba user when Vexec is runAsAdmin #7731
Conversation
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.
Added coupled comments.
One extra thing is that we should add a test to assert this is working as expected. An idea to test this is to add a test in go/vt/vttablet/tabletmanager/vreplication/engine_test.go
where before running ExecWithDBa
you set up bad credentials for the dba user and expect it to fail.
We can also check with @deepthi if she has other recommendations on how to test this.
53513c4
to
7be425f
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.
LGTM overall.
If you wanted to do some more testing you might consider writing a test that explicitly uses the MockDbaClient
.
Signed-off-by: Malcolm Akinje <makinje@slack-corp.com>
33721f3
to
25e5c8b
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.
All comments have been addressed. This looks good @makinje16 !
Use Dba user when Vexec is runAsAdmin
Signed-off-by: Malcolm Akinje makinje@slack-corp.com
Description
This PR helps solve issue #7585 by allowing
VEngine.Exec
to take a runAsAdmin parameter which will decide whether to use theDba
orFiltered
db user.Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: