Skip to content

Commit

Permalink
Adjust cloud instance hostname derivation (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans authored and fantix committed Feb 9, 2023
1 parent 076e8c8 commit 65c9c37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions edgedb/con_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ def _parse_cloud_instance_name_into_config(
except Exception:
raise errors.ClientConnectionError("Invalid secret key")
payload = f"{org_slug}/{instance_name}".encode("utf-8")
dns_bucket = binascii.crc_hqx(payload, 0) % 9900
host = f"{instance_name}.{org_slug}.c-{dns_bucket:x}.i.{dns_zone}"
dns_bucket = binascii.crc_hqx(payload, 0) % 100
host = f"{instance_name}--{org_slug}.c-{dns_bucket:02d}.i.{dns_zone}"
resolved_config.set_host(host, source)


Expand Down
2 changes: 1 addition & 1 deletion tests/shared-client-testcases

0 comments on commit 65c9c37

Please sign in to comment.