sst / sst

Build full-stack apps on your own infrastructure.
https://sst.dev
MIT License
24.04k stars 1.85k forks source link

Stuck in loop, SST keeps creating new resources #5909

Open meshaabi opened 3 weeks ago

meshaabi commented 3 weeks ago

Hi Folks, I would greatly appreciate some help as i seem to be going around in circles

I initially though i had a stray resource problem because i noticed a large amount of lambdas, apigateways, log groups etc in my aws console. sst remove would lead to nothing, so after a couple of

sst state repair - ( this always reported that no changes were made ) sst refreshes - this arbitrarily sometimes finds the resources and says refreshing sst remove - it says deleting but actually not all resources get removed and i noticed weird behaviour and actually saw that new resources were getting created.

I found this in within the pulumi.log

 -  pulumi:pulumi:Stack example-http-service-esh deleting (0s) warning: Attempting to deploy or update resources with 2 pending operations from previous deployment.
 -  pulumi:pulumi:Stack example-http-service-esh deleted (0.00s) 2 warnings
Diagnostics:
  pulumi:pulumi:Stack (example-http-service-esh):
    warning: using pulumi-language-nodejs from $PATH at /opt/homebrew/bin/pulumi-language-nodejs
    warning: Attempting to deploy or update resources with 2 pending operations from previous deployment.
      * urn:pulumi:esh::example-http-service::sst:aws:ApiGatewayV1$aws:cloudwatch/logGroup:LogGroup::example-http-service-apiAccessLog, interrupted while creating
      * urn:pulumi:esh::example-http-service::sst:aws:ApiGatewayV1LambdaRoute$sst:aws:Function$aws:cloudwatch/logGroup:LogGroup::example-http-service-apiRouteHnvxctHandlerLogGroup, interrupted while creating
    These resources are in an unknown state because the Pulumi CLI was interrupted while waiting for changes to these resources to complete. You should confirm whether or not the operations listed completed successfully by checking the state of the appropriate provider. For example, if you are using AWS, you can confirm using the AWS Console.

    Once you have confirmed the status of the interrupted operations, you can repair your stack using `pulumi refresh` which will refresh the state from the provider you are using and clear the pending operations if there are any.

    Note that `pulumi refresh` will need to be run interactively to clear pending CREATE operations

It seems as though the are some ops stuck in pending state and sst keeps trying to create those resources whenever i run something.

pulumi refresh seems to have an interactive mode to help clear the pending updates so they dont create issues, is there a way to run this via sst ?

please help! 😭

meshaabi commented 3 weeks ago

Possibly related to this Issue

ekrata-main commented 1 week ago

experiencing this too