this seems like a recurring problem with SST/CDK `...
# help
s
this seems like a recurring problem with SST/CDK
Copy code
❌  prod-microservices-api-reels failed: Export prod-microservices-api-reels:ExportsOutputRefRouteGETprivatereelsreelIdHttpIntegration860f00925152f0afcca0fe4a6d60923aEAD0C534B4770FD9 cannot be deleted as it is in use by prod-microservices-api-public
when I make certain changes (usually deletions) to parts of a stack where one depends on another, this happens. and this time it’s not clear to me how to fix it.. not sure what value to export from
api-reels
I just removed both the
api-public
and
api-reels
stacks and redeployed 😏 still no biggie since we haven’t launched yet
f
Oh damn.. would it help if SST helped “decrypting”
ExportsOutputRefRouteGETprivatereelsreelIdHttpIntegration860f00925152f0afcca0fe4a6d60923aEAD0C534B4770FD9
?
It seems another stack was referencing the handler function for route
GET /private/reels/{reelId}
? (guessing from the gibberish)
s
yeah it’s hard to say. any kind of “decrypting” would be useful for sure. in this case, though, it looks like an HTTP API integration, which is probably constructed internally by SST. so I dunno how I would’ve exported that to retain it 🤔
I think when changing or removing routes, I have to be more careful and do it in small steps, with deploys to production in between those steps
a
I had similar issue before.
Somehow CDK or SST created some dependencies which weren’t clear on the TS code, I mean, weren’t created intentionally.
f
hmm.. just to clarify, CDK/SST creates export/import dependencies ONLY if you are sharing things (ie. a construct) between stacks.
The confusion is often who is dependent on who. For example, u create an Api in
stackA
, and u create a Table in
stackB
, and u call
api.attachPermissions([db])
, it’s not clear if
stackA
depends on
stackB
or vice versa.
It’s pretty annoying issue SST needs to solve, but no dependency should be created if nothing is shared across stack.
Is that what you guys are seeing too?
s
yeah, it’s cross-stack dependencies where I see this come up
j
@Frank do we have an issue for making this error message easier to understand? I’ve run into this quite a bit too.
f
Oh yeah my negligence, opened an issue here https://github.com/serverless-stack/serverless-stack/issues/787