Repository navigation
fix(stack): force IPv4 resolution for realtime database connection - #6198
deepshekhardas wants to merge 1 commit into
Conversation
|
👋 Thanks! The linked issue hasn't been marked A maintainer adds that label once an issue is triaged and ready to be worked on. Please wait for the label before opening a pull request. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bc746b2b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } from "./storage.ts"; | ||
| import { makeStudioServiceDocker } from "./studio.ts"; | ||
| import { makeVectorServiceDocker } from "./vector.ts"; | ||
| import { makeRealtimeServiceDocker } from "./realtime.ts"; |
There was a problem hiding this comment.
Remove the duplicate realtime import
With this second makeRealtimeServiceDocker import, the test module declares the same ESM binding twice, so the file fails to parse with Identifier 'makeRealtimeServiceDocker' has already been declared before any stack unit tests can run. This blocks the changed workspace's unit suite until the added duplicate import is removed.
Useful? React with 👍 / 👎.
| encryptionKey: "12345678901234567890123456789012", | ||
| secretKeyBase: "1234567890123456789012345678901234567890123456789012345678901234", | ||
| maxHeaderLength: 4096, | ||
| networkArgs: [...LINUX_HOST_GATEWAY_ARGS, "-p", "54331:54331"], |
There was a problem hiding this comment.
Use the service's actual platform option in the new test
After the duplicate import is fixed, this added test still cannot execute because LINUX_HOST_GATEWAY_ARGS is not defined anywhere in this file, and networkArgs is not an accepted option for makeRealtimeServiceDocker; the service expects platformOs. In this scenario the unit test either throws before building the service or, if forced past typing, fails to exercise the Linux networking path it is trying to model.
Useful? React with 👍 / 👎.
Fixes #5788
Realtime fails to connect to the local Postgres instance on hosts where Docker resolves \host.docker.internal\ to IPv6 first. Set \DB_IP_VERSION=ipv4\ on the realtime container so it always connects over IPv4.