Repository navigation
chore(templates): move the desktop template into the monorepo - #1960
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
… 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>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
There was a problem hiding this comment.
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.
Package ArtifactsBuilt from 4386a79. Download artifacts from this workflow run. JS SDK ( 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.tgzCLI ( npm install ./e2b-cli-2.21.2-devin-1791475688-move-desktop-template.0.tgzCode Interpreter JS SDK ( npm install ./e2b-code-interpreter-2.8.3-devin-1791475688-move-desktop-template.0.tgzDesktop JS SDK ( npm install ./e2b-desktop-2.4.1-devin-1791475688-move-desktop-template.0.tgzPython SDK ( 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.whlCode Interpreter Python SDK ( pip install ./e2b_code_interpreter-2.10.3+devin.1791475688.move.desktop.template-py3-none-any.whlDesktop Python SDK ( pip install ./e2b_desktop-2.6.1+devin.1791475688.move.desktop.template-py3-none-any.whl |
…e desktop README Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
… it changes Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Summary
Moves the
desktopsandbox template frome2b-dev/desktop/templatetotemplates/desktop, next tobaseandhttpbin, and folds its CI (template.ymlthere) intotemplates.yml.CI (
templates.yml):desktopoption in theworkflow_dispatchdropdown (also built byall)pushtrigger onmainfortemplates/desktop/**/ the workflow file — keeps the old auto-rebuild behavior; onlybuildDesktopTemplateruns on push (buildTemplatenow gates oninputs.template ∈ {all, base, httpbin})buildDesktopTemplatedoes what the old workflow did:build_docker.py | docker buildx build --push→$DOCKERHUB_USERNAME/desktop:latest, thenbuild_prod.py(aliasdesktop) withsecrets.E2B_API_KEYTests (
sdk_tests.yml, production jobs) — template changes are now tested before they ship:desktop_templatepath filter (templates/desktop/**,desktop_template_*.yml,sdk_tests.yml);templates/desktop/**also triggers thedesktop_js/desktop_pythonsuitesdesktop-template→desktop_template_build.yml:build_ci.pybuilds the template asdesktop-ci-<run_id>-<run_attempt>desktop-js-tests/desktop-python-testsget it asE2B_TESTS_TEMPLATE; the test fixtures useE2B_TESTS_TEMPLATE || 'desktop', so when the template didn't change (build job skipped) they keep running against the publisheddesktopdesktop-template-cleanup→desktop_template_cleanup.yml:e2b template delete -y <name>withalways(), by name so it also cleans up after failed tests/buildsdesktop)Fix in
.github/actions/build-cli: it now buildspackages/js-sdk(whoseprebuildbuilds@e2b/dockerfile-utils) before the CLI. Since #1936 the CLI'stscfails without it (Cannot find module '@e2b/dockerfile-utils'), so the action was broken onmain— this also affected thebase/httpbinjobs intemplates.yml.Template code is unchanged except:
pyproject.toml/uv.lock/.python-version: scripts run inpackages/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 (likebasewith the in-repo CLI) and there's no extra lockfile to relock on releasesfile_context_pathis resolved relative totemplate.pyinstead of the CWDalias=→ positionalnameDesktop SDK READMEs now link here. The removal from e2b-dev/desktop is a separate PR.
Verified:
build_docker.pyemits the same Dockerfile as before; this PR's own CI ran the full path — builddesktop-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 publishesdesktopsomewhere 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