a2aproject / a2aproject/a2a-python

[Bug]: get_info_for_dispatch default resolves to empty owner in multi-owner deployments

未关闭
#1,231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component: server maintainers-only
主要语言
Python
星标
2.1k
派生
496
平均合并
4 天 17 小时
30 天内合并 PR
12

描述

### What happened?

PushNotificationConfigStore.get_info_for_dispatch(task_id) is the cross-owner read used by the dispatch loop it must return every config for a task regardless of which owner registered it. But the shipped (non-abstract) default falls back to an owner-scoped get_info with an empty context:

```
# push_notification_config_store.py (v1.1.3) — default fallback
async def get_info_for_dispatch(self, task_id):
logger.warning('%s does not override get_info_for_dispatch ...', type(self).__name__)
return await self.get_info(task_id, ServerCallContext()) # empty context
```
get_info resolves the owner partition from that context:
```
# inmemory_push_notification_config_store.py — get_info
owner = self.owner_resolver(context) # empty ctx -> empty-string owner
owner_infos = self._get_owner_push_notification_infos(owner)
return list(owner_infos.get(task_id, [])) # that partition is empty -> []
```
So ServerCallContext() -> empty-string owner -> returns [] -> every push notification is silently dropped in any multi-owner deployment. The only signal is a per-call logger.warning.

__Proposed fix:__ #1180 fixes this by __marking the method as abstractmethod__. However, the method shipped as non-abstract (latest released versions at this time - v1.1.4), so this is a breaking change to a public ABC (existing subclasses fail to instantiate on upgrade) and should be a part of a major release.

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。