Why does my app sometimes get deployed to a region that I did not enable?

This happens occasionally and I don’t understand why. I currently have one region for kcd-staging and that’s den, but when I deployed a new version of the app it deployed to lax. I did this in a live stream at about 55 minutes in: Livestream: Work on getting LiteFS running - YouTube in case that’s helpful.

In this specific case I was deploying an entirely different node app on top of an existing fly app. But I’ve experienced this a few times and it’s always very confusing… Any ideas why this happens?

Happened again when trying to deploy a simple app over the top of another one (I’m doing this so I can delete and re-create the volumes without an old version of the app touching the new volumes).

Happened on the same stream at around 2:14.

I’m pretty sure the behavior you’re seeing is related to a known edge-case where a volume is created for an app but is not actually mounted so it doesn’t ‘anchor’ region placement, and so the instance doesn’t have any region constraints and gets placed anywhere.

We’d like to catch this in flyctl and either prevent a deploy from happening in this state, or allow an app with unmounted volumes to instead be constrained by fly regions set. In any case, the current workaround is to either mount any unmounted volume, or delete the volume and use fly regions set to configure region constraints on the app.