You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Dockerignore **.txt patterns do not exclude template files in either SDK #1933
Not applicable: offline template file selection; no sandbox or build was created.
Environment
Current main a9c58ab2b81ba3d948819a55bbecae9b2617b347, JS and Python SDK 2.52.0, Windows, Node 22.23.2, Python 3.12.14, pnpm 10.34.5.
Timestamp
2026-10-02 22:34 +08:00.
Frequency
Happens every time with the local reproducer.
Expected behavior
A Dockerignore pattern **.txt should exclude paths ending in .txt, including root.txt and src/nested.txt. Moby's suffix-match implementation handles a leading ** followed by a literal suffix.
Actual behavior
Both SDKs leave these files in the list used for template copy. The port always compiles a non-final ** into (.*/)?, omitting Moby's literal-suffix case. **.txt therefore matches a filename literally named .txt, rather than root.txt.
On main, the output contains both root.txt and src/nested.txt; neither should be present. Equivalent regression tests through JS getAllFilesInPath and Python get_all_files_in_path both failed before applying the fix.
Additional context
This is a remaining edge case after #1917, not a proposal to replace that fix. A focused patch is prepared in both SDKs, with tests for root/nested paths, literal suffix escaping, negation, and subsequent wildcard syntax. No new dependencies. AI-assisted with Codex; reproduction and SDK-scoped offline checks were executed locally.
summary: In both SDKs, the dockerignore-to-regex port compiles a non-final leading ** as (.*/)?, so a pattern like **.txt doesn't exclude root.txt or src/nested.txt (Moby treats it as a literal-suffix match). Clear offline repro included; the reporter says this is an edge case left over after fix(sdk): apply .dockerignore patterns Docker-style when copying template files #1917 and has a patch ready.
@siye566 thanks for reporting this and for the clear offline repro (and for #1934). The fix shipped in #1935: a leading ** followed by literal characters (e.g. **.txt) now matches at any depth, as it does in BuildKit, in both SDKs.
It's in e2b 2.52.1 (JS SDK on npm and Python SDK on PyPI):
Activity
devin-ai-integration commentedon Oct 2, 2026
Triage
getAllFilesInPath/get_all_files_in_path)**as(.*/)?, so a pattern like**.txtdoesn't excluderoot.txtorsrc/nested.txt(Moby treats it as a literal-suffix match). Clear offline repro included; the reporter says this is an edge case left over after fix(sdk): apply .dockerignore patterns Docker-style when copying template files #1917 and has a patch ready.Written by Devin
fix(sdk): keep literal globstar suffix matches newline-safe
fix(sdk): match BuildKit in .dockerignore pattern matching (#1935)
devin-ai-integration commentedon Oct 5, 2026
@siye566 thanks for reporting this and for the clear offline repro (and for #1934). The fix shipped in #1935: a leading
**followed by literal characters (e.g.**.txt) now matches at any depth, as it does in BuildKit, in both SDKs.It's in
e2b2.52.1 (JS SDK on npm and Python SDK on PyPI):Written by Devin