Skip to content

Conversation

@simonrosenberg
Copy link
Collaborator

@simonrosenberg simonrosenberg commented Dec 3, 2025

Problem

When a release is published (e.g., v1.4.0), the evaluation workflow fails with:

fatal: couldn't find remote ref rel-1.4.0

This happens because:

  1. The release event's target_commitish contains the branch name (e.g., rel-1.4.0), not a commit SHA
  2. After the release PR is merged, the release branch is deleted
  3. The evaluation workflow tries to checkout this deleted branch reference and fails

Solution

Convert the branch name to a commit SHA using git rev-parse before passing it to the evaluation workflow. This ensures the reference remains valid even after branch deletion.

The fix includes a fallback chain:

  1. Try to resolve target_commitish (the branch name) to its SHA
  2. If that fails, try to resolve the release tag name to its SHA
  3. If both fail, use the original target_commitish value

This approach matches the pattern already used for manual workflow dispatch (line 137).

Testing

  • Verified that target_commitish for recent releases contains branch names:
    • v1.4.0: rel-1.4.0
    • v1.3.0: rel-1.3.0
    • v1.2.0: rel-1.2.0
  • Confirmed the fix uses git rev-parse which is already available (repository is checked out at line 73)
  • Verified fallback logic handles edge cases

Impact

  • ✅ Future release evaluations will work even after branch deletion
  • ✅ No changes required to evaluation infrastructure
  • ✅ Backward compatible with existing workflow
  • ✅ Consistent with manual dispatch behavior

@simonrosenberg 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:8802b90-python

Run

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

All tags pushed for this build

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

About Multi-Architecture Support

  • Each variant tag (e.g., 8802b90-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., 8802b90-python-amd64) are also available if needed

@simonrosenberg simonrosenberg marked this pull request as ready for review December 3, 2025 19:54
@simonrosenberg simonrosenberg force-pushed the fix-eval-release-branch-deleted branch from e9eaf85 to 501e9f3 Compare December 3, 2025 20:11
When a release is created and merged, GitHub automatically deletes the release branch.
The workflow was using target_commitish (the branch name) which becomes invalid after deletion.

Solution: Use the release tag instead, which persists after the branch is deleted.

Co-authored-by: openhands <openhands@all-hands.dev>
@simonrosenberg simonrosenberg force-pushed the fix-eval-release-branch-deleted branch from 501e9f3 to e800e69 Compare December 3, 2025 20:18
@simonrosenberg simonrosenberg merged commit a55325c into main Dec 3, 2025
21 checks passed
@simonrosenberg simonrosenberg deleted the fix-eval-release-branch-deleted branch December 3, 2025 20:28
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.

5 participants