[Bug]: get_info_for_dispatch default resolves to empty owner in multi-owner deployments
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend
Research direction
The bug is in push_notification_config_store.py and inmemory_push_notification_config_store.py. Start by reading the default get_info_for_dispatch method and see how it calls get_info with an empty ServerCallContext. Then examine the owner_resolver logic in the in-memory store to understand the empty-string owner partition. The fix is to make the method abstract, but check existing subclasses first. Run any existing tests for push notifications to verify the behavior.
Written by the indexing model from the issue text.
Description
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
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 499
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from a2aproject/a2a-python
-
Create push notification config returns no id on database-backed storesPossibly taken @ConnorMoss02 claimed this 3 days ago. Opencomponent: server
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
a2aproject/a2a-python#1237 · 2 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
maintainers-only
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
a2aproject/a2a-python#805 · 1 comment ·
Maintainers usually reply within 2 days
-
[Feat]: Change Httpx to Httpx2Possibly taken @rohityan claimed this 1 day ago. Opencomponent: client status: needs review
a2aproject/a2a-python#1288 · 2 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: Streaming follow-up on an existing task does not begin with a Task; enqueuing the current task drops the follow-up message from historyPossibly taken @rohityan claimed this 2 days ago. Opencomponent: server status:awaiting response
a2aproject/a2a-python#1285 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
component: core
a2aproject/a2a-python#1278 · 9 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in a2aproject/a2a-python
Similar issues
-
New InternshipOpennew_internship
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
[BUG] Reports tab: "Unban" button tooltip shows raw `{{ip}}` placeholder instead of the IP addressOpenbug javascript ui
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bunkerity/bunkerweb#4001 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/differential-privacy#516 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
adobe-fonts/source-serif#153 ·