sparse-intern-71089
01/13/2022, 12:59 AMlemon-agent-27707
01/13/2022, 2:58 AMlemon-agent-27707
01/13/2022, 2:59 AMaws:skipMetadataApiCheck false
most-lighter-95902
01/13/2022, 3:34 AMmost-lighter-95902
01/13/2022, 3:34 AMmost-lighter-95902
01/13/2022, 5:10 AMres.json({ success: true})
from my express server, it returns fine, but when using Pulumi Automation, I get upstream request timeout
as a response with 504 error code even though the stack update has been completed successfully.most-lighter-95902
01/13/2022, 5:11 AMconst upRes = await stack.up({ onOutput: <http://console.info|console.info> })
console.log('stack upRes', upRes)
res.json({
outputs: upRes.outputs,
})
most-lighter-95902
01/13/2022, 5:12 AMupstream request timeout
most-lighter-95902
01/13/2022, 5:12 AMlemon-agent-27707
01/13/2022, 5:26 AMlemon-agent-27707
01/13/2022, 5:27 AMmost-lighter-95902
01/13/2022, 5:58 AMmost-lighter-95902
01/14/2022, 12:07 AMlemon-agent-27707
01/14/2022, 12:31 AMlemon-agent-27707
01/14/2022, 12:32 AMmost-lighter-95902
01/14/2022, 12:40 AMupRest.outputs
, return values inside it? I’ll try thatmost-lighter-95902
01/14/2022, 5:27 AMmost-lighter-95902
01/14/2022, 5:27 AMmost-lighter-95902
01/14/2022, 7:25 PMstack.up().then(upRes => // do something with upRes here))
) and then the server crashes (or I do another push and it restarts) mid-process, will the then
still run?most-lighter-95902
01/14/2022, 7:27 PMawait stack.outputs()
) to check the status instead? Does it even return the status?lemon-agent-27707
01/14/2022, 7:44 PMthen
will not run.
Generally it is best to avoid canceling inflight updates. It can leave dangling resources and inconsistencies in your state file. You can cancel
a stack, and remove any pending operations by running export
and import
and then refreshing the stack to get the latest state of resources.
My recommendation would be to architect your system in such a way that updates can run to completion even when you do a deployment. A queue/worker might make it easier to enable this.most-lighter-95902
01/15/2022, 5:38 AMmost-lighter-95902
01/15/2022, 5:52 AM