-
Notifications
You must be signed in to change notification settings - Fork 4k
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: Asset publishing fails every second time #24298
Comments
We've noticed the same issue with one of our CDK apps, which deploys a big amount of lambdas. |
Can you run your |
Here's another bit of information which might help - I tried to deploy changes only in one substack (with sst one can target substacks individually) and this worked perfectly. |
It's an interesting though. Something like that might well be the case. Looking at the code the promise appears to be awaited correctly though aws-cdk/packages/cdk-assets/lib/private/archive.ts Lines 15 to 16 in fb67c77
Would you be able to post the verbose output for one of the successful second runs? |
Unfortunately I can't figure out how to "force" SST to use a newer CDK build. I created a post in SST's discord for this issue and hope that there is a simple way to test this out. |
Yeah that's something you will have to take up with SST unfortunately. :(
I basically want to confirm what happens on the second run. Is the previously failing asset in question (identifiable by the hash) loaded from cache, or does building suddenly work. If loaded from cache there would be a message in gray prefixed with
Not sure what your requirements are. My DMs are open on cdk.dev though. I'm |
Based on the other issue, it might also help to disable concurrency. That would make everything slower though. |
So, we found a way to force SST to use the newer CDK (by using package.json overrides) and yes the problem is gone. So now we need to find out if and how fast SST will update it's dependency and if we continue to use it or decide to use CDK directly. |
That's excellent news. Will be good to know what SST comes back with, but overrides might be a workable solution either way. Closing this issue here. |
|
Describe the bug
Hello,
We are using CDK with SST as a higher level wrapper. One of our SST Apps consists of seven stacks - the whole thing builds up a pretty huge and parallelized step function which calls many lambda functions which itself do different machine learning stuff. Now when deploying one or several of the stacks suddenly starts failing. And this is the strange part - when the deployment is executed again, then it works. Next time - fails. Then works again.
Expected Behavior
Previously everything worked perfectly. We already suspected that the issue might be the number of resources of the stack, so we split some of the stacks to several smaller stacks but this also didn't help.
Current Behavior
Here is the screenshot of the error (private parts blacked out):
Unfortunately the error message is not helpful at all, atm I have no clue what the reason for the failures is and how to fix it. I tried to delete the .build folder after each build, but it doesn't help. I'm using SST 1.18.4, CDK 2.50.0 on Node 16.13.1. I tried switching to node 18 but it also didn't help.
Reproduction Steps
Simply running
npx sst deploy
triggers the CDK build and the build fails every second time.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.50.0
Framework Version
No response
Node.js Version
16.13.1
OS
Ubuntu 20.04 (WSL2@Win11)
Language
Typescript, Python
Language Version
Python 3.9,
Other information
Any hint or suggestion would be very appreciated since we need to meet a deadline and this issue is a hard blocker for us right now.
Regards,
Alfred
The text was updated successfully, but these errors were encountered: