Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
711e445
test: start migration e2es
Jul 10, 2024
464aa6d
test: working base migration test
Jul 16, 2024
b3e85f5
tests: add tests for other cases
Jul 17, 2024
5451692
style: fix lint errors
Jul 18, 2024
1ea7fb6
chore: temp test setup
Jul 18, 2024
f9a924c
test: add references migration e2e test
Jul 19, 2024
0c7a040
test: add many-to-many migration e2e test
Jul 23, 2024
429ca15
test: fix index creation for many-to-many
Jul 23, 2024
debbadc
test: add ddb cleanup for migration tests
Jul 25, 2024
3bbd8e7
test: improve assertions
Jul 25, 2024
7ddc3d9
docs: remove unnecessary comments
Jul 25, 2024
eb5ce6d
test: undo temp testing changes
Jul 25, 2024
c73463c
chore: split e2e tests
Jul 25, 2024
3fd11fc
test: set duration timeout to 20 min
Jul 25, 2024
c6b9054
test: fix ddb client region
Jul 25, 2024
e549360
style: add new line to end of file
Jul 25, 2024
fb2993e
test: update test name
Jul 25, 2024
c5e62a6
chore: remove unnecessary schema
Jul 25, 2024
67f550e
test: remove unused test file
Jul 25, 2024
5731e6b
style: sort imports
Jul 25, 2024
15f06e8
docs: add comment on second migration push
Jul 25, 2024
cdb726d
docs: add comment to clarify table retain logic
Jul 25, 2024
8051d3d
Revert "test: undo temp testing changes"
Jul 25, 2024
33ea1b4
test: use configurable stack
Jul 25, 2024
bfe9525
Revert "Revert "test: undo temp testing changes""
Jul 25, 2024
53bb5da
docs: add comment for create assertions
Jul 25, 2024
d516f53
fix: remove unused cdk apps
Jul 26, 2024
5029390
style: run prettier
Jul 30, 2024
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
73 changes: 42 additions & 31 deletions codebuild_specs/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1119,59 +1119,70 @@ batch:
depend-on:
- publish_to_local_registry
- identifier: >-
amplify_table_5_add_resources_single_gsi_single_record_single_gsi_empty_table
amplify_table_5_add_resources_references_migration_many_to_many_migration
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/amplify-table-5.test.ts|src/__tests__/add-resources.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts
CLI_REGION: ap-east-1
src/__tests__/amplify-table-5.test.ts|src/__tests__/add-resources.test.ts|src/__tests__/migration/references-migration.test.ts|src/__tests__/migration/many-to-many-migration.test.ts
CLI_REGION: ap-south-1
depend-on:
- publish_to_local_registry
- identifier: >-
single_gsi_1k_records_single_gsi_10k_records_replace_2_gsis_update_attr_single_record_replace_2_gsis_update_attr_empty_table
base_migration_single_gsi_single_record_single_gsi_empty_table_single_gsi_1k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts
src/__tests__/migration/base-migration.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts
CLI_REGION: ap-northeast-1
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_update_attr_1k_records_replace_2_gsis_update_attr_10k_records_replace_2_gsis_single_record_replace_2_gsis_empty_
single_gsi_10k_records_replace_2_gsis_update_attr_single_record_replace_2_gsis_update_attr_empty_table_replace_2_gsis_update_at
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts
CLI_REGION: ap-northeast-2
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_1k_records_replace_2_gsis_10k_records_3_gsis_single_record_3_gsis_empty_table
replace_2_gsis_update_attr_10k_records_replace_2_gsis_single_record_replace_2_gsis_empty_table_replace_2_gsis_1k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts
CLI_REGION: ap-south-1
depend-on:
- publish_to_local_registry
- identifier: 3_gsis_1k_records_3_gsis_10k_records
- identifier: >-
replace_2_gsis_10k_records_3_gsis_single_record_3_gsis_empty_table_3_gsis_1k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts
CLI_REGION: ap-southeast-1
depend-on:
- publish_to_local_registry
- identifier: 3_gsis_10k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
CLI_REGION: ap-southeast-2
depend-on:
- publish_to_local_registry
- identifier: sql_pg_models
buildspec: codebuild_specs/run_cdk_tests.yml
env:
Expand Down Expand Up @@ -1723,7 +1734,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/static-group-auth/static-group-auth-sqlprimary-sqlrelated-subscriptions-off.test.ts
CLI_REGION: eu-north-1
CLI_REGION: eu-south-1
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_sqlprimary_ddbrelated_subscriptions_off
Expand All @@ -1733,7 +1744,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/static-group-auth/static-group-auth-sqlprimary-ddbrelated-subscriptions-off.test.ts
CLI_REGION: eu-south-1
CLI_REGION: eu-west-1
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_ddbprimary_sqlrelated_subscriptions_off
Expand All @@ -1743,7 +1754,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/static-group-auth/static-group-auth-ddbprimary-sqlrelated-subscriptions-off.test.ts
CLI_REGION: eu-west-1
CLI_REGION: eu-west-2
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_ddbprimary_ddbrelated_subscriptions_off
Expand All @@ -1753,7 +1764,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/static-group-auth/static-group-auth-ddbprimary-ddbrelated-subscriptions-off.test.ts
CLI_REGION: eu-west-2
CLI_REGION: eu-west-3
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_sqlprimary_sqlrelated_subscriptions_off
Expand All @@ -1763,7 +1774,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/dynamic-group-auth/dynamic-group-auth-sqlprimary-sqlrelated-subscriptions-off.test.ts
CLI_REGION: eu-west-3
CLI_REGION: me-south-1
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_sqlprimary_ddbrelated_subscriptions_off
Expand All @@ -1773,7 +1784,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/dynamic-group-auth/dynamic-group-auth-sqlprimary-ddbrelated-subscriptions-off.test.ts
CLI_REGION: me-south-1
CLI_REGION: sa-east-1
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_ddbprimary_sqlrelated_subscriptions_off
Expand All @@ -1783,7 +1794,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/dynamic-group-auth/dynamic-group-auth-ddbprimary-sqlrelated-subscriptions-off.test.ts
CLI_REGION: sa-east-1
CLI_REGION: us-east-1
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_ddbprimary_ddbrelated_subscriptions_off
Expand All @@ -1793,7 +1804,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/subscriptions-off/dynamic-group-auth/dynamic-group-auth-ddbprimary-ddbrelated-subscriptions-off.test.ts
CLI_REGION: us-east-1
CLI_REGION: us-east-2
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_sqlprimary_sqlrelated
Expand All @@ -1803,7 +1814,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/static-group-auth/static-group-auth-sqlprimary-sqlrelated.test.ts
CLI_REGION: us-east-2
CLI_REGION: us-west-1
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_sqlprimary_ddbrelated
Expand All @@ -1813,7 +1824,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/static-group-auth/static-group-auth-sqlprimary-ddbrelated.test.ts
CLI_REGION: us-west-1
CLI_REGION: us-west-2
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_ddbprimary_sqlrelated
Expand All @@ -1823,7 +1834,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/static-group-auth/static-group-auth-ddbprimary-sqlrelated.test.ts
CLI_REGION: us-west-2
CLI_REGION: ap-northeast-1
depend-on:
- publish_to_local_registry
- identifier: static_group_auth_ddbprimary_ddbrelated
Expand All @@ -1833,7 +1844,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/static-group-auth/static-group-auth-ddbprimary-ddbrelated.test.ts
CLI_REGION: ap-northeast-1
CLI_REGION: ap-northeast-2
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_sqlprimary_sqlrelated
Expand All @@ -1843,7 +1854,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/dynamic-group-auth/dynamic-group-auth-sqlprimary-sqlrelated.test.ts
CLI_REGION: ap-northeast-2
CLI_REGION: ap-south-1
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_sqlprimary_ddbrelated
Expand All @@ -1853,7 +1864,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/dynamic-group-auth/dynamic-group-auth-sqlprimary-ddbrelated.test.ts
CLI_REGION: ap-south-1
CLI_REGION: ap-southeast-1
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_ddbprimary_sqlrelated
Expand All @@ -1863,7 +1874,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/dynamic-group-auth/dynamic-group-auth-ddbprimary-sqlrelated.test.ts
CLI_REGION: ap-southeast-1
CLI_REGION: ap-southeast-2
depend-on:
- publish_to_local_registry
- identifier: dynamic_group_auth_ddbprimary_ddbrelated
Expand All @@ -1873,7 +1884,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/group-auth/dynamic-group-auth/dynamic-group-auth-ddbprimary-ddbrelated.test.ts
CLI_REGION: ap-southeast-2
CLI_REGION: ca-central-1
depend-on:
- publish_to_local_registry
- identifier: single_gsi_100k_records
Expand All @@ -1882,7 +1893,7 @@ batch:
compute-type: BUILD_GENERAL1_SMALL
variables:
TEST_SUITE: src/__tests__/deploy-velocity/single-gsi-100k-records.test.ts
CLI_REGION: ap-southeast-2
CLI_REGION: ca-central-1
depend-on:
- publish_to_local_registry
- identifier: replace_2_gsis_update_attr_100k_records
Expand All @@ -1892,7 +1903,7 @@ batch:
variables:
TEST_SUITE: >-
src/__tests__/deploy-velocity/replace-2-gsis-update-attr-100k-records.test.ts
CLI_REGION: ca-central-1
CLI_REGION: eu-central-1
depend-on:
- publish_to_local_registry
- identifier: replace_2_gsis_100k_records
Expand All @@ -1901,7 +1912,7 @@ batch:
compute-type: BUILD_GENERAL1_SMALL
variables:
TEST_SUITE: src/__tests__/deploy-velocity/replace-2-gsis-100k-records.test.ts
CLI_REGION: eu-central-1
CLI_REGION: eu-north-1
depend-on:
- publish_to_local_registry
- identifier: 3_gsis_100k_records
Expand All @@ -1910,7 +1921,7 @@ batch:
compute-type: BUILD_GENERAL1_SMALL
variables:
TEST_SUITE: src/__tests__/deploy-velocity/3-gsis-100k-records.test.ts
CLI_REGION: eu-north-1
CLI_REGION: eu-south-1
depend-on:
- publish_to_local_registry
- identifier: >-
Expand Down
12 changes: 12 additions & 0 deletions packages/amplify-e2e-tests/schemas/many-to-many.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type Post @model @auth(rules: [{ allow: public }]) {
id: ID!
title: String!
content: String
tags: [Tag] @manyToMany(relationName: "PostTags")
}

