-
Notifications
You must be signed in to change notification settings - Fork 470
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: a2aproject/a2a-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: a2aproject/a2a-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 10 files changed
- 5 contributors
Commits on Jul 20, 2026
-
fix: persist early producer failure as FAILED with originating message (
#1106) Fixes #1067 ## Summary - seed the originating message into V2 ActiveTask TaskManager creation so newly created fallback tasks retain request history - synchronously persist TASK_STATE_FAILED from _run_producer when producer setup/execution raises, so persistence does not depend on the closing event queue - avoid appending the seeded originating message a second time when the first task update also carries it ## Tests - ./scripts/lint.sh - uv run pytest tests/server/request_handlers/test_default_request_handler_v2.py::test_on_message_send_early_producer_exception_marks_task_failed tests/server/request_handlers/test_default_request_handler_v2.py::test_on_message_send_early_producer_exception_preserves_originating_message - uv run pytest tests/server/request_handlers/test_default_request_handler_v2.py --------- Co-authored-by: mykytanetipa <mykytanetipa@google.com>
Configuration menu - View commit details
-
Copy full SHA for 4e3d724 - Browse repository at this point
Copy the full SHA 4e3d724View commit details -
fix(agent_execution): resolve ActiveTask 'destroyed but pending' warn…
…ing during teardown (#1122) Fixes #1121. This PR resolves the issue where `ActiveTask` would throw an asyncio warning when being garbage collected, by ensuring the `_producer_task` is properly awaited during the `_run_consumer` teardown path, allowing queues to properly close without leaving dangling pending background tasks. --------- Co-authored-by: mykytanetipa <mykytanetipa@google.com>
Configuration menu - View commit details
-
Copy full SHA for d19c4d2 - Browse repository at this point
Copy the full SHA d19c4d2View commit details -
feat(server): add aclose() to drain ActiveTask background tasks (#1101)…
… (#1105) ## Summary Adds a public `aclose()` teardown to `ActiveTask`, `ActiveTaskRegistry`, and `DefaultRequestHandlerV2` that force-drains the SDK-owned producer, consumer, and dispatcher `asyncio.Task`s so none are left pending at event-loop shutdown. - `ActiveTask.aclose()` force-closes both event queues and cancels the producer and consumer tasks, then awaits them. It sets `_is_finished` under `_lock`, so it is mutually exclusive with `start()` (which refuses to spawn once `_is_finished` is set). - `ActiveTaskRegistry.aclose()` marks the registry closed so `get_or_create` refuses new work, drains every active task, then awaits the in-flight `_remove_task` cleanup tasks. The lock is released before awaiting because `_remove_task` re-acquires it. - `DefaultRequestHandlerV2.aclose()` delegates to the registry drain, for wiring into an ASGI `lifespan` / `on_shutdown` hook. ## Why Fixes #1101. At shutdown the `ActiveTask` producer can stay pending and surface as `Task was destroyed but it is pending!`. The producer's `finally` calls `_event_queue_subscribers.close(immediate=False)`, which awaits `join()` on every subscriber sink; an abandoned subscriber leaves an undrained sink, so the `join()` never returns and the producer hangs. There is no public way to drain these background tasks today. `aclose()` closes the queues with `immediate=True`, which releases the wedged producer, and reaps the tasks. The teardown always forces rather than exposing a graceful `immediate=False` option, because that path inherits the documented `close(immediate=False)` deadlock and a shutdown hook must be bounded. ## Test plan - [x] `uv run pytest tests/server/agent_execution/ tests/server/request_handlers/ tests/server/events/` — pass - [x] `uv run pytest --cov=a2a --cov-fail-under=88` — pass - [x] `./scripts/lint.sh` — ruff, ruff-format, and ty clean New tests cover the registry drain, idempotency, empty registry, new-work rejected after close, and an errored task being logged rather than propagated; `ActiveTask` reaping a running producer and force-closing past an undrained subscriber (the #1101 repro); and the handler drain. Fixes #1101 🦕
Configuration menu - View commit details
-
Copy full SHA for 9801f46 - Browse repository at this point
Copy the full SHA 9801f46View commit details
Commits on Jul 22, 2026
-
chore(main): release 1.1.2 (#1139)
🤖 I have created a release *beep* *boop* --- ## [1.1.2](v1.1.1...v1.1.2) (2026-07-20) ### Features * **server:** add aclose() to drain ActiveTask background tasks ([#1101](#1101)) ([#1105](#1105)) ([9801f46](9801f46)) ### Bug Fixes * **agent_execution:** resolve ActiveTask 'destroyed but pending' warning during teardown ([#1122](#1122)) ([d19c4d2](d19c4d2)) * persist early producer failure as FAILED with originating message ([#1106](#1106)) ([4e3d724](4e3d724)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Configuration menu - View commit details
-
Copy full SHA for 3e6fa6a - Browse repository at this point
Copy the full SHA 3e6fa6aView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.1.1...v1.1.2