Open penberg opened 12 months ago
@penberg I was thinking that we could remove the --location
flag entirely and update ensureGroup
to be:
func ensureGroup(client *turso.Client, group, version string) error {
if ok, err := shouldCreateGroup(client, group); !ok {
return err
}
location, _ := closestLocation(client)
if err := createGroup(client, group, location, version); err != nil {
return err
}
return client.Groups.WaitLocation(group, location)
}
That way when we magically create a default group we pick the closest region still. Wdyt?
The
turso db create
command silently ignores--location
and instead just adds the database to the default placement group:What it should do is fail the creation and tell people to create a group instead.