-
Notifications
You must be signed in to change notification settings - Fork 11
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
Integrated CheckRequiredToolsAreInstalled() function into checkDependenciesForExport() function #2071
Conversation
…enciesForExport() function
|
||
missingTools = utils.CheckTools("strings") | ||
|
||
case MYSQL: |
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.
minor improvement: for mysql, oracle, you can skip the ora2pg check if it's live migration.
(add a todo for now, because as I see this function is called in lots of places - exportschema, exportdata, assess-migration)
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 a TODO statement and created a ticket:
#2102
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
yb-voyager/src/utils/utils.go
Outdated
for _, tool := range tools { | ||
execPath, err := exec.LookPath(tool) | ||
if err != nil { | ||
missingTools = append(missingTools, fmt.Sprintf("%s", tool)) |
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.
missingTools = append(missingTools, tool)
??
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.
Fixed it
Describe the changes in this pull request
We had a function CheckRequiredToolsAreInstalled() in the source db interface which we were using to check whether tools like strings, ora2pg, sqlplus were present or not. In this PR I have merged that function into checkDependenciesForExport() which is run along with the guardrails.
Describe if there are any user-facing changes
There is an addition in the command line output for missing dependencies. The overall structure is same. Just that the above mentioned tools will also be shown:
How was this pull request tested?
This PR was tested manually. I removed the binaries from their locations and tried to get the output for which binaries are missing. No need to add integration tests.
Does your PR have changes that can cause upgrade issues?