Skip to content

fix(stack): force IPv4 resolution for realtime database connection - #6198

Closed
deepshekhardas wants to merge 1 commit into
supabase:developfrom
deepshekhardas:fix/5788-realtime-db-ipv4
Closed

deepshekhardas wants to merge 1 commit into
supabase:developfrom
deepshekhardas:fix/5788-realtime-db-ipv4

Conversation

@deepshekhardas

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks! The linked issue hasn't been marked open-for-contribution yet, so this pull request is being closed automatically.

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.
See CONTRIBUTING.md for the full workflow. Once a maintainer adds the open-for-contribution label to a linked open issue, reopen or open a new pull request and it will be accepted.

@github-actions github-actions Bot closed this Aug 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stack: realtime service cannot run (or be consumed) in docker mode

1 participant