Skip to content

chore(templates): move the desktop template into the monorepo - #1960

Draft
devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1791475688-move-desktop-template
Draft

devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1791475688-move-desktop-template

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the desktop sandbox template from e2b-dev/desktop/template to templates/desktop, next to base and httpbin, and folds its CI (template.yml there) into templates.yml.

CI (templates.yml):

  • new desktop option in the workflow_dispatch dropdown (also built by all)
  • new push trigger on main for templates/desktop/** / the workflow file — keeps the old auto-rebuild behavior; only buildDesktopTemplate runs on push (buildTemplate now gates on inputs.template ∈ {all, base, httpbin})
  • buildDesktopTemplate does what the old workflow did: build_docker.py | docker buildx build --push → $DOCKERHUB_USERNAME/desktop:latest, then build_prod.py (alias desktop) with secrets.E2B_API_KEY

Tests (sdk_tests.yml, production jobs) — template changes are now tested before they ship:

  • new desktop_template path filter (templates/desktop/**, desktop_template_*.yml, sdk_tests.yml); templates/desktop/** also triggers the desktop_js / desktop_python suites
  • desktop-template → desktop_template_build.yml: build_ci.py builds the template as desktop-ci-<run_id>-<run_attempt>
  • desktop-js-tests / desktop-python-tests get it as E2B_TESTS_TEMPLATE; the test fixtures use E2B_TESTS_TEMPLATE || 'desktop', so when the template didn't change (build job skipped) they keep running against the published desktop
  • desktop-template-cleanup → desktop_template_cleanup.yml: e2b template delete -y <name> with always(), by name so it also cleans up after failed tests/builds
  • staging jobs are unchanged (published desktop)

Fix in .github/actions/build-cli: it now builds packages/js-sdk (whose prebuild builds @e2b/dockerfile-utils) before the CLI. Since #1936 the CLI's tsc fails without it (Cannot find module '@e2b/dockerfile-utils'), so the action was broken on main — this also affected the base / httpbin jobs in templates.yml.

Template code is unchanged except:

  • no own pyproject.toml/uv.lock/.python-version: scripts run in packages/python-sdk's uv env (uv run --project ../../packages/python-sdk python build_prod.py), so the template is built with the in-repo SDK (like base with the in-repo CLI) and there's no extra lockfile to relock on releases
  • file_context_path is resolved relative to template.py instead of the CWD
  • deprecated alias= → positional name

Desktop SDK READMEs now link here. The removal from e2b-dev/desktop is a separate PR.

Verified: build_docker.py emits the same Dockerfile as before; this PR's own CI ran the full path — build desktop-ci-… → Desktop JS (node/bun/deno/cloudflare) + Python tests against it → delete.

Needs checking before merge: this repo's E2B_API_KEY / DOCKERHUB_* secrets must belong to the same team / Docker Hub account as e2b-dev/desktop's, otherwise the push-to-main build publishes desktop somewhere else.

Link to Devin session: https://app.devin.ai/sessions/d3bee33fb111428d93efd33b36aeb0b3
Open in Devin Desktop: https://app.devin.ai/desktop/session/d3bee33fb111428d93efd33b36aeb0b3?variant=devin
Requested by: @mishushakov

… templates/desktop

Builds on push to main (templates/desktop/**) and via the templates.yml dispatch dropdown, using the in-repo Python SDK.

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@cla-bot cla-bot Bot added the cla-signed label Oct 8, 2026
@changeset-bot

changeset-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 88e99db

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TASTE.md review of the SDK-facing code in this PR: the build scripts (build_dev.py, build_prod.py, build_docker.py), the builder in template.py, and the SDK usage examples in templates/desktop/README.md. Rules checked: T-3/T-3a (required args positional, optionals as kwargs), T-37–T-40 (template builder shape, Template.build/Template.to_dockerfile as statics), T-16 (CopyItem passed as a TypedDict option), T-1 (the README's JS and Python examples match), and T-65–T-67 (deprecated surface).

1 violation. The build scripts already pass the template name positionally. The README's "Creating a custom template" example still uses the deprecated alias= keyword (inline comment below).

Outside TASTE.md, no inline comment: pip install e2b dotenv (README line 45) installs the PyPI package dotenv. from dotenv import load_dotenv comes from python-dotenv, so the command should probably be pip install e2b python-dotenv.

The workflow, desktop SDK README links, and static files/ assets don't touch SDK API surface, so TASTE.md doesn't apply to them.

Written by Devin

Comment thread templates/desktop/README.md Outdated
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 4386a79. Download artifacts from this workflow run.

JS SDK (e2b@2.54.1-devin-1791475688-move-desktop-template.0, with @e2b/dockerfile-utils@0.1.1-devin-1791475688-move-desktop-template.0):

npm install ./e2b-dockerfile-utils-0.1.1-devin-1791475688-move-desktop-template.0.tgz ./e2b-2.54.1-devin-1791475688-move-desktop-template.0.tgz

CLI (@e2b/cli@2.21.2-devin-1791475688-move-desktop-template.0):

npm install ./e2b-cli-2.21.2-devin-1791475688-move-desktop-template.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.3-devin-1791475688-move-desktop-template.0):

npm install ./e2b-code-interpreter-2.8.3-devin-1791475688-move-desktop-template.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-devin-1791475688-move-desktop-template.0):

npm install ./e2b-desktop-2.4.1-devin-1791475688-move-desktop-template.0.tgz

Python SDK (e2b==2.54.0+devin.1791475688.move.desktop.template, with e2b-dockerfile-utils==0.1.0+devin.1791475688.move.desktop.template):

pip install ./e2b_dockerfile_utils-0.1.0+devin.1791475688.move.desktop.template-py3-none-any.whl ./e2b-2.54.0+devin.1791475688.move.desktop.template-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.3+devin.1791475688.move.desktop.template):

pip install ./e2b_code_interpreter-2.10.3+devin.1791475688.move.desktop.template-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.1+devin.1791475688.move.desktop.template):

pip install ./e2b_desktop-2.6.1+devin.1791475688.move.desktop.template-py3-none-any.whl

devin-ai-integration Bot and others added 3 commits October 8, 2026 16:22
…e desktop README

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
… it changes

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@linear-code

linear-code Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

SDK-391

SDK-389

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant