fix: override server_image default to None in DockerDevWorkspace#2243
Merged
simonrosenberg merged 1 commit intomainfrom Feb 28, 2026
Merged
Conversation
DockerDevWorkspace inherits server_image's default value of "ghcr.io/openhands/agent-server:latest-python" from DockerWorkspace. This causes the _validate_images validator to reject any instance constructed with only base_image, since both fields are non-None. Override the default to None so callers can simply pass base_image without also needing to explicitly set server_image=None. Fixes #2242 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
API breakage checks (Griffe)Result: Failed Log excerpt (first 1000 characters) |
Contributor
Agent server REST API breakage checks (OpenAPI)Result: Passed |
all-hands-bot
approved these changes
Feb 28, 2026
Collaborator
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Simple, elegant fix for a real problem. Overriding the inherited field default is the right approach here. LGTM!
5 tasks
Collaborator
|
@simonrosenberg Please see the linked PR comment, the Griffe check for API breakages failed on this PR. The way we do this is to use deprecation mechanism for a few releases, before breaking changes. WDYT? |
This was referenced Mar 1, 2026
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
DockerDevWorkspaceinheritsserver_image's default of"ghcr.io/openhands/agent-server:latest-python"fromDockerWorkspace, causing the_validate_imagesvalidator to reject any instance constructed with onlybase_image(both fields are non-None).server_imagefield default toNoneinDockerDevWorkspaceso callers can usebase_imagewithout needing to explicitly passserver_image=None.Fixes #2242
Breaking change note
DockerDevWorkspace()called withoutbase_imagepreviously inherited the parent'sserver_imagedefault ("ghcr.io/openhands/agent-server:latest-python") and passed validation. After this change, it will raise aValueErrorsince both fields default toNone.This is unlikely to affect anyone in practice — using
DockerDevWorkspacewithoutbase_imageis not a meaningful use case (you'd useDockerWorkspacedirectly instead). All existing usages in the SDK and benchmarks repos passbase_imageexplicitly. The previous behavior was accidentally permissive, not intentional.Test plan
test_docker_dev_workspace_has_build_fields,test_docker_dev_workspace_import, etc.)DockerDevWorkspace(base_image="python:3.13")no longer raises a validation errorDockerDevWorkspace(server_image="ghcr.io/openhands/agent-server:latest")still worksDockerDevWorkspace()(neither field) raises a validation error as expected🤖 Generated with Claude Code
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.12-nodejs22golang: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:e27b76e-pythonRun
All tags pushed for this build
About Multi-Architecture Support
e27b76e-python) is a multi-arch manifest supporting both amd64 and arm64e27b76e-python-amd64) are also available if needed