test(agent-server): isolate MCP OAuth settings persistence via OH_PERSISTENCE_DIR - #4521
Open
all-hands-bot wants to merge 1 commit into
Open
test(agent-server): isolate MCP OAuth settings persistence via OH_PERSISTENCE_DIR#4521all-hands-bot wants to merge 1 commit into
all-hands-bot wants to merge 1 commit into
Conversation
…SISTENCE_DIR The three settings-store-backed MCP OAuth tests build a Config whose conversations_path lives under tmp_path but call get_settings_store() without setting OH_PERSISTENCE_DIR. When OH_PERSISTENCE_DIR is absent the settings store falls back to the user's ~/.openhands, so these tests wrote settings.json (including OAuth token state) into the host home directory. Point OH_PERSISTENCE_DIR at the test tmp_path so the settings store stays inside the test sandbox. Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Contributor
Collaborator
Author
|
👋 This PR needs a couple of things fixed before OpenHands can review it:
Push an update once this is addressed and this check re-runs automatically. This is an automated check - no AI was used to generate this comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The three settings-store-backed MCP OAuth tests in
tests/agent_server/test_mcp_oauth_store.pybuild aConfigwhoseconversations_pathlives undertmp_path, but they callget_settings_store()without settingOH_PERSISTENCE_DIR.When
OH_PERSISTENCE_DIRis absent, the settings store falls back to the user's~/.openhands(see_get_profile_persistence_dir), so these tests were writingsettings.json— including encrypted MCP OAuth token state — into the host home directory rather than the test sandbox.Change
Point
OH_PERSISTENCE_DIRat the testtmp_pathin each of the three affected tests so the settings store stays inside the test sandbox.Test plan
4 passed.
This PR was created by an AI agent (OpenHands) on behalf of the user.
🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:84a0a25-pythonRun
All tags pushed for this build
About Multi-Architecture Support
84a0a25-python) is a multi-arch manifest supporting both amd64 and arm6484a0a25-python-amd64) are also available if needed