Fix automation tzdata provisioning in dev and Docker#1257
Fix automation tzdata provisioning in dev and Docker#1257jamiechicago312 wants to merge 10 commits into
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
|
@openhands-agent is attempting to deploy a commit to the openhands Team on Vercel. A member of the Team first needs to authorize it. |
✅ Mock-LLM E2E Tests42/42 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
✅ Mock-LLM E2E Tests44/44 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Co-authored-by: openhands <openhands@all-hands.dev>
🛑 Mock-LLM E2E Tests34/34 passed · Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
✅ Mock-LLM E2E Tests44/44 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Summary
:)/tmp/...)cmd.exe(breakingmkdir -p, etc.)C:/...interpreted bytarashost:file)python3on Windows (Git Bash commonly only haspython/py).venv/bin/python ...) that don't hold on native Windows (.venv\Scripts\python.exe)Context
This PR originally addressed the scheduler crash described in #1256 (
ModuleNotFoundError: tzdata/ZoneInfoNotFoundError).During Windows testing we found additional blockers that prevented Slack automations (and other automations) from dispatching successfully on native Windows. Those fixes are included here so that, once OpenHands/extensions#317 is merged, this PR enables a working Windows local stack.
Dependency on OpenHands/automation#172
I verified that the Windows launcher failures in this PR line up exactly with the upstream bug fixed in OpenHands/automation#172:
.venv/bin/python main.pypython3This PR currently works around that by patching
OpenHands/automationat dev time intools/automation-sitecustomize/sitecustomize.py:python3 -> python -> py -3.venv/bin/python -> .venv/Scripts/python.exeSo the dependency relationship is:
In other words: #1257 is the downstream integration/workaround, while
OpenHands/automation#172is the upstream fix that removes the need for this part of the workaround.Windows support notes
Why the Slack Channel Monitor could open two conversations
When the Slack Channel Monitor automation runs on native Windows (no WSL) and the run fails early with
exit_code=127(command not found), the automation service can trigger stale run recovery:exit_code=127)In our Windows testing, the
exit_code=127was caused by a mismatch between the shell environment (Git Bash) and the Python entrypoint that the automation runtime tries to execute.Root cause (native Windows)
Two common problems show up on native Windows:
Entrypoint uses
python3- many Windows environments don't providepython3(onlypythonand/orpy).Unix venv path assumptions - some automation entrypoints/routers assume
.venv/bin/python, which does not exist on native Windows (Windows venvs use.venv\Scripts\python.exe).Upstream context (from
OpenHands/automationbefore #172):What this PR fixes in agent-canvas (Windows)
This PR implements Windows-side compatibility shims (dev-stack only) so the local stack works on native Windows:
bash.exe -lc(notcmd.exe, and not WSL'sSystem32\bash.exe)./c/...paths for tarball extraction sotardoes not interpretC:as a remote host.exit_code=127:python3 ..., fall back topythonand thenpy -3..venv/bin/python ..., prefer.venv/Scripts/python.exe, then.venv/bin/python, then thepython3/python/pyfallback.Important: this PR still carries those shims today, but they are standing in for the upstream fix in
OpenHands/automation#172, not replacing it.Public skills checkout: dependency on OpenHands/extensions#317
On Windows, the SDK/agent-server may clone
OpenHands/extensionsinto the public-skills cache. If that repo contains filenames invalid on Windows (e.g.:), Git checkout fails.This PR adds an optional Windows-only pre-seed step in
scripts/dev-with-automation.mjsthat populates the public-skills cache before the agent-server starts.OH_WINDOWS_PUBLIC_SKILLS_REPO->https://github.com/OpenHands/extensions.gitEXTENSIONS_REF->mainOH_WINDOWS_PUBLIC_SKILLS_REPO=<fork-or-upstream-extensions-repo>EXTENSIONS_REF=<branch|sha>OH_WINDOWS_PUBLIC_SKILLS_CACHE_REFRESH=1to force re-seedingDependency note: For Windows to work out-of-the-box, OpenHands/extensions#317 must be merged, because it removes
:from command filenames.Workaround if #317 isn't merged yet:
OH_WINDOWS_PUBLIC_SKILLS_REPO+EXTENSIONS_REFto a Windows-safe branch/ref (e.g. the head of deps(deps): bump axios from 1.15.2 to 1.16.0 #317 or an equivalent fork/commit).Verification
npm run check-translation-completeness -- src/api/agent-server-config.tsnpm run lintnpm testnpm run buildThis PR description was updated by an AI agent (OpenHands) on behalf of the user.