Skip to content

Conversation

@xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Jan 21, 2026

Problem

The create-version-bump-prs job in the pypi-release workflow was failing with this error:

Cannot enrich dependency with incompatible constraints: openhands-agent-server (==1.9.0) and openhands-agent-server (==1.8.2)

See failed run: https://github.com/OpenHands/software-agent-sdk/actions/runs/21219466794/job/61050384856

Root Cause

The OpenHands pyproject.toml has dependencies declared in two places:

  1. [project].dependencies (PEP 621 format for UV compatibility):

    dependencies = [
      ...
      "openhands-agent-server==1.8.2",
      "openhands-sdk==1.8.2",
      "openhands-tools==1.8.2",
      ...
    ]
  2. [tool.poetry.dependencies] (Poetry format):

    openhands-sdk = "1.8.2"
    openhands-agent-server = "1.8.2"
    openhands-tools = "1.8.2"

The workflow was only updating the [tool.poetry.dependencies] section via poetry add, leaving the [project].dependencies section with the old version. When poetry lock ran, it detected the conflict between the two sections.

Solution

Added sed commands to update the [project].dependencies section before running poetry add:

sed -i 's/"openhands-sdk==[^"]*"/"openhands-sdk=='"$VERSION"'"/' pyproject.toml
sed -i 's/"openhands-tools==[^"]*"/"openhands-tools=='"$VERSION"'"/' pyproject.toml
sed -i 's/"openhands-agent-server==[^"]*"/"openhands-agent-server=='"$VERSION"'"/' pyproject.toml

This ensures both sections have the same version, avoiding the conflict during poetry lock.

Testing

This can be tested by re-running the workflow after merging this PR, or by manually simulating the workflow steps on a clone of the OpenHands repo.

@xingyaoww can click here to continue refining the PR


Agent Server images for this PR

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

Variants & Base Images

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

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:3cf2ab8-python

Run

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

All tags pushed for this build

ghcr.io/openhands/agent-server:3cf2ab8-golang-amd64
ghcr.io/openhands/agent-server:3cf2ab8-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:3cf2ab8-golang-arm64
ghcr.io/openhands/agent-server:3cf2ab8-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:3cf2ab8-java-amd64
ghcr.io/openhands/agent-server:3cf2ab8-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:3cf2ab8-java-arm64
ghcr.io/openhands/agent-server:3cf2ab8-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:3cf2ab8-python-amd64
ghcr.io/openhands/agent-server:3cf2ab8-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:3cf2ab8-python-arm64
ghcr.io/openhands/agent-server:3cf2ab8-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:3cf2ab8-golang
ghcr.io/openhands/agent-server:3cf2ab8-java
ghcr.io/openhands/agent-server:3cf2ab8-python

About Multi-Architecture Support

  • Each variant tag (e.g., 3cf2ab8-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 3cf2ab8-python-amd64) are also available if needed

The OpenHands pyproject.toml has dependencies declared in two places:
- [project].dependencies (PEP 621 format for UV compatibility)
- [tool.poetry.dependencies] (Poetry format)

The workflow was only updating the [tool.poetry.dependencies] section
via `poetry add`, but leaving the [project].dependencies section with
the old version. This caused a version conflict when running `poetry lock`:

    Cannot enrich dependency with incompatible constraints:
    openhands-agent-server (==1.9.0) and openhands-agent-server (==1.8.2)

This fix adds sed commands to update the [project].dependencies section
before running `poetry add`, ensuring both sections have the same
version and avoiding the conflict.

Co-authored-by: openhands <openhands@all-hands.dev>
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.

3 participants