-
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
Send error messages to callhome #2160
Conversation
@@ -57,14 +57,14 @@ var assessMigrationBulkCmd = &cobra.Command{ | |||
Run: func(cmd *cobra.Command, args []string) { | |||
err := assessMigrationBulk() | |||
if err != nil { | |||
packAndSendAssessMigrationBulkPayload(ERROR) | |||
// packAndSendAssessMigrationBulkPayload(ERROR) |
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.
remove comment
@@ -1046,7 +1047,7 @@ func extractTableListFromString(fullTableList []sqlname.NameTuple, flagTableList | |||
result := lo.Filter(fullTableList, func(tableName sqlname.NameTuple, _ int) bool { | |||
ok, err := tableName.MatchesPattern(pattern) | |||
if err != nil { | |||
utils.ErrExit("Invalid table name pattern %q: %s", err) | |||
utils.ErrExit("Invalid table name pattern %q: %s", pattern, err) |
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.
just confirm if we have fixed it in modify error strings PR.
utils.ErrExit("Invalid table name pattern: %q: %s", pattern, err)
@@ -262,7 +262,7 @@ func startExportPB(progressContainer *mpb.Progress, mapKey string, quitChan chan | |||
time.Sleep(100 * time.Millisecond) | |||
break | |||
} else if err != nil { //error other than EOF | |||
utils.ErrExit("Error while reading file %s: %v", tableDataFile, err) | |||
utils.ErrExit("Error while reading file %s: %v", tableDataFile.Name(), err) |
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.
same for this as above
utils.ErrExit("Error while reading file: %s: %v", tableDataFile.Name(), err)
@@ -785,7 +785,7 @@ WHERE parent.relname='%s' AND nmsp_parent.nspname = '%s' `, tname, sname) | |||
rows, err := pg.db.Query(query) | |||
if err != nil { | |||
log.Errorf("failed to list partitions of table %s: query = [ %s ], error = %s", tableName, query, err) | |||
utils.ErrExit("failed to find the partitions for table %s:", tableName, err) | |||
utils.ErrExit("failed to find the partitions for table %s: %v", tableName, err) |
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.
utils.ErrExit("failed to find the partitions for table: %s: %v", tableName, err)
@@ -756,7 +756,7 @@ WHERE parent.relname='%s' AND nmsp_parent.nspname = '%s' `, tname, sname) | |||
rows, err := yb.db.Query(query) | |||
if err != nil { | |||
log.Errorf("failed to list partitions of table %s: query = [ %s ], error = %s", tableName, query, err) | |||
utils.ErrExit("failed to find the partitions for table %s:", tableName, err) | |||
utils.ErrExit("failed to find the partitions for table %s: %v", tableName, err) |
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.
utils.ErrExit("failed to find the partitions for table: %s: %v", tableName, err)
yb-voyager/cmd/importSchema.go
Outdated
if len(errorsList) > 0 && status != EXIT { | ||
payload.Status = COMPLETE_WITH_ERRORS | ||
} | ||
// if status == ERROR { |
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.
remove comments
@@ -299,7 +299,7 @@ func validateSSLMode() { | |||
if source.DBType == ORACLE || slices.Contains(validSSLModes[source.DBType], source.SSLMode) { | |||
return | |||
} else { | |||
utils.ErrExit("Error: Invalid sslmode: %q. Valid SSL modes are %v", validSSLModes[source.DBType]) | |||
utils.ErrExit("Error: Invalid sslmode: %q. Valid SSL modes are %v", source.SSLMode, validSSLModes[source.DBType]) |
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.
utils.ErrExit("Invalid sslmode: %q. Valid SSL modes are %v", source.SSLMode, validSSLModes[source.DBType])
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!
Describe the changes in this pull request
Send error messages in each phase to callhome as part of phase payload.
Describe if there are any user-facing changes
How was this pull request tested?
Manual testing against local callhome server.
Does your PR have changes that can cause upgrade issues?