Commit 40d9fef
committed
kubernetes: surface log-unavailable reason and observability link in placeholder
When log acquisition fails, replace the empty return value with a human-
readable message that includes the pod name, namespace, and — when
TANGLE_LOG_SEARCH_URL_TEMPLATE is set — a direct link to the pod's logs in
the configured observability platform.
The URL template supports two placeholders substituted at runtime:
{pod_name} — Kubernetes pod name
{start_time} — relative start derived from started_at (e.g. "now-125m",
adding 5 min of padding); falls back to "now-1440m" (24 h)
if the start time is not available in memory.
Both started_at values (LaunchedKubernetesContainer from pod container state,
LaunchedKubernetesJob from job status) are in-memory reads — no additional
database queries are required to compute the time range.
The placeholder is stored in GCS via upload_log and returned verbatim by the
log-read API, so it surfaces wherever logs are displayed without any frontend
or schema changes.1 parent 27b57aa commit 40d9fef
1 file changed
Lines changed: 54 additions & 2 deletions
Lines changed: 54 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
72 | 120 | | |
73 | 121 | | |
74 | 122 | | |
| |||
944 | 992 | | |
945 | 993 | | |
946 | 994 | | |
947 | | - | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
948 | 998 | | |
949 | 999 | | |
950 | 1000 | | |
| |||
1528 | 1578 | | |
1529 | 1579 | | |
1530 | 1580 | | |
1531 | | - | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
1532 | 1584 | | |
1533 | 1585 | | |
1534 | 1586 | | |
| |||
0 commit comments