-
Notifications
You must be signed in to change notification settings - Fork 76
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
chore: migrate pg array objects e2e test in gen2 cdk #2906
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kevin Shan <[email protected]>
Signed-off-by: Kevin Shan <[email protected]>
Signed-off-by: Kevin Shan <[email protected]>
[Resolved] Running into the same bootstrap issue in CI that blocks the E2E test running. |
Signed-off-by: Kevin Shan <[email protected]>
…ray-objects-e2e-test
Signed-off-by: Kevin Shan <[email protected]>
packages/amplify-graphql-api-construct-tests/src/__tests__/sql-pg-array-objects.test.ts
Show resolved
Hide resolved
} = options); | ||
const { projFolderName, connectionConfigName } = options; | ||
|
||
const templatePath = path.resolve(path.join(__dirname, '..', '__tests__', 'backends', 'sql-models')); |
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.
Now or in the next PR: Can we migrate this test to use the configurable stack so we can (eventually) remove the sql-models
stack? Eventually I'd like us to be using just one stack to reduce the number of test fixtures we have to maintain.
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.
My thoughts of using an universal configurable-stack
:
- It's totally feasible to have all tests depends on a single stack with every test defines the specific parameter through various command
json
files, but more time-consuming than have individual CDK per test; - This requires expansion of current configurable stack functionalities, including support of other authorization modes like OIDC, IAM, etc., and the shift to
AmplifyAuth
construct from individualUserPool
. Plus,AmplifyAuth
provides a convenient way of managingauth
-related resources; - Another way of supporting different resources requirements of tests is to through more helper functions instead of a centralized provider like
AmplifyAuth
based on command files parameters, e.g. when the test is about IAM, then a helper calledcreateIAMIdentityPool
is applied to provision the resource; - Reducing the number of CDK related files to one stack will benefit maintaining the fixtures, and may need breaking and larger scale changes in current
configurable-stack
, which may lead to redesign of some of the tests' resources provision.
I could try to utilize the configurable-stack
to provision the resources, and figure if OIDC could be supported as well for better management over the test fixtures.
packages/amplify-graphql-api-construct-tests/src/utils/sql-crudl-helper.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Kevin Shan <[email protected]>
Signed-off-by: Kevin Shan <[email protected]>
Description of changes
Migrate the Gen1 rds-pg-array-objects E2E test to Gen2 using CDK construct, with pre-provision of resources and generic operations. Plus minor fix/change on resource pre-provision process and CDK init.
CDK / CloudFormation Parameters Changed
Issue #, if available
Description of how you validated changes
CI checks and local pre-provision RDS clusters.
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.