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

Add support for running more than one test simultaneously on awscdk #3750

Closed
tsuf239 opened this issue Aug 9, 2023 · 3 comments · Fixed by #4654
Closed

Add support for running more than one test simultaneously on awscdk #3750

tsuf239 opened this issue Aug 9, 2023 · 3 comments · Fixed by #4654
Assignees
Labels
☁️ aws Related to Amazon Web Services support 🌧️ cloud-coverage Related to the cloud coverage project ✨ enhancement New feature or request 🎨 sdk SDK

Comments

@tsuf239
Copy link
Contributor

tsuf239 commented Aug 9, 2023

Feature Spec

following #3723
it seems like the test mechanism for awscdk doesn't support running multiple tests at once,
for example, when running: wing test -t awscdk examples/tests/sdk_tests/function/*.w (runs 4 tests at once)
it compiles well, but then throws many of those errors:

Command failed: cdk deploy --require-approval never --ci true -O ./output.json --app . 

 ❌  stack failed: AlreadyExistsException: ChangeSet cdk-deploy-change-set cannot be created due to a mismatch with existing attribute ClientToken
    at Request.extractError (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:46430)
    at Request.callListeners (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:89985)
    at Request.emit (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:89433)
    at Request.emit (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:196191)
    at Request.transition (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:189743)
    at AcceptorStateMachine.runTo (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:154615)
    at /opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:154945
    at Request.<anonymous> (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:190035)
    at Request.<anonymous> (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:196266)
    at Request.callListeners (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:321:90153) {
  code: 'AlreadyExistsException',
  time: 2023-08-09T09:28:51.969Z,
  requestId: 'dd2caf07-0b6a-402a-801a-e660215766ae',
  statusCode: 400,
  retryable: false,
  retryDelay: 109.94840449062337
}

Use Cases

testing

Implementation Notes

No response

Component

CLI

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@tsuf239 tsuf239 added the ✨ enhancement New feature or request label Aug 9, 2023
@tsuf239 tsuf239 changed the title add support for support running more than one test at once on awscdk Add support for support running more than one test at once on awscdk Aug 9, 2023
@monadabot monadabot added this to Wing Aug 9, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Aug 9, 2023
@staycoolcall911 staycoolcall911 changed the title Add support for support running more than one test at once on awscdk Add support for running more than one test simultaneously on awscdk Aug 9, 2023
@staycoolcall911 staycoolcall911 moved this from 🆕 New - not properly defined to 🤝 Backlog - handoff to owners in Wing Aug 9, 2023
@Chriscbr Chriscbr added the ☁️ aws Related to Amazon Web Services support label Aug 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions github-actions bot added the Stale label Oct 9, 2023
@tsuf239 tsuf239 added the 🌧️ cloud-coverage Related to the cloud coverage project label Oct 23, 2023
@marciocadev
Copy link
Collaborator

marciocadev commented Oct 23, 2023

When creating a stack with the AWS CDK, it's necessary to set the environment variable CDK_STACK_NAME. This variable is causing a problem when trying to execute multiple tests simultaneously.

@marciocadev marciocadev self-assigned this Oct 23, 2023
@mergify mergify bot closed this as completed in #4654 Oct 25, 2023
mergify bot pushed a commit that referenced this issue Oct 25, 2023
When creating a stack with the AWS CDK, it's necessary to set the environment variable CDK_STACK_NAME. This variable is causing a problem when trying to execute multiple tests simultaneously.

The solution I found was to capture this variable and concatenate it with the filename. This way, each stack will be named for deployment when running tests in the format:

CDK_STACK_NAME + "-" + file name

Closes #3750 

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@github-project-automation github-project-automation bot moved this from 🤝 Backlog - handoff to owners to ✅ Done in Wing Oct 25, 2023
revitalbarletz pushed a commit that referenced this issue Oct 25, 2023
When creating a stack with the AWS CDK, it's necessary to set the environment variable CDK_STACK_NAME. This variable is causing a problem when trying to execute multiple tests simultaneously.

The solution I found was to capture this variable and concatenate it with the filename. This way, each stack will be named for deployment when running tests in the format:

CDK_STACK_NAME + "-" + file name

Closes #3750 

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.41.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☁️ aws Related to Amazon Web Services support 🌧️ cloud-coverage Related to the cloud coverage project ✨ enhancement New feature or request 🎨 sdk SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants