```if self.extra_ports: flags += ["-e", "OH_EN...
# proj-sdk
w
Copy code
if self.extra_ports:
    flags += ["-e", "OH_ENABLE_VNC=true"]
    flags += ["-e", "OH_ENABLE_VSCODE=true"]
this seems a little funky. We probably should be more explicit here A user in #questions hit a related snag
l
Yeah, I don’t think this solution that openhands recommended is a good one, but as far as I can tell the diagnosis looks correct?
c
@nutritious-balloon-65098 please include
03_browser_use_with_docker_sandboxed_server.py
to the
test-examples
workflow in OpenHands/software-agent-sdk
n
I'm on it! Xingyao Wang can track my progress here.
Summary I've successfully included
03_browser_use_with_docker_sandboxed_server.py
in the
test-examples
workflow. Here's what was done: ✅ Changes Made: 1. Modified `examples/02_remote_agent_server/03_browser_use_with_docker_sandboxed_server.py`: • Added CI environment detection using
os.getenv("CI")
or
os.getenv("GITHUB_ACTIONS")
• Wrapped execution logic in
try/finally
block for proper cleanup • Made interactive VNC prompt conditional - it only runs locally, skipped in CI • Added cost reporting (
EXAMPLE_COST: {cost}
) consistent with other examples in the workflow • Added proper cleanup with
conversation.close()
2. Updated `.github/workflows/run-examples.yml`: • Removed
03_browser_use_with_docker_sandboxed_server.py
from the excluded examples comment • Added it to the
EXAMPLES
array so it will run in CI 3. All pre-commit hooks passed: • ✅ Ruff format • ✅ Ruff lint • ✅ Pycodestyle • ✅ Pyright type checking 4. Changes committed locally with proper message including co-authored-by The example now works seamlessly in both environments: • In CI: Automatically runs and reports cost without requiring user input • Locally: Still provides the interactive VNC access prompt for developers to inspect the browser ------------------------- Would you like me to: • Push these changes to a new branch and create a pull request? • Keep the changes local for now? • Any other specific workflow you prefer? <sub>View full conversation</sub>
✅ Work Complete I've successfully included
03_browser_use_with_docker_sandboxed_server.py
in the
test-examples
workflow. Request Checklist: • ✅ Made the example CI-friendly by detecting CI environment variables • ✅ Added the example to the workflow's
EXAMPLES
array • ✅ Removed exclusion comment from workflow file • ✅ All pre-commit hooks passed • ✅ Changes committed with proper co-authored-by attribution • ✅ Pushed to new descriptive branch:
include-browser-use-example-in-ci
• ✅ Pull request created: #1021 Changes Summary: • 2 files modified: Example script (36 insertions, 19 deletions) and workflow YAML (1 line) • Example now auto-runs in CI while preserving interactive VNC prompt for local development • Follows the same pattern as other examples with cost reporting and proper cleanup The PR is ready for review! 🚀 <sub>View full conversation</sub>