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

Ensure all the required fields are populated in the html report for new flattened issues approach #2190

Merged
merged 35 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e0dbc15
Adding/Modifying types for defined issues
sanyamsinghal Jan 15, 2025
6355550
Using IssueType for detecting migration caveats category
sanyamsinghal Jan 15, 2025
182a591
Adding Description to all issues
sanyamsinghal Jan 15, 2025
0a25952
Defining constant vars for all isses_ddl
sanyamsinghal Jan 15, 2025
2579be6
Defining constant vars for all isses_dml
sanyamsinghal Jan 15, 2025
3c2e14d
Getting rid of some ISSUE_REASON constants in analyzeSchema.go
sanyamsinghal Jan 15, 2025
3c17a0a
Adding Issue.Type for all issues detected using regexp
sanyamsinghal Jan 15, 2025
5226fa0
Adding type and name to migration caveats category reported Assessmen…
sanyamsinghal Jan 15, 2025
cda39d0
minor misc changes: ordering and casing of object types used
sanyamsinghal Jan 15, 2025
c189531
Considering QueryIssue.Description equivalent to AnalyzeSchemaIssue.R…
sanyamsinghal Jan 16, 2025
2730c45
Obfuscate the sensitive information before sending to callhome from a…
sanyamsinghal Jan 16, 2025
ffde7a8
missed code cleanup
sanyamsinghal Jan 16, 2025
55df028
Fixed expected values in pg/omnibus and pg/assessment-report-test
sanyamsinghal Jan 16, 2025
db420a7
Retaining the convention in issue name related to unsupported datatyp…
sanyamsinghal Jan 16, 2025
400c10e
Fixed expected values for pg/osm test
sanyamsinghal Jan 16, 2025
2dbc415
Fixed expected values for pg/adventureworks test
sanyamsinghal Jan 16, 2025
35ef5bf
Fixed expected values for pg/pgtbrus test
sanyamsinghal Jan 16, 2025
53b1c46
Fixed expected values for pg/sample-is test
sanyamsinghal Jan 16, 2025
bea7b13
Fixed expected values for pg/stackexchange test
sanyamsinghal Jan 16, 2025
65bf603
Fixed expected values for pg/sakila test
sanyamsinghal Jan 16, 2025
7fd0a4b
Bug caught in automation tests
sanyamsinghal Jan 16, 2025
518492b
Fixed expected values in pg/mgi test
sanyamsinghal Jan 16, 2025
da10a10
Retaining the convention in issue name related to unsupported datatyp…
sanyamsinghal Jan 16, 2025
331bcc0
Fixed analyze-schema test by updating the issue reasons
sanyamsinghal Jan 16, 2025
4ea1907
fixed expected values in pg/rna
sanyamsinghal Jan 16, 2025
5a24a1a
fixed expected values in pg/assessment-report-test
sanyamsinghal Jan 16, 2025
a843abf
Avoiding comparison of unnecessary field FeatureDescription
sanyamsinghal Jan 16, 2025
d606906
minor: fixing the order of files in comparison
sanyamsinghal Jan 16, 2025
7aa1403
reverted a accidental update in expected value of pg/assessment-repo…
sanyamsinghal Jan 16, 2025
760a52e
reverted a accidental update in expected value of pg/osm
sanyamsinghal Jan 16, 2025
aadf2d6
issue description change
sanyamsinghal Jan 20, 2025
479ea09
Review comments: adding quotes, assigning impact level etc...
sanyamsinghal Jan 20, 2025
62d82c7
Fixed tests after a recent merge from main
sanyamsinghal Jan 20, 2025
34aa3f9
fixed remaining tests
sanyamsinghal Jan 20, 2025
9b76c95
removed extra info
sanyamsinghal Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions migtests/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ normalize_json() {
.OptimalSelectConnectionsPerNode? = "IGNORED" |
.OptimalInsertConnectionsPerNode? = "IGNORED" |
.RowCount? = "IGNORED" |
.FeatureDescription? = "IGNORED" | # Ignore FeatureDescription instead of fixing it in all tests since it will be removed soon
.MigrationComplexityExplanation?= "IGNORED" |
# Replace newline characters in SqlStatement with spaces
.SqlStatement? |= (
Expand Down
2 changes: 1 addition & 1 deletion migtests/scripts/run-schema-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ main() {

step "Analyze schema."
analyze_schema --output-format json
compare_json_reports "${EXPORT_DIR}/reports/schema_analysis_report.json" "${TEST_DIR}/expected_files/expected_schema_analysis_report.json"
compare_json_reports "${TEST_DIR}/expected_files/expected_schema_analysis_report.json" "${EXPORT_DIR}/reports/schema_analysis_report.json"

step "Create target database."
run_ysql yugabyte "DROP DATABASE IF EXISTS ${TARGET_DB_NAME};"
Expand Down
316 changes: 158 additions & 158 deletions migtests/tests/analyze-schema/expected_issues.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,7 @@
"MinimumVersionsFixedIn": null
},
{
"FeatureName": "Referenced type declaration of variables",
"FeatureName": "Referencing type declaration of variables",
"Objects": [
{
"ObjectType": "FUNCTION",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13420,7 +13420,7 @@
"UnsupportedQueryConstructs": null,
"UnsupportedPlPgSqlObjects": [
{
"FeatureName": "Referenced type declaration of variables",
"FeatureName": "Referencing type declaration of variables",
"Objects": [
{
"ObjectType": "FUNCTION",
Expand Down
214 changes: 107 additions & 107 deletions migtests/tests/pg/mgi/expected_files/expected_schema_analysis_report.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"IssueType": "unsupported_datatypes",
"ObjectType": "TABLE",
"ObjectName": "public.osm_changeset",
"Reason": "Unsupported datatype - geometry on column - geom",
"Reason": "PostGIS datatypes are not yet supported in YugabyteDB. Affected column: geom and type: geometry.",
"SqlStatement": "CREATE TABLE public.osm_changeset (id bigint NOT NULL, user_id bigint, created_at timestamp, min_lat numeric(10, 7), max_lat numeric(10, 7), min_lon numeric(10, 7), max_lon numeric(10, 7), closed_at timestamp, open boolean, num_changes int, user_name varchar(255), tags public.hstore, geom public.geometry(polygon, 4326)) WITH (colocation=false);",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/osm/export-dir/schema/tables/table.sql",
"Suggestion": "",
Expand All @@ -70,7 +70,7 @@
"IssueType": "migration_caveats",
"ObjectType": "TABLE",
"ObjectName": "public.osm_changeset",
"Reason": "Unsupported datatype for Live migration with fall-forward/fallback - public.hstore on column - tags",
"Reason": "Datatype not yet supported by voyager in live migration with fall-forward/fallback. Affected column: tags and type: public.hstore. These columns will be excluded when exporting and importing data in live migration workflows.",
"SqlStatement": "CREATE TABLE public.osm_changeset (id bigint NOT NULL, user_id bigint, created_at timestamp, min_lat numeric(10, 7), max_lat numeric(10, 7), min_lon numeric(10, 7), max_lon numeric(10, 7), closed_at timestamp, open boolean, num_changes int, user_name varchar(255), tags public.hstore, geom public.geometry(polygon, 4326)) WITH (colocation=false);",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/osm/export-dir/schema/tables/table.sql",
"Suggestion": "",
Expand All @@ -82,7 +82,7 @@
"IssueType": "unsupported_features",
"ObjectType": "INDEX",
"ObjectName": "changeset_geom_gist ON public.osm_changeset",
"Reason": "Schema contains GIST index which is not supported.",
"Reason": "The schema contains an index with an access method 'GIST' which is not supported in YugabyteDB.",
"SqlStatement": "CREATE INDEX changeset_geom_gist ON public.osm_changeset USING gist (geom);",
"FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/osm/export-dir/schema/tables/INDEXES_table.sql",
"Suggestion": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"IssueType": "migration_caveats",
"ObjectType": "FOREIGN TABLE",
"ObjectName": "public.f_c",
"Reason": "Foreign tables require manual intervention.",
"Reason": "Foreign table creation fails as SERVER and USER MAPPING objects are not exported by voyager. These should be manually created to make the foreign tables work.",
"SqlStatement": "CREATE FOREIGN TABLE public.f_c ( i integer NOT NULL, t integer, x text ) SERVER p10 OPTIONS ( table_name 'c' );",
"FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/pgtbrus/export-dir/schema/tables/foreign_table.sql",
"Suggestion": "SERVER 'p10', and USER MAPPING should be created manually on the target to create and use the foreign table",
Expand All @@ -75,7 +75,7 @@
"IssueType": "migration_caveats",
"ObjectType": "FOREIGN TABLE",
"ObjectName": "public.f_t",
"Reason": "Foreign tables require manual intervention.",
"Reason": "Foreign table creation fails as SERVER and USER MAPPING objects are not exported by voyager. These should be manually created to make the foreign tables work.",
"SqlStatement": "CREATE FOREIGN TABLE public.f_t ( i integer NOT NULL, ts timestamp(0) with time zone DEFAULT now(), j json, t text, e public.myenum, c public.mycomposit ) SERVER p10 OPTIONS ( table_name 't' );",
"FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/pgtbrus/export-dir/schema/tables/foreign_table.sql",
"Suggestion": "SERVER 'p10', and USER MAPPING should be created manually on the target to create and use the foreign table",
Expand All @@ -87,7 +87,7 @@
"IssueType": "migration_caveats",
"ObjectType": "TABLE",
"ObjectName": "public.t",
"Reason": "Unsupported datatype for Live migration with fall-forward/fallback - public.mycomposit on column - c",
"Reason": "Datatype not yet supported by voyager in live migration with fall-forward/fallback. Affected column: c and type: public.mycomposit. These columns will be excluded when exporting and importing data in live migration workflows.",
"SqlStatement": "CREATE TABLE public.t (\n i integer NOT NULL,\n ts timestamp(0) with time zone DEFAULT now(),\n j json,\n t text,\n e public.myenum,\n c public.mycomposit\n);",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/pgtbrus/export-dir/schema/tables/table.sql",
"Suggestion": "",
Expand Down
Loading