-
Notifications
You must be signed in to change notification settings - Fork 59
Add simple version tags for agent-server Docker images #1197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Modified versioned_tag property to versioned_tags returning a list
- Changed format from v{SDK_VERSION}_{BASE_IMAGE_SLUG} to {SDK_VERSION}-{TAG}
- Generate simple tags like 1.2.0-python, 1.2.0-java, 1.2.0-golang
- Updated all_tags property to iterate over versioned_tags list
- Updated GitHub Actions output to use versioned_tags_csv instead of versioned_tag
- Added comprehensive tests for the new versioned tags functionality
This makes Docker image tags more intuitive and aligns with common Docker
tagging conventions. Users can now pull images with simple version tags:
ghcr.io/openhands/agent-server:1.2.0-python
ghcr.io/openhands/agent-server:1.2.0-java
ghcr.io/openhands/agent-server:1.2.0-golang
Fixes #1195
Co-authored-by: openhands <[email protected]>
Coverage Report •
|
||||||||||||||||||||
| fh.write("EOF\n") | ||
|
|
||
| _write_gha_outputs(opts.image, opts.short_sha, opts.versioned_tag, tags) | ||
| _write_gha_outputs(opts.image, opts.short_sha, opts.versioned_tags, tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OpenHands please check in this repo if our image building workflow servers.yml will enable these version tags on "git tags"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on it! xingyaoww can track my progress at all-hands.dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my analysis of the repository, here's the answer to your question:
Summary: Version Tags on Git Tags - Current State
Question: Will the image building workflow server.yml enable version tags on git tags?
Answer: The workflow partially supports versioned tags, but has a critical gap that prevents the feature from working correctly.
What Currently Works ✅
- Trigger: The workflow triggers correctly on any git tag push (line 7-8)
- Build Detection: The build job detects git tags and enables the
--versioned-tagflag (lines 242-244) - Architecture-Specific Images: Individual architecture images ARE pushed with version tags:
ghcr.io/openhands/agent-server:1.2.0-python-amd64ghcr.io/openhands/agent-server:1.2.0-python-arm64- etc.
Critical Gap ❌
The merge-manifests job does NOT create multi-arch manifests for versioned tags.
Currently, the merge-manifests job only creates multi-arch manifests for:
- SHA-based tags:
b642962-python - Latest tags (main branch):
latest-python
It does NOT create the intended simple version tags:
1.2.0-python← MISSING1.2.0-java← MISSING1.2.0-golang← MISSING
Impact
Users cannot pull images using the simple version tags described in your PR:
# This will NOT work (manifest doesn't exist):
docker pull ghcr.io/openhands/agent-server:1.2.0-python
# Users would need to specify architecture explicitly:
docker pull ghcr.io/openhands/agent-server:1.2.0-python-amd64Required Fix
The merge-manifests job (lines 355-406) needs to be updated to:
- Detect when triggered by a git tag
- Extract the SDK version from build artifacts (
versioned_tags_csvis available inGITHUB_OUTPUT) - Create multi-arch manifests for each versioned tag
The build.py script already generates and outputs versioned_tags_csv, but this information needs to be:
- Saved to the build-info artifacts (currently only
tagsis saved, notversioned_tags) - Used by the merge-manifests job to create the versioned multi-arch manifests
In summary: The versioned tags feature is incomplete. It pushes architecture-specific images but doesn't create the multi-arch manifests needed for users to pull images with simple version tags like 1.2.0-python.
Summary
This PR implements simple, intuitive version tags for agent-server Docker images on release, making it easier for users to pull specific versions.
Changes
Modified Docker Build System
versioned_tagproperty toversioned_tags: Now returns a list of strings instead of a single stringv{SDK_VERSION}_{BASE_IMAGE_SLUG}to{SDK_VERSION}-{TAG}for each custom tag1.2.0-pythoninstead ofv1.2.0-pythonfor consistencyUpdated Integration Points
all_tagsproperty: Now iterates overversioned_tagslist instead of appending a single tagversioned_tagtoversioned_tags_csv(comma-separated list)Added Comprehensive Tests
Added 9 new test cases covering:
all_tagspropertyBefore vs After
Before (current behavior)
After (new behavior)
Benefits
1.2.0-pythonTesting
All tests pass, including:
Example Usage
After this change, users can pull specific versions with:
Fixes #1195
@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
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:b642962-pythonRun
All tags pushed for this build
About Multi-Architecture Support
b642962-python) is a multi-arch manifest supporting both amd64 and arm64b642962-python-amd64) are also available if needed