Skip to content

Fix API breakage check robustness and reporting#2098

Open
enyst wants to merge 3 commits intomainfrom
openhands/fix-api-breakage-check-2097
Open

Fix API breakage check robustness and reporting#2098
enyst wants to merge 3 commits intomainfrom
openhands/fix-api-breakage-check-2097

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Feb 17, 2026

Summary

Fix the API breakage check to avoid spurious warnings and improve PR visibility:

  • Handle Griffe alias resolution failures (e.g. workspace re-exports of SDK types) without aborting the entire export comparison.
  • If the previous release lacks a static __all__, continue emitting a warning and skip export-based checks (this should be fixed in the next release).
  • Capture the check output and post/update a PR comment with pass/fail status; on failure include a collapsed log excerpt (first 1000 chars) and a direct link to the Actions run.

Closes #2097.

Checklist

  • If the PR is changing/adding functionality, are there tests to reflect this?
  • If there is an example, have you run the example to make sure that it works?
  • If there are instructions on how to run the code, have you followed the instructions and made sure that it works?
  • If the feature is significant enough to require documentation, is there a PR open on the OpenHands/docs repository with the same branch name?
  • Is the github CI passing?

@enyst 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:f338726-python

Run

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

All tags pushed for this build

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

About Multi-Architecture Support

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

Handle unresolved Griffe aliases and baseline missing __all__ in older releases.
Add PR comment step with summarized log output.

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Align workflow permissions with other comment-posting workflows (pull-requests: write) to avoid 403 Resource not accessible by integration.

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Contributor

API breakage checks (Griffe)

Result: Passed

Action log

@enyst enyst marked this pull request as ready for review February 17, 2026 16:31
Copy link
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid fix for the API breakage check robustness. The error handling is pragmatic - catches specific failures without aborting the entire check. Tests cover the new behavior. 👍

Core improvements:

  • Handles Griffe alias resolution failures gracefully without aborting the full check
  • Properly skips export-based checks when old release lacks __all__
  • PR automation with pass/fail status and log excerpts improves visibility

Minor suggestions (optional):

  • Line 167 in check_sdk_api_breakage.py: breakages: list[object] will hold both Griffe Breakage objects and dicts. Consider list[Any] for clarity.
  • Line 65 in api-breakage.yml: Fixed 1000-char truncation might cut mid-line. Line-based truncation would be cleaner, but this works fine for a quick preview.

The refactoring in _compute_breakages that separates module resolution from export extraction is much cleaner than the original. LGTM!

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.

API breakage check bug

3 participants

Comments