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

chore: migrate pg array objects e2e test in gen2 cdk #2906

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Siqi-Shan
Copy link
Member

@Siqi-Shan Siqi-Shan commented Sep 25, 2024

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

  • PR description included
  • yarn test passes
  • E2E test run linked
  • Tests are changed or added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Siqi-Shan Siqi-Shan marked this pull request as ready for review September 27, 2024 17:28
@Siqi-Shan Siqi-Shan requested a review from a team as a code owner September 27, 2024 17:28
@Siqi-Shan
Copy link
Member Author

Siqi-Shan commented Sep 27, 2024

[Resolved] Running into the same bootstrap issue in CI that blocks the E2E test running.

phani-srikar
phani-srikar previously approved these changes Oct 1, 2024
} = options);
const { projFolderName, connectionConfigName } = options;

const templatePath = path.resolve(path.join(__dirname, '..', '__tests__', 'backends', 'sql-models'));
Copy link
Member

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.

Copy link
Member Author

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 individual UserPool. Plus, AmplifyAuth provides a convenient way of managing auth-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 called createIAMIdentityPool 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.

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