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

Fix: retrieving Migration UUID as early as possible in the commands #2162

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

priyanshi-yb
Copy link
Contributor

@priyanshi-yb priyanshi-yb commented Jan 8, 2025

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?

Component Breaking changes?
MetaDB No
Name registry json No
Data File Descriptor Json No
Export Snapshot Status Json No
Import Data State No
Export Status Json No
Data .sql files of tables No
Export and import data queue No
Schema Dump No
AssessmentDB No
Sizing DB No
Migration Assessment Report Json No
Callhome Json No
YugabyteD Tables No
TargetDB Metadata Tables No

@@ -81,7 +81,11 @@ var importDataCmd = &cobra.Command{
importerRole = TARGET_DB_IMPORTER_ROLE
}
sourceDBType = GetSourceDBTypeFromMSR()
err := validateImportFlags(cmd, importerRole)
err := retrieveMigrationUUID()
Copy link
Collaborator

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()
Copy link
Collaborator

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..

Copy link
Contributor Author

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

Copy link
Collaborator

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.

@priyanshi-yb priyanshi-yb marked this pull request as ready for review January 9, 2025 08:50
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.

2 participants