Commit d97adab
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 d97adab
1 file changed
Lines changed: 43 additions & 2 deletions
Lines changed: 43 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 | + | |
72 | 109 | | |
73 | 110 | | |
74 | 111 | | |
| |||
944 | 981 | | |
945 | 982 | | |
946 | 983 | | |
947 | | - | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
948 | 987 | | |
949 | 988 | | |
950 | 989 | | |
| |||
1528 | 1567 | | |
1529 | 1568 | | |
1530 | 1569 | | |
1531 | | - | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
1532 | 1573 | | |
1533 | 1574 | | |
1534 | 1575 | | |
| |||
0 commit comments