(@aws-cdk/aws-gamelift-alpha): Build Construct uploading files with 0 bytes
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
SIM - V1081677033
Customer is using the construct Build[1] but however , the stack is successful but it uploads the file with 0 bytes. When we create the build via the CLI , it was able to successfully build and we were able to see the build file size with actual size. Below is the sample code snippet
```
const b1 = new gf.Build(this,'samplebuild',{
buildName: 'sample-build',
operatingSystem: gf.OperatingSystem.AMAZON_LINUX_2,
content: gf.Content.fromAsset(path.join(__dirname, 'docker')),
buildVersion: '1.0.0',
})
```
CX tried to upload Gamelift builds include:
Uploading a folder directly from my PC using Content.from_asset
Uploading a zip file directly from my PC using Content.from_asset
Uploading a zip file from an S3 bucket using Content.from_bucket
All of these result in a build being created in Gamelift of 0 size.
[1] https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-gamelift-alpha.Build.html#rolespan-classapi-icon-api-icon-experimental-titlethis-api-element-is-experimental-it-may-change-without-noticespan
[2] https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-gamelift-alpha/lib/build.ts
### Expected Behavior
It should be uploaded successfully
### Current Behavior
Using fromAsset(), data is not uploaded
### Reproduction Steps
```
const b1 = new gf.Build(this,'samplebuild',{
buildName: 'sample-build',
operatingSystem: gf.OperatingSystem.AMAZON_LINUX_2,
content: gf.Content.fromAsset(path.join(__dirname, 'docker')),
buildVersion: '1.0.0',
})
```
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.103.0 (build d0d7547)
### Framework Version
_No response_
### Node.js Version
v18
### OS
Mac
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start with packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts and reproduce the issue using the provided TypeScript example with Content.fromAsset(). Compare the construct's upload behavior with the CLI and the fromBucket cases; done means a GameLift build contains the supplied files at their actual size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100