(@aws-cdk/integ-tests-alpha): (spawnSync cdk ENOENT on Windows)
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the bug
When running the integ-test module on a Windows 11 machine the following error gets logged:
`Integration test failed: Error: spawnSync cdk ENOENT`
I have attempted this on two Windows 11 machines, both having Docker and esbuild installed, as well as the windows-latest running on Github Actions.
I have also tested running it on an Ubuntu-based Github action, as well as running it with WSL, where the error is not present either.
_See this discussion for another person having the same issue https://github.com/aws/aws-cdk/discussions/25274_
### Expected Behavior
The IntegTest running as it does on a Linux machine.
### Current Behavior
```
> cdk-integ-tests-sample@0.1.0 integ-test D:\a\cdk-integ-tests-sample\cdk-integ-tests-sample
> integ-runner --directory ./integ-tests --parallel-regions us-east-1 --update-on-failed
Verifying integration test snapshots...
NEW integ.sns-sqs-ddb 4.051s
Snapshot Results:
Tests: 1 failed, 1 total
Running integration tests for failed tests...
Running in parallel across regions: us-east-1
Running test D:\a\cdk-integ-tests-sample\cdk-integ-tests-sample\integ-tests\integ.sns-sqs-ddb.js in us-east-1
FAILED integ.sns-sqs-ddb-DataFlowTest/DefaultTest (undefined/us-east-1) 3.533s
Integration test failed: Error: spawnSync cdk ENOENT
Test Results:
Tests: 1 failed, 1 total
Error: Some integration tests failed!
at main (D:\a\cdk-integ-tests-sample\cdk-integ-tests-sample\node_modules\@aws-cdk\integ-runner\lib\index.js:1036[7](https://github.com/MaximilianSchon/cdk-integ-tests-sample/actions/runs/5061372221/jobs/9085491934#step:6:8):[15](https://github.com/MaximilianSchon/cdk-integ-tests-sample/actions/runs/5061372221/jobs/9085491934#step:6:16))
```
### Reproduction Steps
https://github.com/MaximilianSchon/cdk-integ-tests-sample
See Github Action for execution.
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.7.8
### Framework Version
_No response_
### Node.js Version
v16.6.1
### OS
Windows (11)
### Language
Typescript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start at the integ-runner entry point shown in node_modules/@aws-cdk/integ-runner/lib/index.js:1036 and reproduce the sample repository's Windows GitHub Action failure. Compare the Windows and Ubuntu runs around the `spawnSync cdk ENOENT` error; done means the integ test completes successfully on Windows as it does on Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100