<@U01JF8FLNKZ> are there any guides on dependencie...
# help
j
@Seth Geoghegan are there any guides on dependencies between stacks and behavior when there are failures? my app has several stacks: Api, Auth, DB, etc. when I deploy a new “copy” of my stack (e.g. dev/staging/prod) I have to deploy 10 times to get it to work, each time one more stack succeeds then the last time until all succeed I suspect this is because the stack are dependent on each other but my CloudFormation doesn’t have the dependencies mapped properly so it doesn’t get the order of operations right but this also concerns me because with CloudFormation my deployments were all or no successful and rolled back to successful state if anything went wrong. Now I’m afraid I”m getting into partial deployment states where things will be broken
s
That sounds frustrating. I wonder why the stacks are failing intermittently? You may be interested in the documentation about cross stack references
But I suppose it depends on the specific issue you are facing. You definitely should not need to deploy so many times!
j
interesting, thanks so much! This is super helpful
f
Thanks @Seth Geoghegan!
@Jeff Hanna usually when you pass something created in 1 stack (stackA) to another stack (stackB), behind the scene a CFN export is created in stackA, and stackB imports that.
And SST will automatically deploy stackB AFTER stackA.
Next time you when you deploy to a new stage and run into the errors, feel free to post them in here.
j
absolutely! First I’ll refactor what we’ve got based on the advice here and see if properly cross-referencing fixes my issues
I am facing another issue that I think might be related I’m trying to restore my serverless aurora cluster from a snapshot as a pre-launch exercise to make sure we can recover from a disaster it seems like the CDK version that the latest SST is compatible with doesn’t support this, but I was able to get it working with an escape hatch under the hood restoring actually creates a new serverless cluster from the snapshot, and my deployment is complaining that the cluster can’t be destroyed because it is in use. I’m guessing that properly cross-referencing will fix that right?
you guys rock! thank you so much. cross-referencing fixed my order of operations issues but I am still stuck on the serverless cluster restoring.. will pull out to main channel to get some visibility and see if anyone can help