Skip to content

fix: Improve sandbox.git async/sync parity#1110

Merged
matthewlouisbrockman merged 8 commits intomainfrom
fix-consolidate-sync-async
Feb 3, 2026
Merged

fix: Improve sandbox.git async/sync parity#1110
matthewlouisbrockman merged 8 commits intomainfrom
fix-consolidate-sync-async

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

Fixes issue with missing restore and reset functionality on the async git sandboxes.

Consolidate shared git helpers by moving remote URL argument construction and
parsing into the git utilities package. Sync and async git modules now reuse
the same builders where possible, with tests to ensure no drift.

bxxf and others added 5 commits January 30, 2026 13:21
Directly related to #1108. Please
check the issue description for more details.

tldr: `.restore()` and .`reset()` functions are missing in the
`AsyncSandbox` instance

also added test to check parity of methods/signatures between sync and
async git instances

other potential concerns: 
- tests are only ran for the sync variant across the python-sdk - if
there are any mismatches in the async logic (not only git i believe),
the tests won't catch it
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: b86e5ae

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

This PR includes changesets to release 1 package
Name Type
@e2b/python-sdk 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

@matthewlouisbrockman matthewlouisbrockman changed the title fix: Improve GIT async/sync parity fix: Improve sandbox.git async/sync parity Jan 30, 2026
@matthewlouisbrockman matthewlouisbrockman added bug Something isn't working Improvement Improvement for current functionality labels Jan 30, 2026
Copy link
Copy Markdown
Contributor

@djeebus djeebus left a comment

Choose a reason for hiding this comment

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

Only comment is that we probably want to move things that are not intended to be part of the public API into modules that start with _. Specifically I'm thinking of all the functions in e2b.sandbox.git.args; if we want people to call them via sandbox_sync.Git methods, we should probably rename e2b.sandbox.git to e2b.sandbox._git, indicating that functions in there might get refactored, renamed, or removed without warning.

Comment thread packages/python-sdk/e2b/sandbox/git_utils.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we do this test all of our classes? like Sandbox, SandboxAsync, Template, TemplateAsync

@mishushakov
Copy link
Copy Markdown
Member

Do we need to do same changes as in this PR in our JS SDKs as well?

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor Author

hmm, we can add the sync with the JS but maybe a bit more of a pain; the user had provided the improvement to the python side of things so i think leaving it alone as a python only improvement fine to reduce scope creep

@matthewlouisbrockman matthewlouisbrockman merged commit 1a8fed0 into main Feb 3, 2026
15 checks passed
@matthewlouisbrockman matthewlouisbrockman deleted the fix-consolidate-sync-async branch February 3, 2026 19:58
@mishushakov
Copy link
Copy Markdown
Member

@matthewlouisbrockman i mean the changes to the structure like what is in which file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Improvement Improvement for current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants