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

aws cdk synth results in NEW folder under /tmp every time a command is run, which results to 100% disk space usage over time #29368

Closed
piotrwalczak1 opened this issue Mar 6, 2024 · 3 comments
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@piotrwalczak1
Copy link

Describe the bug

I am using WSL 2 with Ubuntu distro. Every time I run cdk synth, the cdk.out file is saved in /tmp folder. Over time, the user is surprised that he has no space left on the disk. Investigation of this took hours, and finally it occurred that cdk synth saving files to /tmp is the issue.

Expected Behavior

I guess this should have some limit at least if it really do need to save it there.

Current Behavior

Out of disk space over time

Reproduction Steps

Have a project. Run cdk synth 1000 times.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.128.0

Framework Version

No response

Node.js Version

20.x

OS

Ubuntu WSL 2

Language

TypeScript

Language Version

5.1.6

Other information

No response

@piotrwalczak1 piotrwalczak1 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 6, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Mar 6, 2024
@nmussy
Copy link
Contributor

nmussy commented Mar 6, 2024

Would you be able to give us a minimal reproduction application? I am able to get something similar to what you're describing, but only if my stack contains a CustomResources, e.g. BucketDeployment:

$ cdk synth
$ ls -t $TMPDIR | head
cdk-custom-resourceav715a
cdk-custom-resourcenjXTtG

const stagingDirectory = FileSystem.mkdtemp('cdk-custom-resource');
fs.copySync(props.codeDirectory, stagingDirectory, { filter: (src, _dest) => !src.endsWith('.ts') });

@pahud
Copy link
Contributor

pahud commented Mar 6, 2024

yes please share some code snippet. The cdk.out should be created in your cdk project root unless you specify -o to /tmp.

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 6, 2024
Copy link

github-actions bot commented Mar 8, 2024

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants