tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
215 stars 35 forks source link

CLI suggests running 'db replicate' to fix a partially create database #566

Open penberg opened 1 year ago

penberg commented 1 year ago

If you, for example, cancel turso db create command before it managed to spawn an instance, you will end up with a database that you cannot connect to. Some of the commands suggest running db replicate to remedy the situation, but this is confusing. Let's do a db doctor, db create --fix or similar command instead to make it explicit that you're repairing a broken database.

athoscouto commented 1 year ago

Let's not show broken databases to users instead.

When they list databases, let's hide the ones without instances. When they create one that exists but has no instances, we just create the instance in the existing app.

Then we fix the problem on our side, instead of giving this responsibility to the user.

CodingDoug commented 1 year ago

If we choose not to list broken databases, we'd have to make sure that a broken database doesn't count against the quota (or they can destroy the broken database manually), otherwise a user could find themselves into a situation where they are stuck with no way of moving forward on their own, and no way to even observe or diagnose the problem.