Skip to content

Add getInfo/get_info methods to the SDKs#625

Merged
mishushakov merged 6 commits intomainfrom
get-info
Mar 24, 2025
Merged

Add getInfo/get_info methods to the SDKs#625
mishushakov merged 6 commits intomainfrom
get-info

Conversation

@mishushakov
Copy link
Copy Markdown
Member

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 21, 2025

🦋 Changeset detected

Latest commit: 654ac8d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@e2b/python-sdk Patch
e2b Patch

Not sure what this means? Click here to learn what changesets are.

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

Comment thread apps/web/src/app/(docs)/docs/sandbox/page.mdx
mlejva
mlejva previously requested changes Mar 21, 2025
Comment thread apps/web/src/app/(docs)/docs/sandbox/page.mdx Outdated
Comment thread packages/js-sdk/src/sandbox/sandboxApi.ts Outdated
Comment thread packages/js-sdk/src/sandbox/sandboxApi.ts Outdated
Comment thread packages/python-sdk/e2b/sandbox/sandbox_api.py Outdated
@ValentaTomas ValentaTomas added the feature New feature or request label Mar 23, 2025
@ValentaTomas ValentaTomas requested review from dobrac and mlejva and removed request for jakubno and mlejva March 23, 2025 18:20
Copy link
Copy Markdown
Contributor

@dobrac dobrac left a comment

Choose a reason for hiding this comment

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

looks good, just minor documentation comments improvements

Comment thread packages/js-sdk/src/sandbox/index.ts Outdated
Comment thread packages/js-sdk/src/sandbox/sandboxApi.ts Outdated
...(res.data.alias && { name: res.data.alias }),
metadata: res.data.metadata ?? {},
startedAt: new Date(res.data.startedAt),
endAt: new Date(res.data.endAt),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what if the sandbox is still running? It it the expected end time then? It might be good to explain in then in the documentation as it isn't clear imo

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's returned from the API already, should be the timestamp when the sandbox is expected to expire

await wait(6000)

await sandbox.isRunning()
expect(await sandbox.isRunning()).toBeTruthy()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

before, I believe the test would pass even if the promise resolved with false, it should however check that the Promise resolves with true, explicitly

Comment thread packages/python-sdk/e2b/sandbox/sandbox_api.py Outdated
Comment thread packages/python-sdk/e2b/sandbox_async/main.py Outdated
Comment thread packages/python-sdk/e2b/sandbox_sync/main.py Outdated
@mishushakov mishushakov dismissed mlejva’s stale review March 24, 2025 13:25

I have addressed the comments and @dobrac has approved already

@mishushakov mishushakov merged commit d4f4352 into main Mar 24, 2025
5 checks passed
@mishushakov mishushakov deleted the get-info branch March 24, 2025 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants