encoredev / encore

Open Source Development Platform for building robust type-safe distributed systems with declarative infrastructure
https://encore.dev
Mozilla Public License 2.0
7.73k stars 327 forks source link

Removing DB that was used to initialise app results in deployment getting stuck #1544

Closed echarrod closed 2 weeks ago

echarrod commented 2 weeks ago

Hey team πŸ‘‹

Loving Encore! I just encountered an issue when trying to delete some resources that I'm not using from https://app.encore.dev/myapp-xxxx/envs/staging/infra.

17:18:53.400ZDBG Waiting on batch apply of SQL Database (board): failed to borrow db pool: failed to borrow connection: failed to borrow connection: failed to connect to host=ep-quiet-flower-a267s4gv.eu-central-1.aws.neon.tech user=encore_superuser_5ec2b23e database=board: dial error (dial tcp [2a05:d014:aa3:7a20:baca:a828:c69b:8952]:5432: connect: network is unreachable) 17:18:57.185ZERR Unexpected failure - Infrastructure change failed error="run task failed: failed to batch apply: failed to borrow db pool: failed to borrow connection: failed to borrow connection: failed to connect to host=ep-quiet-flower-a267s4gv.eu-central-1.aws.neon.tech user=encore_superuser_5ec2b23e database=card: dial error (dial tcp [2a05:d014:aa3:7a20:baca:a828:c69b:8952]:5432: connect: network is unreachable)"

board and card are the databases I started with, I think it was from the URL shortener example app?

If I'm unable to successfully delete it, is there a way I can restore it at least, so I can deploy again?

I tried to download the full log to share here, but the resulting file has 0 bytes, so think something is going wrong there too 😒

echarrod commented 2 weeks ago

I managed to fix this by recreating a new environment from this existing environment, which just omitted creating the DBs I wanted to delete