Skip to content

Add simple version tags (e.g., 1.2.0-python) to agent-server Docker images on release #1195

@xingyaoww

Description

@xingyaoww

Summary

Currently, when we release a new version (e.g., v1.2.0), the agent-server Docker images are tagged with complex versioned tags like v1.2.0_python-nodejs-python3.12-nodejs22 but not with simpler version-based tags like 1.2.0-python.

Current Behavior

When a git tag like v1.2.0 is pushed:

  • The workflow triggers and passes --versioned-tag to build.py
  • Images are tagged with the format: v{SDK_VERSION}_{BASE_IMAGE_SLUG} (e.g., v1.2.0_python-nodejs-python3.12-nodejs22)
  • Images are also tagged with commit-based tags like {SHORT_SHA}-python
  • Images on main branch get main-python, latest-python tags

Proposed Enhancement

Add simpler, more intuitive version tags for releases:

  • 1.2.0-python (or v1.2.0-python)
  • 1.2.0-java (or v1.2.0-java)
  • 1.2.0-golang (or v1.2.0-golang)

This would make it easier for users to:

  1. Pull specific versions by simply using ghcr.io/openhands/agent-server:1.2.0-python
  2. Understand which version they're using without parsing complex base image slugs
  3. Follow common Docker image tagging conventions

Implementation Considerations

The build.py script already has infrastructure for custom tags via custom_tag_list. We could:

  1. Option A: Modify the versioned_tag property to also generate simpler tags when triggered by a git tag
  2. Option B: Add an additional tag format specifically for release tags that follows the pattern {VERSION}-{VARIANT}
  3. Option C: Keep the existing complex versioned tags but add these simpler tags alongside them

Related Files

  • .github/workflows/server.yml - Lines 240-244 handle --versioned-tag flag for git tags
  • openhands-agent-server/openhands/agent_server/docker/build.py - Lines 382-383 define the versioned_tag format

Additional Context

Users looking for agent-server images currently see:

  • latest-python - Clear what this is
  • main-python - Clear what this is
  • v1.2.0_python-nodejs-python3.12-nodejs22 - Not immediately clear, hard to remember
  • 1.2.0-python - This is what users would expect but doesn't exist

Having consistent, predictable version tags would improve user experience and align with Docker image tagging best practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions