Skip to content

Commit 5e61721

Browse files
committed
Merge branch 'update-node' into update-core-package
2 parents 3846e68 + 0930191 commit 5e61721

File tree

12 files changed

+141
-59
lines changed

12 files changed

+141
-59
lines changed

.changeset/curly-pumpkins-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-template': patch
3+
---
4+
5+
Add retry

.changeset/many-planets-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter': patch
3+
---
4+
5+
Fix node version

.changeset/wicked-mirrors-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-python': patch
3+
---
4+
5+
Fix issue with secure False

.github/workflows/js_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- name: Setup Node
3737
uses: actions/setup-node@v3
3838
with:
39-
node-version: '18.x'
40-
registry-url: 'https://registry.npmjs.org'
39+
node-version: "20.x"
40+
registry-url: "https://registry.npmjs.org"
4141
cache: pnpm
4242
cache-dependency-path: pnpm-lock.yaml
4343

@@ -81,4 +81,4 @@ jobs:
8181
env:
8282
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
8383
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
84-
E2B_TESTS_TEMPLATE: ${{ inputs.E2B_TESTS_TEMPLATE }}
84+
E2B_TESTS_TEMPLATE: ${{ inputs.E2B_TESTS_TEMPLATE }}

.github/workflows/release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Node
3030
uses: actions/setup-node@v3
3131
with:
32-
node-version: "18.x"
32+
node-version: "20.x"
3333
registry-url: "https://registry.npmjs.org"
3434
cache: pnpm
3535
cache-dependency-path: pnpm-lock.yaml
@@ -71,7 +71,7 @@ jobs:
7171
- name: Setup Node
7272
uses: actions/setup-node@v3
7373
with:
74-
node-version: "18.x"
74+
node-version: "20.x"
7575
registry-url: "https://registry.npmjs.org"
7676
cache: pnpm
7777
cache-dependency-path: pnpm-lock.yaml
@@ -108,7 +108,6 @@ jobs:
108108
IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "@e2b/code-interpreter-template")
109109
echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT"
110110
111-
112111
charts-release:
113112
name: Charts release
114113
if: needs.changes.outputs.charts == 'true'
@@ -128,7 +127,7 @@ jobs:
128127
- name: Set up Python
129128
uses: actions/setup-python@v4
130129
with:
131-
python-version: '3.12'
130+
python-version: "3.12"
132131

133132
- name: Install and configure Poetry
134133
uses: snok/install-poetry@v1
@@ -156,7 +155,7 @@ jobs:
156155
poetry build
157156
poetry config pypi-token.pypi ${PYPI_TOKEN}
158157
poetry publish --skip-existing
159-
working-directory: ./chart_data_extractor
158+
working-directory: ./chart_data_extractor
160159
env:
161160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162161
PYPI_TOKEN: ${{ secrets.CHARTS_PYPI_TOKEN }}
@@ -165,7 +164,7 @@ jobs:
165164
id: output_version
166165
working-directory: ./chart_data_extractor
167166
run: |
168-
echo "::set-output name=version::$(pnpm pkg get version --workspaces=false | tr -d \\\")"
167+
echo "::set-output name=version::$(pnpm pkg get version --workspaces=false | tr -d \\\")"
169168
170169
build-docker-image:
171170
name: Build Docker Image
@@ -231,17 +230,17 @@ jobs:
231230
python-tests:
232231
name: Python Tests
233232
needs: [changes, build-template]
234-
if: always() &&
233+
if: always() &&
235234
!contains(needs.*.result, 'failure') &&
236-
!contains(needs.*.result, 'cancelled') &&
235+
!contains(needs.*.result, 'cancelled') &&
237236
needs.changes.outputs.template == 'true'
238237
uses: ./.github/workflows/python_tests.yml
239238
secrets: inherit
240239

241240
js-tests:
242241
name: JS Tests
243242
needs: [changes, build-template]
244-
if: always() &&
243+
if: always() &&
245244
!contains(needs.*.result, 'failure') &&
246245
!contains(needs.*.result, 'cancelled') &&
247246
needs.changes.outputs.template == 'true'
@@ -250,7 +249,7 @@ jobs:
250249

251250
release:
252251
needs: [python-tests, js-tests]
253-
if: always() &&
252+
if: always() &&
254253
!contains(needs.*.result, 'failure') &&
255254
!contains(needs.*.result, 'cancelled') &&
256255
(needs.changes.outputs.js == 'true' || needs.changes.outputs.python == 'true' || needs.changes.outputs.charts == 'true' || needs.changes.outputs.template == 'true')
@@ -268,7 +267,6 @@ jobs:
268267
with:
269268
token: ${{ steps.app-token.outputs.token }}
270269

271-
272270
- name: Set up Python
273271
uses: actions/setup-python@v4
274272
with:
@@ -286,10 +284,10 @@ jobs:
286284
with:
287285
version: 9.5
288286

289-
- name: Setup Node.js 18
287+
- name: Setup Node.js 20
290288
uses: actions/setup-node@v3
291289
with:
292-
node-version: '18.x'
290+
node-version: "20.x"
293291
cache: pnpm
294292

295293
- name: Configure pnpm
@@ -304,11 +302,11 @@ jobs:
304302
run: pnpm run version
305303
env:
306304
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
307-
305+
308306
- name: Generate SDK reference
309307
id: sdk-ref
310308
run: pnpm run --recursive generate-ref
311-
309+
312310
- name: Show docs file structure
313311
run: |
314312
if [ -d "./sdk-reference" ]; then

.github/workflows/release_candidates.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
with:
2323
version: 9.5
2424

25-
- name: Setup Node.js 18
25+
- name: Setup Node.js 20
2626
uses: actions/setup-node@v4
2727
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
2828
with:
29-
node-version: '18.x'
29+
node-version: "20.x"
3030
registry-url: https://registry.npmjs.org
3131
cache: pnpm
3232

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence.
3-
* @jakubno @ValentaTomas @0div @mishushakov
3+
* @jakubno @ValentaTomas @mishushakov

js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"format": "prettier --write src/ tests/ example.mts"
4040
},
4141
"devDependencies": {
42-
"@types/node": "^18.18.6",
42+
"@types/node": "^20.19.19",
4343
"dotenv": "^16.4.5",
4444
"knip": "^5.25.1",
4545
"npm-check-updates": "^17.1.14",
@@ -68,7 +68,7 @@
6868
"vm"
6969
],
7070
"engines": {
71-
"node": ">=18"
71+
"node": ">=20"
7272
},
7373
"browserslist": [
7474
"defaults"

pnpm-lock.yaml

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/e2b_code_interpreter/code_interpreter_async.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ async def run_code(
191191
request_timeout = request_timeout or self.connection_config.request_timeout
192192
context_id = context.id if context else None
193193

194+
headers: Dict[str, str] = {}
195+
if self._envd_access_token:
196+
headers = {"X-Access-Token": self._envd_access_token}
197+
194198
try:
195199
async with self._client.stream(
196200
"POST",
@@ -201,7 +205,7 @@ async def run_code(
201205
"language": language,
202206
"env_vars": envs,
203207
},
204-
headers={"X-Access-Token": self._envd_access_token},
208+
headers=headers,
205209
timeout=(request_timeout, timeout, request_timeout, request_timeout),
206210
) as response:
207211
err = await aextract_exception(response)
@@ -249,10 +253,14 @@ async def create_code_context(
249253
if cwd:
250254
data["cwd"] = cwd
251255

256+
headers: Dict[str, str] = {}
257+
if self._envd_access_token:
258+
headers = {"X-Access-Token": self._envd_access_token}
259+
252260
try:
253261
response = await self._client.post(
254262
f"{self._jupyter_url}/contexts",
255-
headers={"X-Access-Token": self._envd_access_token},
263+
headers=headers,
256264
json=data,
257265
timeout=request_timeout or self.connection_config.request_timeout,
258266
)

0 commit comments

Comments
 (0)