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

Refactoring migration assessment codepath #2137

Merged
merged 8 commits into from
Jan 6, 2025
Merged

Conversation

sanyamsinghal
Copy link
Collaborator

@sanyamsinghal sanyamsinghal commented Jan 2, 2025

Describe the changes in this pull request

Just minor refactoring to restart with, please review commit by commit to get an idea of what all changes are done.

Describe if there are any user-facing changes

NA

How was this pull request tested?

Not required, existing is enough.

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

@sanyamsinghal sanyamsinghal self-assigned this Jan 2, 2025
@sanyamsinghal sanyamsinghal force-pushed the sanyam/refactor-assess branch from a35b70f to a869cda Compare January 2, 2025 19:30
@sanyamsinghal sanyamsinghal marked this pull request as ready for review January 3, 2025 07:26
yb-voyager/cmd/assessMigrationCommand.go Show resolved Hide resolved
yb-voyager/cmd/common.go Show resolved Hide resolved
@@ -100,7 +100,8 @@ type DBObject struct {
}

// TODO: support MinimumVersionsFixedIn in xml
type Issue struct {
type AnalyzeSchemaIssue struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have just changed the struct name, not the JSON field names, but have we tested YugabyteD to confirm if this change does not break anything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its the struct name only, not the fields. So json will be same.
We send payload(json) to ybd

MigrationCaveats []UnsupportedFeature `json:"MigrationCaveats"`
}

type AssessmentIssue struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanyamsinghal can you add comments to each field, giving an example of what they might look like?

Copy link
Collaborator Author

@sanyamsinghal sanyamsinghal Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Category - Feature, Migration Caveat. Query Constructs, Datatype
TypeName - Gin Indexes, Regex Functions, ...
TypeDescription - TODO: add if available or add for required ones
Impact: Last meeting we discuss it as Level-1, Level-2, Level-3... But i am thinking we can have it as Minor Moderate Significant also

ObjectType - it can be empty in some cases, for categories like unsupported datatypes thinking of the object type as datatype for eg: geometry
Basically thinking of the datatype as object type

We can discuss this more in next PR, for now i just defined a struct. @makalaaneesh

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, yeah just wanted you to add comments to code next to the field 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, will add.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makalaaneesh let me know what do you think about

ObjectType - it can be empty in some cases, for categories like unsupported datatypes thinking of the object type as datatype for eg: geometry
Basically thinking of the datatype as object type

@sanyamsinghal sanyamsinghal merged commit 953591c into main Jan 6, 2025
67 checks passed
@sanyamsinghal sanyamsinghal deleted the sanyam/refactor-assess branch January 6, 2025 08:07
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.

3 participants