Commit Graph

170 Commits

Author SHA1 Message Date
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
Jakub Novak 0c636d4580 Fix release pipeline 2024-11-26 11:06:33 -08:00
0div d599ddac32 rebrand to SDK reference 2024-11-26 10:34:04 -08:00
0div 08bf46f277 add some logging to workflow for debugging 2024-11-25 16:27:01 -08:00
0div 1ee21d8524 change order of steps in workflow, log fs at the end 2024-11-25 16:14:24 -08:00
0div 6cbbaeb2de add script to check for package diffs 2024-11-25 15:49:18 -08:00
0div 4d2880a1f5 create github workflow that clones code-interpreter api ref to merge it with web app ref 2024-11-25 15:45:56 -08:00
Jakub Novak d051dfd699 Fix permissions and fix missing files from release 2024-10-22 13:59:47 -07:00
Jakub Novak d69317437c Respect the limit from pytest configuration 2024-10-22 13:38:24 -07:00
Jakub Novak 7ee473c98d Remove conflicting secret from workflow 2024-10-22 13:04:11 -07:00
Jakub Novak 55e56326a9 Remove the working directory 2024-10-22 13:02:33 -07:00
Jakub Novak b461d7351c Fix the error with if condition 2024-10-22 13:00:05 -07:00
Jakub Novak f185b317e7 Move publishing to separate workflow 2024-10-22 12:55:10 -07:00
Jakub Novak 12b9f0d5cb [skip ci] Change always to !cancelled, so we can cancel the workflow 2024-10-21 20:36:03 -07:00
Jakub Novak f1b2795b50 Return bun tests 2024-10-18 17:29:42 -07:00
Jakub Novak 14271950c8 Filter only for changes in the actual package code 2024-10-17 21:03:38 -07:00
Jakub Novak b550137c24 Skip changes on package.json, they are updated by release pipeline 2024-10-17 20:45:25 -07:00
Jakub Novak 19127fe00e Skip bun tests 2024-10-17 20:41:32 -07:00
Jakub Novak 98336e92c1 Install dependencies required for API ref generation 2024-10-16 03:41:54 -07:00
Jakub Novak 1ee0f01b09 [skip CI] Release new versions 2024-10-16 03:25:08 -07:00
Jakub Novak 707b518872 Setup release pipeline to generate api ref 2024-10-15 10:17:45 -07:00
Jakub Novak 7922d74102 Remove unused file 2024-10-15 08:06:43 -07:00
Jakub Novak 0c8674abc5 Update min supported version of python to 3.9 2024-10-15 08:06:43 -07:00
Jakub Novak 02bb4b22c7 Install dependencies 2024-10-15 07:35:11 -07:00