This is an automated email from the ASF dual-hosted git repository.
Lee-W pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new a0e9d68b98a Fix common.ai managed agent failover when an identity
cannot resolve (#72786)
a0e9d68b98a is described below
commit a0e9d68b98aa98c5269913034fedbf1cea22b160
Author: Wei Lee <[email protected]>
AuthorDate: Thu Oct 8 18:32:17 2026 +0900
Fix common.ai managed agent failover when an identity cannot resolve
(#72786)
---
providers/common/ai/docs/toolsets/managed_agent.rst | 8 ++++++++
.../airflow_shared/observability/metrics/metrics_template.yaml | 6 ++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/providers/common/ai/docs/toolsets/managed_agent.rst
b/providers/common/ai/docs/toolsets/managed_agent.rst
index bc5d6464610..f3976b4734e 100644
--- a/providers/common/ai/docs/toolsets/managed_agent.rst
+++ b/providers/common/ai/docs/toolsets/managed_agent.rst
@@ -263,6 +263,14 @@ failover warning names the members involved and their
positions, but not in XCom
Both counters are tagged by platform rather than agent name to keep cardinality
bounded.
+``platform`` can also show up as the literal string ``"unknown"``: when an
+agent's identity fails to resolve -- a connection lookup failing, or a bug in
+the subclass's own ``agent_ref`` implementation -- a warning is logged and the
+call proceeds anyway rather than failing outright, and it is that fallback --
+not a real platform -- that lands in the tag. An ``"unknown"`` bucket
+therefore means the invocation went out without a confirmed platform; the
+task log's warning at the same timestamp is where to find out why.
+
Implementing the contract for a new vendor
------------------------------------------
diff --git
a/shared/observability/src/airflow_shared/observability/metrics/metrics_template.yaml
b/shared/observability/src/airflow_shared/observability/metrics/metrics_template.yaml
index 448f9aa702a..93d09231136 100644
---
a/shared/observability/src/airflow_shared/observability/metrics/metrics_template.yaml
+++
b/shared/observability/src/airflow_shared/observability/metrics/metrics_template.yaml
@@ -411,8 +411,10 @@ metrics:
- name: "managed_agent.served"
description: "Number of managed agent invocations answered through a
managed-agent toolset,
emitted once per answer. Metric with tool and platform tagging; a toolset
over a failover
- group reports the platform as ``failover``, and ``unknown`` means the
agent's identity could
- not be resolved. Read next to ``managed_agent.failover``, which records
each transition by
+ group reports the platform as ``failover``, and platform is the literal
string ``unknown``
+ when the agent's identity fails to resolve -- a connection lookup failing,
or a bug in the
+ subclass's own ``agent_ref`` implementation -- a case in which the call
still proceeds after
+ logging a warning. Read next to ``managed_agent.failover``, which records
each transition by
platform."
type: "counter"
legacy_name: "-"