-
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
Fix: retrieving Migration UUID as early as possible in the commands #2162
base: main
Are you sure you want to change the base?
Conversation
@@ -81,7 +81,11 @@ var importDataCmd = &cobra.Command{ | |||
importerRole = TARGET_DB_IMPORTER_ROLE | |||
} | |||
sourceDBType = GetSourceDBTypeFromMSR() | |||
err := validateImportFlags(cmd, importerRole) | |||
err := retrieveMigrationUUID() |
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.
can we do this above GetSourceDBTypeFromMSR
? that also ErrExits.
@@ -47,8 +47,12 @@ var importSchemaCmd = &cobra.Command{ | |||
if tconf.TargetDBType == "" { | |||
tconf.TargetDBType = YUGABYTEDB | |||
} | |||
err := retrieveMigrationUUID() |
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.
Might be slightly unrelated question, but at this point what if export-dir is empty and user runs import-schema? What happens then?
Same question for import-data, analyze-schema as well..
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.
In case of empty dirs and these commands we already have other checks just before this that checks if export-dir is initiated. And we can't do much in those cases we will still get the 00000... uuid in callhome
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.
got it, but i guess now we will get the error message, so that should be helpful.
Describe the changes in this pull request
Fixes retrieving the migration uuid as early as possible to be able send the diagnosis to callhome with proper uuid.
Describe if there are any user-facing changes
How was this pull request tested?
already available tests
https://jenkins.dev.yugabyte.com/job/users/job/yb-voyager-testing/job/yb-voyager-testing-pipeline/4426
Does your PR have changes that can cause upgrade issues?