edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
369 stars 45 forks source link

Cloud instance name should allow leading numerics #420

Closed fantix closed 1 year ago

fantix commented 1 year ago

1st1/test or fantix/1st1test should be accepted as valid instance names.

zackelan commented 1 year ago

this has an unofficial but legit-looking regex for org slug. the "no consecutive hyphens" and "can't start or end with a hyphen" requirements may not be relevant for our regex because we shouldn't ever see a Github user with that name...but it does mean that we can safely treat -- as an internal DNS name separator because it will never appear in a org name.

I think cloud & local instance names should have identical requirements unless there's a very good reason to make them separate. if I have a local instance and want to migrate it to be hosted in the cloud, it would be annoying friction to be required to make up a new instance name as well

fantix commented 1 year ago

I think cloud & local instance names should have identical requirements unless there's a very good reason to make them separate. if I have a local instance and want to migrate it to be hosted in the cloud, it would be annoying friction to be required to make up a new instance name as well

With the updates from the discussion, this is not valid any more because: 1) Local instance names may have underscores _ and we don't want to narrow down the existing limit 2) Cloud instance names must not have underscores

The best we can do now is to allow single dashes - in local instance names like the cloud names (and leave underscores be).