Lee-W commented on code in PR #72786:
URL: https://github.com/apache/airflow/pull/72786#discussion_r4052552625
##########
providers/common/ai/src/airflow/providers/common/ai/toolsets/managed_agent.py:
##########
@@ -320,7 +386,7 @@ async def invoke(self, prompt: str) -> Any:
except self._failover_on:
if position == last:
raise
- standby = self._members[position + 1].agent_ref
+ standby = _resolve_agent_ref(self._members[position + 1])
Review Comment:
Both `_resolve_agent_ref` now go through `_normalize_agent_ref`, so the dict
always carries `platform` and `name`.
The warning renders `Managed agent ? on unknown (position 0) failed; failing
over to ? (position 1)`.
`position` is now part of that warning and into the standby log, zero-based
to match the tag of the same name on `managed_agent.served`.
`managed_agent.failover` did not gain a `position` tag which needs a
registry entry.
A member whose `agent_ref` returns a dict missing a key without raising now
degrades the same way a raising one does, which the old `except`-only shape
never reached.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]