set sandbox user id during testing to hopefully fix the permission issue

This commit is contained in:
Xingyao Wang
2024-07-28 20:09:38 -04:00
parent fc01bf3e8d
commit ef5d2ba6f5
2 changed files with 2 additions and 5 deletions

View File

@@ -221,7 +221,7 @@ jobs:
# Print the full name of the image
echo "Loaded Docker image: $image_name"
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=opendevin --cov-report=xml -s ./tests/unit/test_runtime.py
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_USER_ID=$(id -u) SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=opendevin --cov-report=xml -s ./tests/unit/test_runtime.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4

View File

@@ -97,10 +97,7 @@ async def _load_runtime(
config = AppConfig(
workspace_base=temp_dir,
workspace_mount_path=temp_dir,
sandbox=SandboxConfig(
use_host_network=True,
),
user_id=os.getuid(),
sandbox=SandboxConfig(use_host_network=True),
)
load_from_env(config, os.environ)
config.run_as_devin = run_as_devin