Skip to content

Conversation

@ryanhoangt
Copy link
Collaborator

@ryanhoangt ryanhoangt commented Oct 29, 2025

This PR fixed a mismatch between remote workspace and server implementation, which causes file uploading issue when running GAIA:

https://github.com/OpenHands/agent-sdk/blob/99051464f319baa7e6ba4ed03acad9500a2bb465/openhands-agent-server/openhands/agent_server/file_router.py#L30-L31


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Base Image Docs / Tags
golang golang:1.21-bookworm Link
java eclipse-temurin:17-jdk Link
python nikolaik/python-nodejs:python3.12-nodejs22 Link

Pull (multi-arch manifest)

docker pull ghcr.io/openhands/agent-server:54b3637-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-54b3637-python \
  ghcr.io/openhands/agent-server:54b3637-python

All tags pushed for this build

ghcr.io/openhands/agent-server:54b3637-golang
ghcr.io/openhands/agent-server:v1.0.0a5_golang_tag_1.21-bookworm_binary
ghcr.io/openhands/agent-server:54b3637-java
ghcr.io/openhands/agent-server:v1.0.0a5_eclipse-temurin_tag_17-jdk_binary
ghcr.io/openhands/agent-server:54b3637-python
ghcr.io/openhands/agent-server:v1.0.0a5_nikolaik_s_python-nodejs_tag_python3.12-nodejs22_binary

The 54b3637 tag is a multi-arch manifest (amd64/arm64); your client pulls the right arch automatically.

@ryanhoangt ryanhoangt requested a review from xingyaoww October 29, 2025 09:27
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/workspace/remote
   remote_workspace_mixin.py1053566%38, 68, 113, 126–128, 142–144, 203–205, 228–229, 231, 233, 235, 238, 245, 248, 251–252, 254, 261–263, 286, 292–295, 313, 319–321
TOTAL11111499655% 

@xingyaoww
Copy link
Collaborator

@OpenHands review diff for this PR and help me create a new test based on this fix in tests/cross/test_remote_conversation_live_server.py

@openhands-ai
Copy link

openhands-ai bot commented Oct 31, 2025

I'm on it! xingyaoww can track my progress at all-hands.dev

This test validates that the file upload fix works correctly end-to-end
by uploading a file through the RemoteWorkspace and verifying it arrives
at the correct location with the correct content.

This is a regression test for the file upload issue where the client was
calling /api/file/upload (without the path parameter) instead of
/api/file/upload/{path} as the server expects.

Co-authored-by: openhands <[email protected]>
@openhands-ai
Copy link

openhands-ai bot commented Oct 31, 2025

Summary

I've successfully reviewed the PR diff and created a new integration test for the file upload fix in tests/cross/test_remote_conversation_live_server.py.

PR Fix Overview

The PR fixed a mismatch between the client and server endpoints:

  • Before: Client called /api/file/upload (without path parameter)
  • After: Client calls /api/file/upload/{destination} (with path parameter in URL)
  • Server endpoint: Expects /api/file/upload/{path:path} (as defined in file_router.py)

New Test Created

Added test_file_upload_endpoint_with_live_server() which:

  1. Validates the fix end-to-end by using a real FastAPI server with the actual file upload endpoints
  2. Creates and uploads a test file through RemoteWorkspace
  3. Verifies upload success by checking:
    • The upload operation returns success
    • Source and destination paths are correct
    • The file exists at the destination location
    • The file content matches what was uploaded

The test follows the same pattern as the existing test_bash_command_endpoint_with_live_server() test, which serves as a regression test for issue #866.

Changes Committed and Pushed

✅ Test passes successfully
✅ All pre-commit hooks pass (ruff format, ruff lint, pycodestyle, pyright)
✅ All existing tests in the file still pass
✅ Changes committed with proper co-authorship
✅ Changes pushed to branch ht/fix-file-upload

The new test serves as a regression test to ensure the file upload endpoint URL fix continues to work correctly.

View full conversation

@openhands-ai
Copy link

openhands-ai bot commented Oct 31, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Agent Server

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #951 at branch `ht/fix-file-upload`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@xingyaoww xingyaoww merged commit 67746a6 into main Oct 31, 2025
10 of 14 checks passed
@xingyaoww xingyaoww deleted the ht/fix-file-upload branch October 31, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants