Commit Graph

193 Commits

Author SHA1 Message Date
Mish Ushakov 46615194c1 ci: rebase before push in release commit step to avoid push race (#1469)
## Problem

The release workflow's "Commit new versions" step
(`.github/workflows/publish_packages.yml`) ran `git commit -am … && git
push` with no rebase. If any PR merged into the target branch while a
release was in flight, the remote moved ahead and the push failed as a
non-fast-forward — failing the whole release.

## Fix

Run `git pull --rebase origin "${GITHUB_REF_NAME}"` before `git push`,
so the release commit is replayed on top of the latest remote state.

```yaml
git commit -am "[skip ci] Release new versions" || exit 0
git pull --rebase origin "${GITHUB_REF_NAME}"
git push
```

Note: a narrow window remains if a PR merges between the rebase and the
push (sub-second), which would still fail; a retry loop would fully
eliminate it but adds complexity. Happy to add one if preferred.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 10:16:21 -07:00
Mish Ushakov 58566d45f6 ci: skip CI on docs-only changes (#1467)
## Summary

PR-gated workflows filter changed paths to decide whether to run, but
their package/spec globs (`packages/**`, `spec/**`) matched every `.md`
file in those directories — so docs-only changes (e.g. a package README)
triggered full test/lint/typecheck/codegen runs.

This appends the picomatch extglob `**/!(*.md)` to those directory globs
so Markdown no longer matches, across:

- **sdk_tests.yml** — JS/Python/CLI suites (prod + staging)
- **lint.yml** — lint/format only touch `src/`, `tests/`, and Python
code, never Markdown
- **typecheck.yml** — typecheck only covers `.ts`/`.py`
- **generated_files.yml** — codegen derives from `spec/`, unaffected by
docs

The exclusion is baked into each glob rather than added as a `!**/*.md`
rule because that only subtracts under `predicate-quantifier: every`,
which is global to the step and would break the OR between the shared
and package globs. PRs touching code (or code **and** docs together)
still run as before.

Note: `pkg_artifacts.yml` builds packages on every PR with no path
filter at all — left as-is since gating it would require adding a
`changes` job and change its always-runs behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 19:27:29 +00:00
Mish Ushakov e03d1b88fc ci: Slack notifications on release start and success with itinerary (#1463)
## What

The release workflow only pinged Slack on failure. This adds two
notifications to the `monitoring-releases` channel, each including an
itinerary of what is being released:

- **Release Started** (`report-start`) — posts as soon as a production
release is triggered.
- **Release Succeeded** (`report-success`) — posts when the release
publishes successfully.

The itinerary (package name + target version) is computed once in
`preflight` via `changeset status` and exposed as a job output, so both
notifications stay consistent. The jobs only fire for production
releases (`release == 'true'` / `publish` success), never for RC
publishes.

## Example Slack messages

**Started**
> 🚀 A new release has been triggered 
>
> *Releasing:*
> • JS SDK (e2b) v2.30.3
> • Python SDK (e2b) v2.29.3
> • CLI (@e2b/cli) v2.12.1

**Succeeded**
> 🚀 🎉 A new version has been released successfully!
:ship-it-parrot:
>
> *Released:*
> • JS SDK (e2b) v2.30.3
> • Python SDK (e2b) v2.29.3
> • CLI (@e2b/cli) v2.12.1

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:50:42 -07:00
Ben Fornefeld 02bcf83adf chore: remove Supabase (#1460) 2026-06-18 22:31:33 +02:00
Mish Ushakov 6372946856 ci: build prepared templates on manual trigger only (#1449)
Changes the **Build and push prepared templates** workflow to run only
on manual trigger (`workflow_dispatch`) instead of automatically on
every push to `main` touching `templates/**`.

This prevents the base template from being rebuilt and republished to
DockerHub/E2B on every change, giving control over when builds happen.

Once merged to `main`, the workflow can be triggered from the Actions UI
("Run workflow") or via `gh workflow run templates.yml`.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:23:22 -07:00
Mish Ushakov a467e04144 fix(ci): gate SDK test steps on inputs.run so matrix checks always expand (#1447)
## Problem

The reusable SDK test workflows gated the matrix `test` job with `if:
${{ inputs.run }}`. GitHub evaluates a job's `if` *before* expanding the
matrix, so when `run` was `false` the per-OS check contexts (`JS SDK -
Build and test (ubuntu-22.04)`, `... (windows-latest)`, and the
Python/CLI equivalents) were never created — leaving required
branch-protection checks pending forever on path-filtered PRs that don't
touch the relevant package.

## Fix

Removed the job-level `if` so the matrix always expands and every per-OS
check context is created, and moved `if: ${{ inputs.run }}` onto each
step instead. When `run` is false all steps skip and the job reports
success, satisfying the required check; when true, behavior is
unchanged. Applied to `js_sdk_tests.yml`, `python_sdk_tests.yml`, and
`cli_tests.yml`.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 12:56:28 +02:00
Mish Ushakov 8c72291307 ci: build base template via e2b CLI in addition to DockerHub push (#1401)
Adds a `buildTemplate` CI job that builds and publishes the `base`
template through the e2b CLI, running alongside the existing DockerHub
image push (renamed to `buildAndPushImage`). For security, the CLI is
built from source in this repo rather than installing the published
`@e2b/cli` package; this build-and-global-install logic lives in a
reusable composite action at `.github/actions/build-cli` so it can be
shared across workflows. Removes the static `templates/base/e2b.toml`
since template config is now driven by the CLI invocation, and switches
the Dockerfile's `node` user/group creation to system accounts (`-r`).

## Usage

Any workflow can build and install the CLI globally with a single step:

```yaml
steps:
  - uses: actions/checkout@v4
  - uses: ./.github/actions/build-cli
  - run: e2b template create base --memory-mb 512
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:04:11 +02:00
Mish Ushakov 1d6c45c060 ci: skip CI jobs when unaffected by changed paths (#1380)
Adds a `dorny/paths-filter` change-detection job to the PR-triggered
workflows so jobs only run when relevant paths change: Lint/Typecheck
run only when package code, spec, or lint configs change; Generated
files runs only when codegen inputs/outputs change; and the
JS/Python/CLI SDK tests run only when the respective SDK changes (CLI
also runs on JS SDK changes since it builds against it). The SDK test
jobs are gated *inside* the reusable workflows via a new `run` input
rather than by skipping the caller, so the required matrix status checks
still report (skipped jobs report success) and branch protection stays
satisfied. Shared paths (spec, lockfiles, `package.json`,
`.tool-versions`) and `workflow_dispatch` runs still trigger everything.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 19:30:52 +00:00
Mish Ushakov 6e3b699072 chore: add issue template config (#1377)
Adds `.github/ISSUE_TEMPLATE/config.yml` to disable blank issues,
forcing users to pick an existing template. Also adds contact links to
the E2B Docs and the E2B Discord (reusing the invite already referenced
in `CONTRIBUTING.md`).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 17:25:27 +00:00
Ben Fornefeld 089b8b9805 Remove: SDK Reference artifacts and apps/web (#1199)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Medium risk because it deletes a large subtree (`apps/web`) and
removes SDK-reference generation/commit steps from the package publish
workflow, which may affect downstream docs/release expectations.
> 
> **Overview**
> **Removes the docs web app and generated SDK reference content.** The
PR deletes `apps/web` configs/scripts (Next.js/MDX setup, Sentry config,
prebuild/sitemap generation) and removes the committed `sdk-reference`
MDX pages.
> 
> **Simplifies repo automation and ownership.** The package publish
workflow no longer generates/clones/commits SDK reference docs,
`CODEOWNERS` drops web/docs ownership entries, and the root ESLint
config removes `@stylistic/ts` in favor of the built-in `semi` rule.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4158d777b5f3d3fa30b538e434d34ce0e697d473. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-03-17 10:08:28 -07:00
Tomas Srnka d1d6ddf0ce Update Docker build to support arm64 platform (#1163)
Update Docker build to support arm64 platform
2026-02-25 16:30:06 +01:00
Jakub Dobry 85f5b8d2b3 chore: various bug fixes (#1145)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Low Risk**
> Mostly CI/test changes plus a small logging tweak; low production
impact, with main risk being altered test timing/flake behavior due to
new timeout defaults.
> 
> **Overview**
> Improves release-candidate GitHub workflows by passing sanitized
`tag`/`preid` via step `env` vars and quoting them when running `npm
version`/`npm publish`, reducing the chance of input/expansion issues.
> 
> Stabilizes sandbox internet-access tests in JS and Python by switching
the curl target to Google’s `generate_204` endpoint and updating
expected status codes. Python tests also tighten global `pytest` timeout
to 30s, remove per-sandbox default timeouts from fixtures, and add 180s
timeouts specifically for template test suites via new `conftest.py`
files.
> 
> CLI sandbox status polling now logs the caught error when
`Sandbox.getInfo` fails (instead of silently returning `false`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
187849338dd46f9d0dd1adb0a070719ebad87309. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-18 11:37:32 +01:00
Jakub Dobry 571210af0c chore: allow releases from PRs (#1142) 2026-02-18 05:28:17 +00:00
Jakub Dobry c5e64341cc chore(ci): add unified SDK tests workflow with staging (#1141) 2026-02-17 09:15:31 -08:00
Jakub Dobry bffab42226 chore: allow canary releases (#1139) 2026-02-16 23:28:52 +00:00
Jakub Novák 59057f5a98 Potential fix for code scanning alert no. 3: Workflow does not contain permissions (#1135)
Potential fix for
[https://github.com/e2b-dev/E2B/security/code-scanning/3](https://github.com/e2b-dev/E2B/security/code-scanning/3)

In general, the fix is to declare an explicit `permissions` block that
restricts the `GITHUB_TOKEN` to the minimal scope required. For this
workflow, the steps only need to read the repository contents to check
out code and run tooling; they do not perform any write operations
against the GitHub API, so `contents: read` at the workflow or job level
is sufficient.

The best minimal fix is to add a top-level `permissions` block
immediately after the `name: Lint` line in `.github/workflows/lint.yml`.
This will apply to all jobs in the workflow (currently just `lint`)
without altering any existing steps. The block should be:

```yaml
permissions:
  contents: read
```

No additional imports, steps, or changes to the existing job logic are
required.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> CI-only change that narrows GitHub token permissions; no application
logic or deployment behavior is affected.
> 
> **Overview**
> Adds an explicit top-level `permissions` block to the `Lint` GitHub
Actions workflow, restricting the default `GITHUB_TOKEN` to
**read-only** repository access (`contents: read`).
> 
> No lint job steps or behavior are changed; the update is purely to
tighten workflow token scope to satisfy code-scanning guidance.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
fd6bd36e778825fcf2f1c9d758c65b36ba0a045a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-15 08:14:37 -08:00
Jakub Novák 17130809ba Potential fix for code scanning alert no. 4: Workflow does not contain permissions (#1136)
Potential fix for
[https://github.com/e2b-dev/E2B/security/code-scanning/4](https://github.com/e2b-dev/E2B/security/code-scanning/4)

In general, the fix is to explicitly declare a `permissions:` block that
grants only the minimal required scopes. Since this workflow only needs
to read repository contents (to check out code and inspect git
status/diff) and does not perform any writes via the GitHub API,
`contents: read` is sufficient.

The best minimally invasive fix is to add a `permissions:` block at the
workflow root (top level, alongside `on:` and `jobs:`) so that it
applies to all jobs in this workflow. Concretely, in
`.github/workflows/generated_files.yml`, insert:

```yaml
permissions:
  contents: read
```

between the `on:` block (lines 3–5) and the `jobs:` block (line 6). No
changes to steps, images, or other configuration are required, and no
additional imports or tools are needed. This documents the workflow’s
needs and prevents it from gaining unintended write powers if repository
defaults change.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Workflow-only change that restricts token permissions; no application
logic or data paths are affected.
> 
> **Overview**
> Tightens the GitHub Actions `Generated files` workflow by explicitly
setting top-level `permissions` to `contents: read`.
> 
> This addresses code-scanning guidance by ensuring the workflow token
is read-only while still allowing `actions/checkout` and the
generated-file checks to run.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
225a3ee2370629605e4372768b3d018031e68e9e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-15 08:14:23 -08:00
Mish Ushakov c38a1819b6 Fix Python SDK type issues with ty type checker (#1122)
## Summary
- Resolved 43 type diagnostics reported by ty (Astral's Python type
checker)
- Fixed Self type issues on class singletons
- Added explicit type annotations for shadowed attributes
- Replaced None with UNSET for auto-generated API parameters
- Fixed method signature alignment for protocol matching
- Added targeted type: ignore suppressions for pattern-based limitations

All checks pass: ty check, ruff format, ruff check.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Mostly typing/CI changes, but some adjustments affect sandbox
connect/pause overload dispatch and API response/parameter handling
(`UNSET` vs `None`), which could alter edge-case runtime behavior.
> 
> **Overview**
> Fixes Python SDK static typing issues for Astral’s `ty` checker and
wires typechecking into CI.
> 
> Adds a new `Typecheck` GitHub Action plus workspace `typecheck`
scripts (TS packages via `tsc`, Python SDK via `make typecheck` running
`ty`), and publishes a patch changeset for `@e2b/python-sdk`.
> 
> Across the Python SDK, adjusts type annotations and overloads (e.g.,
`Self`/singleton typing, `connect` overloads, optional
`user`/token/domain handling), tightens API model parsing with
`cast`/`Optional` checks and `UNSET` usage, and adds a few targeted `ty`
ignore comments in tests/protocols to silence checker limitations.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f66402847c40cee7e44e1aaa7caa97e271ba9978. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-12 16:23:39 +00:00
Berry 2781109a26 Update bug_report form template (#1082)
New GitHub issue form with more specific fields for customer reports
2026-01-16 14:24:49 +01:00
Mish Ushakov d911c55c3e Improve CI/CD speed for template tests (#1035)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Caches Playwright binaries in JS CI and refactors JS/Python template
tests to use API mocks and aliases, add Dockerfile tests, and update
install APIs to single-package calls.
> 
> - **CI**:
> - Cache Playwright binaries on `ubuntu-22.04` and `windows-latest` in
`.github/workflows/js_sdk_tests.yml` to speed JS SDK tests.
> - **JS SDK Tests**:
> - Extend `buildTemplate` options to accept `alias` in
`tests/setup.ts`.
> - Add `fromDockerfile` tests and switch some builds to
`fromBaseImage`; add build-from-base-template test.
> - Update install method tests to single-package calls for
`aptInstall`, `npmInstall`, `bunInstall`, `pipInstall`.
>   - Tweak `makeSymlink` test order to ensure overwrite behavior.
> - Overhaul stacktrace tests to use `msw` server mocks and alias-based
failure mapping.
> - **Python SDK Tests**:
>   - `build`/`async_build` fixtures accept optional `alias`.
> - Add `from_dockerfile` tests (sync/async); use base image/base
template where applicable.
>   - Update install method tests to single-package calls.
> - Rewrite stacktrace tests to monkeypatch API calls with alias-based
failure mapping.
> - **Dependencies**:
>   - Add dev dependency `msw` to `packages/js-sdk/package.json`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1b7f84f4ce692f664c3ce4cdb345f4c3a028b17a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-28 22:34:13 +01:00
Mish Ushakov 6ff14f8b2e Add Windows CI to test matrix (#1020)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Add Windows to CI matrices and make JS/Python utils and tests
cross-platform via path handling updates.
> 
> - **CI**:
> - Add Windows to test matrices in `cli_tests.yml`, `js_sdk_tests.yml`,
`python_sdk_tests.yml`; set bash shell/workdirs; disable fail-fast for
some jobs.
>   - Python CI runs `pytest -n 4` via Poetry.
> - **JS SDK**:
> - Path normalization for globbing (`normalizePath`) and use of
`Path.relativePosix()` in hashing and tar creation in
`src/template/utils.ts`.
> - **Python SDK**:
> - Add `normalize_path` and use forward-slash glob patterns in
`e2b/template/utils.py`.
> - **Tests**:
> - Make stack trace parsing robust to Windows paths; use `basename` in
file assertions; adjust Python tar tests tempdir fixture handling.
> - **Changeset**: add patch note for windows-related fixes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1b8dbe4a1af642dbcb86500837e93f7998b223f6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Joseph Lombrozo <joe.lombrozo@e2b.dev>
2025-11-26 09:50:26 -08:00
Joseph Lombrozo bbeff746f8 Support overriding envd API URL (#1013)
This requires [infra#1448](https://github.com/e2b-dev/infra/pull/1448)
first.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds support to override the sandbox API URL (E2B_SANDBOX_URL) across
JS/Python SDKs, centralizes sandbox host/url logic with headers, and
updates CI to build the SDK before CLI.
> 
> - **SDKs (JS & Python)**
> - Add `sandboxUrl` support in `ConnectionConfig` (env var
`E2B_SANDBOX_URL`), with new helpers `getSandboxUrl`/`getHost` and
shared `envdPort`.
> - Refactor sandbox initialization to use
`ConnectionConfig.getSandboxUrl(...)` and `getHost(...)`.
> - Always attach sandbox headers `E2b-Sandbox-Id` and
`E2b-Sandbox-Port` to sandbox and connect requests.
> - Python: thread `sandbox_url` through opts; update async/sync connect
calls to pass headers; minor fix to default `headers=None` in
`e2b_connect.client.Client` stream prep.
> - **CI**
> - Build `packages/js-sdk` before `packages/cli`; set step
`working-directory` for build/test.
> - **Dependencies**
>   - Point `e2b` dependency in lockfile to local `../js-sdk` link.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5dc58171af6c170f8640f49d736dbe9c571f2b21. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-11-14 10:13:59 -08:00
Joseph Lombrozo d2e22e3748 Some general pytest cleanup (#1021)
- Individual tests must complete in less than 5 minutes
- Add a `make test` option that runs tests
- Upgrade poetry to 2.1.1 (the lock file was generated by this version,
so this just matches what we already expect)
2025-11-13 17:58:30 -08:00
Jakub Novák 60fb009e4a Use OIDC for npm publish (#990)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Move npm publishing to OIDC by adding id-token permissions and
removing NPM_TOKEN, update actions/setup-node to v6, and upgrade npm in
workflows.
> 
> - **Workflows**:
>   - **OIDC for npm publish**:
> - Add `permissions: id-token: write` in
`workflows/publish_packages.yml` and `workflows/release.yml`.
> - Remove `NPM_TOKEN` secret requirement and set `NPM_TOKEN: ""` in
`changesets/action` env.
>   - **Node/tooling updates**:
> - Bump `actions/setup-node` from `v3` to `v6` and set `registry-url`
where needed.
>     - Add step to upgrade `npm` to `^11.6` in `publish_packages.yml`.
>   - Keep pnpm caching/configuration and other steps intact.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
539db5937bfe83c4222015de3dcf9c1f90764bf3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-30 02:13:40 -07:00
Joseph Lombrozo ee8ec18829 Add a 'pretest' step to install chromium (#977)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Install Playwright Chromium via a new js-sdk pretest script and remove
redundant Playwright installs from CI workflows.
> 
> - **CI Workflows**:
> - Remove `npx playwright install --with-deps` from
`github/workflows/js_sdk_tests.yml` and
`github/workflows/release_candidates.yml` JS test steps.
> - **JS SDK (`packages/js-sdk/package.json`)**:
> - Add `pretest` script: `npx playwright install --with-deps chromium`
to handle Playwright installation automatically.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e05fc4d5ff2edf96c62633c302775dc8a218c050. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-20 19:36:35 -07:00
Joseph Lombrozo 4fbda293c2 Support labeling a PR after opening it (#979)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Expand Release Candidates workflow to run on PR label, open, reopen,
and sync events.
> 
> - **CI/CD**:
> - Update `on.pull_request.types` in
`.github/workflows/release_candidates.yml` to include `labeled`,
`opened`, `reopened`, and `synchronize` so the Release Candidate
workflow runs on these events.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a0842f5d6e0902ed04f9d42fa9b258dd098d56da. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-20 14:29:29 -07:00
Mish Ushakov b0aeeb5222 Revert "Add a postinstall that downloads chromium" (#964) 2025-10-16 11:40:28 +00:00
Joseph Lombrozo 2942f481ad Use .tool-versions file to sync local dev and github actions (#955)
This way a version bump in the `.tool-versions` file is automatically
used in tests, linters, releases, and local dev. It also helps make it
clear which version we expect people to use locally.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Add .tool-versions and update GitHub Actions to parse and use its
values for pnpm, Node.js, Python, Poetry, and Deno.
> 
> - **CI Workflows**:
> - Add parsing of `.tool-versions` via
`wistia/parse-tool-versions@v2.1.1` in `cli_tests.yml`,
`generated_files.yml`, `js_sdk_tests.yml`, `lint.yml`,
`publish_packages.yml`, `python_sdk_tests.yml`, `release.yml`,
`release_candidates.yml`.
>   - Replace hardcoded versions with `${{ env.TOOL_VERSION_* }}`:
>     - `pnpm`: `TOOL_VERSION_PNPM`
>     - `node-version`: `TOOL_VERSION_NODEJS`
>     - `python-version`: `TOOL_VERSION_PYTHON`
>     - `poetry` installer `version`: `TOOL_VERSION_POETRY`
>     - `deno-version`: `TOOL_VERSION_DENO`
> - **Tooling**:
> - Add `.tool-versions` specifying `deno 1.46.3`, `nodejs 20.19.5`,
`pnpm 9.15.5`, `python 3.9`, `poetry 1.8.3`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
358b62f586f3dfa164ad331f0ee7c7372e96bfac. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-15 16:12:30 -07:00
Joseph Lombrozo 5377b855cb Add a postinstall that downloads chromium (#962)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Move Playwright installation to JS SDK postinstall (Chromium) and
remove explicit installs from CI workflows.
> 
> - **Workflows**:
> - Remove `npx playwright install --with-deps` from
`/.github/workflows/js_sdk_tests.yml` and
`/.github/workflows/release_candidates.yml`.
> - **JS SDK (`packages/js-sdk/package.json`)**:
>   - Add `postinstall` script: `pnpm exec playwright install chromium`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6bc96ae4b8da0e03d98e99e6ecdc4e952d530866. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-15 16:12:16 -07:00
Jakub Dobry a121bab60c Trigger releases manually (#952) 2025-10-14 06:22:35 -07:00
Joseph Lombrozo 5014ee2609 Upgrade to latest 1.8.x version of poetry (#947)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Update CI to use Poetry 1.8.3 across workflows and add
`.tool-versions` (Python 3.9.24, Poetry 1.8.3) for the Python SDK.
> 
> - **CI/Workflows**:
> - Bump Poetry from `1.5.1` to `1.8.3` in
`/.github/workflows/{lint.yml,publish_packages.yml,python_sdk_tests.yml,release_candidates.yml}`.
> - **Tooling**:
> - Add `packages/python-sdk/.tool-versions` specifying `python 3.9.24`
and `poetry 1.8.3`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9ae519772a9cd62333313dcc594edcc90a591c0a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-13 17:35:02 -07:00
Jakub Dobry b9c4b16baa feat: add template migration to CLI (#880)
## 🔄 Add Template Migration to CLI

### Summary

This PR introduces a new `migrate` command to the E2B CLI that helps
users transition from the legacy Dockerfile + TOML configuration format
to the new Template SDK format. The migration tool automatically
converts existing `e2b.Dockerfile` and `e2b.toml` configurations into
SDK-compatible template files using Handlebars templates.

### What's Changed

####  New Features

- **Template Migration Command**: Added `e2b template migrate` command
for converting legacy configurations to SDK format
- **Multi-Language Support**: Supports migration to TypeScript, Python
(sync), and Python (async) formats
- **Interactive Language Selection**: CLI prompts for target language
when not specified
- **Multi-stage Dockerfile Support**: Added fallback handling for
complex multi-stage Dockerfiles

#### 🔧 Technical Improvements

- **Enhanced ENV Handling**: Improved parsing of multiple environment
variables from single ENV instructions
- **File Name Conflict Resolution**: Automatic unique filename
generation to prevent overwriting existing files
- **Comprehensive Template Generation**: Creates both development and
production build files

#### 📁 New Template Files

- `typescript-template.hbs` - TypeScript template generation
- `typescript-build.hbs` - TypeScript build script template
- `python-template.hbs` - Python template generation (supports both
sync/async)
- `python-build-async.hbs` - Python async build script template
- `python-build-sync.hbs` - Python sync build script template

### Usage

```bash
# Migrate with interactive language selection
e2b template migrate

# Migrate to specific language
e2b template migrate --language typescript
e2b template migrate --language python-sync
e2b template migrate --language python-async

# Custom paths
e2b template migrate --dockerfile custom.dockerfile --config custom.toml
```

### Generated Output

The migration command generates three files per target:
- `template.{ts|py}` - Template definition using SDK
- `build{.|_}dev.{ts|py}` - Development build script
- `build{.|_}prod.{ts|py}` - Production build script

### Migration Process

1. **Parse Configuration**: Reads `e2b.toml` for template settings
2. **Dockerfile Analysis**: Uses E2B SDK to parse Dockerfile
instructions
3. **Transformation**: Converts Docker instructions to SDK method calls
4. **Code Generation**: Uses Handlebars templates to generate target
language files
5. **File Creation**: Writes template and build files with conflict
resolution

### Error Handling

- **Graceful Dockerfile Parsing**: Falls back to custom image reference
for unparseable Dockerfiles
- **Clear User Guidance**: Provides manual build instructions when
automatic conversion fails
- **Validation**: Ensures required configuration files exist before
migration
2025-09-19 17:41:28 +02:00
Jakub Novák b42ab2a86b Add pipeline for linting and formatting (#883)
Setup linting and formatting in all packages
2025-08-31 12:06:00 -07:00
Mish Ushakov 8743907edb Update pnpm github action to v4 (#874)
Co-authored-by: Jakub Novak <jakub@e2b.dev>
2025-08-25 11:45:23 -07:00
Mish Ushakov abebb40d2a Update github actions to node v20 (#872)
We were using EOL version of Node.js in our GitHub Actions
https://endoflife.date/nodejs

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-08-25 07:21:20 -07:00
Jakub Novák d117ba09e8 SDK v2 - Add beta pause and update Sandbox list (#854)
Introduce beta submodule with beta features - pause and resume
Update Sandbox list to also return paused sandboxes

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-08-19 00:37:07 -07:00
Jakub Novák 706ebd9af8 Fix generating files with docker (#829)
# Description

Fixes an issue in generating files in Docker. There has been an
incompatibility of `buf` (version `29.5`) and `protoc-gen-es` (version
`2.2.2`).

I updated `protoc-gen-es@` to `2.6.2`

Also refactored the code a little so it's easier to read
Added a CI pipeline job to check all files are properly generated
2025-07-28 13:47:26 +02:00
Mish Ushakov b21f86c543 Added lint workflow for JS, Python SDKs (#759)
- Linted all existing files
- Added GitHub workflow to check everything is linted correctly
2025-06-05 14:52:48 +02:00
Jakub Novák 3cfed0e4c0 Refactor workflows to enable requiring tests in PRs (#703)
# Description

Refactor to enable successful status checks for tests
2025-04-25 14:20:17 +02:00
0div ba65bb5ad8 Fix publishing workflow (#696)
Fix package publishing workflow ([see
issue](https://github.com/e2b-dev/E2B/actions/runs/14542539046/job/40803167565))

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-04-19 01:38:49 +03:00
0div 1b447a5761 Clone remote desktop & code-interpreter SDK refs into E2B sdk refs folder during publish (#682)
### Description 

This was initially performed in [the legacy
workflow](https://github.com/e2b-dev/E2B/blob/d27f81c5d3a85e2791258e388eb7ebd5f2e5eaa9/.github/workflows/generate_sdk_ref.yml#L101-L117)
but has since been removed, adding it back to have latest [desktop &
code-interpreter SDK references](https://e2b.dev/docs/sdk-reference) on
our docs

### Test
<img width="234" alt="Screenshot 2025-04-15 at 1 47 16 PM"
src="https://github.com/user-attachments/assets/b00347d9-794d-41f1-98db-c4704c59f50d"
/>


#### should become:

- [ ] desktop:
  - [ ] js-sdk `v1.7.01@latest`
  - [ ] python-sdk `v1.6.1@latest`
- [ ] code-interpreter
  - [ ] js-sdk `v1.1.1@latest`
  - [ ] python-sdk `v1.2.0@latest`
2025-04-16 18:49:02 +02:00
0div 2535fc22c7 make show sdk ref dir when exsits 2025-04-01 10:17:46 -07:00
Jakub Novák d65de1bbe8 Update Ubuntu base image to 22.04 (#653)
# Description

There is a scheduled Ubuntu 20.04 brownout. Ubuntu 20.04 LTS runner will
be removed on 2025-04-15. For more details, see
https://github.com/actions/runner-images/issues/11101
2025-04-01 08:50:51 -07:00
Jiri Sveceny 9f7957d0fb Script for per-package check if release is needed (#641)
Inspired by original change in code-interpreter release process
https://github.com/e2b-dev/code-interpreter/pull/72
2025-03-27 07:13:11 -07:00
r33drichards 60ece872e5 Run tests on prs to avoid broken builds (#619) 2025-03-19 16:26:25 -07:00
Jakub Novák 2e637cb764 Send releases notification to dedicated channel (#604) 2025-03-14 10:19:11 +01:00
0div 9350971f34 move gen sdk workflow into publish package workflow 2024-11-27 16:36:11 -08:00
0div 8fe82fa6c5 Merge branch 'main' of https://github.com/e2b-dev/E2B into improved-api-refs 2024-11-27 10:45:08 -08:00
0div 0d0a83d34d pull from desktop in sdk ref gen workflow 2024-11-26 16:28:58 -08:00
0div 3801df319a typos in publish_packages workflow 2024-11-26 13:41:41 -08:00