type Tag @model @auth(rules: [{ allow: public }]) {
id: ID!
label: String!
posts: [Post] @manyToMany(relationName: "PostTags")
}
17 changes: 17 additions & 0 deletions packages/amplify-e2e-tests/schemas/references.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type Primary @model @auth(rules: [{ allow: public }]) {
id: ID! @primaryKey
relatedMany: [RelatedMany] @hasMany(references: "primaryId")
relatedOne: RelatedOne @hasOne(references: "primaryId")
}

type RelatedMany @model @auth(rules: [{ allow: public }]) {
id: ID! @primaryKey
primaryId: String
primary: Primary @belongsTo(references: ["primaryId"])
}

type RelatedOne @model @auth(rules: [{ allow: public }]) {
id: ID! @primaryKey
primaryId: String
primary: Primary @belongsTo(references: ["primaryId"])
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type Todo @model @auth(rules: [{ allow: public }]) {
id: ID!
content: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@aws-amplify/graphql-api-construct": "1.11.2",
"@aws-cdk/aws-cognito-identitypool-alpha": "2.129.0-alpha.0",
"@aws-sdk/client-cognito-identity-provider": "3.338.0",
"@aws-sdk/client-dynamodb": "3.338.0",
"@aws-sdk/client-lambda": "3.338.0",
"@aws-sdk/client-rds": "3.338.0",
"@aws-sdk/client-ssm": "3.338.0",
Expand Down
Loading