Skip to content

v0.10.0-dev.6

@AmanVarshney01 AmanVarshney01 tagged this 20 Aug 12:45
* fix(dev-emulators): read class-shaped Prisma Dev registry

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>

* test(dev-emulators): pin registry scan options

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>

* fix(dev-emulators): exempt the own-name record from registry port exclusion, scan per attempt

Review follow-ups on the class-shaped registry fix:

- Skip the record named for the requesting instance: @prisma/dev exempts a
  server's own record from port validation and prefers to reuse its ports,
  so excluding them moved a persisted database off its recorded port
  whenever the daemon's own state was lost while the record survived.
- Scan inside the serialized section, once per attempt, so retries see the
  claims a sibling's queued start just recorded instead of a stale snapshot.
- Log the two silent-degradation paths (no usable ServerState.scan; scan
  failure) to the daemon's stdio log — an unread registry was previously
  indistinguishable from an empty one, which is how the original guard bug
  shipped undetected.
- Type the parameter as RegistryScanHost instead of unknown.
- Share portOfUrl and isStringKeyedRecord from prisma-dev-registry.ts
  instead of keeping byte-identical copies in postgres-main.ts.
- Drop the top-level streamsPort key: no real record carries it
  (serverDumpV1Schema has three port fields; the streams port lives only in
  experimental.streams.serverUrl), and the test no longer fabricates it.
- Cover the guard-reject branch and the own-record exemption in tests.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

---------

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-authored-by: willbot <w.a.madden+machine@gmail.com>
Assets 2
Loading