Skip to content

Enforce deprecation period for removed public methods#2083

Merged
enyst merged 6 commits intomainfrom
ci/api-breakage-method-removal
Feb 15, 2026
Merged

Enforce deprecation period for removed public methods#2083
enyst merged 6 commits intomainfrom
ci/api-breakage-method-removal

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Feb 15, 2026

Summary

  • Extend the Griffe API breakage check to treat removal of public class members (methods/properties/attributes) from classes exported via openhands.sdk.__all__ as requiring a prior deprecation.
  • Deprecation markers supported: @deprecated(...) on the member itself, warn_deprecated("Class.member", ...), or deprecating the class.
  • Adds unit tests covering method removal with/without prior deprecation.

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?

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:3b7d12f-python

Run

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

All tags pushed for this build

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

About Multi-Architecture Support

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

enyst and others added 3 commits February 15, 2026 10:31
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
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.

🟢 Good taste - This is solid engineering that solves a real problem.

Key strengths:

  • AST visitor pattern is a clean improvement over ast.walk()
  • DeprecatedSymbols dataclass provides good separation of concerns
  • Tests verify real behavior without over-mocking
  • Solves actual backwards compatibility enforcement needs

One minor suggestion below about code duplication, but nothing blocking.

Co-authored-by: openhands <openhands@all-hands.dev>
@enyst enyst requested a review from VascoSch92 February 15, 2026 10:47
@enyst
Copy link
Collaborator Author

enyst commented Feb 15, 2026

@OpenHands Read all comments and all inline review threads, use gh, it will be easier. And fix the issues raised by code review. For each inline review thread, fix it and then reply in the same thread with what you did. But make sure it’s a reply for each, do not edit the comments. Precommit, push.

@openhands-ai
Copy link

openhands-ai bot commented Feb 15, 2026

I'm on it! enyst can track my progress at all-hands.dev

Co-authored-by: openhands <openhands@all-hands.dev>
@openhands-ai
Copy link

openhands-ai bot commented Feb 15, 2026

Final summary (since last update)

Verification / completeness checklist

  • Reviewed all inline review threads on PR Enforce deprecation period for removed public methods #2083 (queried via gh api graphql).
  • Fixed every open inline thread’s request with targeted code changes in .github/scripts/check_sdk_api_breakage.py.
  • Replied in each inline review thread with what was changed (posted new replies; did not edit existing comments).
  • Ran pre-commit (pre-commit run -a) until clean.
  • Committed and pushed changes to branch ci/api-breakage-method-removal.

What changed (concise)

  • Added clearer type annotations in the API breakage checker where requested (improves readability).
  • Updated DeprecatedSymbols to a lightweight @dataclass(..., slots=True) and made it constructible as DeprecatedSymbols() by adding defaults; updated call sites accordingly.
  • Replaced silent SyntaxError swallowing during AST parsing with an emitted ::warning containing the filename + error (still continues scanning other files).

Repo state

  • Working tree is clean (git status shows nothing to commit).
  • Changes are already pushed to origin/ci/api-breakage-method-removal (commit 0f1c4d80).

View full conversation

@enyst enyst enabled auto-merge (squash) February 15, 2026 19:59
@enyst enyst merged commit 4cdb18b into main Feb 15, 2026
20 checks passed
@enyst enyst deleted the ci/api-breakage-method-removal branch February 15, 2026 20:02
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