Skip to content

Commit 03f5a26

Browse files
author
Ankit Juneja
committed
fix: cloudwatch_is_available should check source key presence not connection_verified
detect_sources.py populates sources["cloudwatch"] from alert annotations (cloudwatch_log_group) but never writes connection_verified — CloudWatch uses ambient IAM auth, not an API key. Checking connection_verified caused the tool to be permanently hidden even when CloudWatch context was present.
1 parent f3f5434 commit 03f5a26

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/tools/utils/availability.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ def datadog_available_or_backend(sources: dict[str, dict]) -> bool:
3535

3636

3737
def cloudwatch_is_available(sources: dict[str, dict]) -> bool:
38-
"""Available when a CloudWatch integration is configured.
38+
"""Available when a CloudWatch source is present in the alert context.
3939
40-
CloudWatch uses IAM-based auth — no connection string to extract.
40+
CloudWatch uses IAM-based auth so detect_sources never writes
41+
connection_verified — availability is gated on the source key existing
42+
(populated when cloudwatch_log_group is present in alert annotations).
4143
Tool params like ``job_queue`` are alert-specific and provided by the LLM.
4244
"""
43-
return bool(sources.get("cloudwatch", {}).get("connection_verified"))
45+
return bool(sources.get("cloudwatch"))

0 commit comments

Comments
 (0)