allow routing sdk traffic through stable envd.<domain> host#2540
allow routing sdk traffic through stable envd.<domain> host#2540matthewlouisbrockman wants to merge 6 commits intomainfrom
Conversation
PR SummaryMedium Risk Overview Reviewed by Cursor Bugbot for commit 650ea47. Bugbot is set up for automated code reviews on this repo. Configure here. |
360075a to
261d28e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit af62891. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af62891747
ℹ️ 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".
| return &orchestratorHost | ||
| } | ||
|
|
||
| domain, ok := strings.CutPrefix(hostname, "envd.") |
There was a problem hiding this comment.
lets put the envd subdomain to a const
| return nil | ||
| } | ||
|
|
||
| orchestratorHost := fmt.Sprintf("%d-%s.%s", port, sandboxID, domain) |
There was a problem hiding this comment.
for envd, we don't need to have the port configurable
so I would either fix the port to specific one, or change the general url

removes the env.islocal() flag from the envd.domain header parsing to allow passing sandbox id and port as headers. client proxy resolves it, then forwards to the orchestrators using the original host format. allows deploying client proxies without redeploying the orchestrators. allows http2 connections to the load balancers to more easily reuse the connection pools and mitigate resource exhaustion on the client.