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: parallelize account and resource cleanup for e2e testing #478

Merged
merged 1 commit into from
May 26, 2022

Conversation

alharris-at
Copy link
Contributor

@alharris-at alharris-at commented May 25, 2022

Description of changes

Parallelize cleanup both across all accounts simultaneously, and across all resources of a given type at once. This requires configuring all AWS clients with an explicit account and region (except s3, which is global), so there's a bit of a refactor to pass account and regional info all the way down to client construction.

Because logs are all jumbled up now, I've added an accountIndex to each output per-account. Accounts were already opaque, but this way we can at least correlate errors, etc. within an account.

E.g.

[ACCOUNT 5] Deleting S3 Bucket amplify-e02de3f283b84aa5ab02-integtest-210400-deployment
[ACCOUNT 1] Deleting S3 Bucket amplify-iterativetest1-integtest-210353-deployment
[ACCOUNT 5] Deleting CloudFormation stack amplify-auth22dc3507d274a102-integtest-211220
[ACCOUNT 1] Deleting S3 Bucket amplify-a0b27ac02ef4470ab089-integtest-210407-deployment
[ACCOUNT 1] Deleting App lambdaauthenv(dyknllcal7gvg)
[ACCOUNT 1] Cleanup done!
[ACCOUNT 2] Deleting CloudFormation stack amplify-model2dc3507d2f4f1d0-integtest-211447
[ACCOUNT 3] Deleting CloudFormation stack amplify-simplemodel-devtest-204508
[ACCOUNT 4] Deleting CloudFormation stack amplify-deletekeys-integtest-210345
[ACCOUNT 3] Deleting CloudFormation stack amplify-auth32dc3507d2dee8ae-integtest-211423
[ACCOUNT 2] Deleting S3 Bucket amplify-model2dc3507d2f4f1d0-integtest-211447-deployment
[ACCOUNT 4] Deleting S3 Bucket amplify-deletekeys-integtest-210345-deployment
[ACCOUNT 2] Deleting CloudFormation stack amplify-auth52dc3507d25bcf05-integtest-211316
[ACCOUNT 4] Deleting S3 Bucket amplify-817596ddeff44deb970a-integtest-210330-deployment
[ACCOUNT 4] Deleting CloudFormation stack amplify-removeaddconnection-integtest-210951
[ACCOUNT 5] Deleting S3 Bucket amplify-auth22dc3507d274a102-integtest-211220-deployment
[ACCOUNT 5] Deleting CloudFormation stack amplify-auth42dc3507d267ecf7-integtest-211058

Issue #, if available

N/A

Description of how you validated changes

Ran yarn setup-dev && yarn test, and then manually ran cleanup.

Checklist

  • PR description included
  • yarn test passes

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

@alharris-at alharris-at requested a review from a team May 25, 2022 22:15
@alharris-at alharris-at requested a review from a team as a code owner May 25, 2022 22:15
@alharris-at alharris-at merged commit d471d0f into main May 26, 2022
@alharris-at alharris-at deleted the parallelize-e2e-cleanup branch May 26, 2022 00:05
@alharris-at alharris-at mentioned this pull request Jun 4, 2022
5 tasks
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.

None yet

1 participant