Skip to content

enable http2 for js sdk envd rpc/api traffic#1311

Open
matthewlouisbrockman wants to merge 17 commits intomainfrom
js-http2
Open

enable http2 for js sdk envd rpc/api traffic#1311
matthewlouisbrockman wants to merge 17 commits intomainfrom
js-http2

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman commented May 2, 2026

image

Enables HTTP/2 for JS SDK sandbox envd traffic in Node by routing envd RPC/API requests through undici with an HTTP/2-enabled dispatcher.

Non-Node runtimes continue to use global fetch. Management API and volume clients are unchanged.

Requires bumping node from >=20 to >= 20.18.1 for undici

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 2, 2026

🦋 Changeset detected

Latest commit: 3f793cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
e2b Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor
Copy link
Copy Markdown

cursor Bot commented May 2, 2026

PR Summary

Medium Risk
Moderate risk because it changes the transport layer for all sandbox envd RPC/API calls in Node and adds a new HTTP client dependency; regressions would show up as request/streaming failures or connection leaks under load.

Overview
This PR switches JS SDK sandbox envd RPC and REST calls (in Node only) to use undici with an HTTP/2-enabled dispatcher, while non-Node runtimes keep using global fetch.

It also raises the minimum supported Node version to >=20.18.1, adds tests for the new fetch wrapper behavior, and introduces a potential lifecycle concern since the created Agent dispatchers are cached and never explicitly closed.

Reviewed by Cursor Bugbot for commit 3f793cd. Bugbot is set up for automated code reviews on this repo. Configure here.

@matthewlouisbrockman matthewlouisbrockman changed the title enable http2 for envd rpc/api traffic enable http2 for js sdk envd rpc/api traffic May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Package Artifacts

Built from 4b07ba5. Download artifacts from this workflow run.

JS SDK (e2b@2.19.5-js-http2.0):

npm install ./e2b-2.19.5-js-http2.0.tgz

CLI (@e2b/cli@2.10.2-js-http2.0):

npm install ./e2b-cli-2.10.2-js-http2.0.tgz

Python SDK (e2b==2.20.3+js-http2):

pip install ./e2b-2.20.3+js.http2-py3-none-any.whl

Copy link
Copy Markdown

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

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: 6b27786a1a

ℹ️ 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".

Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/envd/http2.ts Outdated
Comment thread packages/js-sdk/src/sandbox/index.ts
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c6ef2d7. Configure here.

Comment thread packages/js-sdk/src/sandbox/index.ts
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.

1 participant