argoproj / argoproj/argo-workflows

Argo UI Links: Logs missing due to millisecond truncation

Open
#14,064 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

### Pre-requisites

- [X] I have double-checked my configuration
- [X] I have tested with the `:latest` image tag (i.e. `quay.io/argoproj/workflow-controller:latest`) and can confirm the issue still exists on `:latest`. If not, I have explained why, **in detail**, in my description below.
- [X] I have searched existing issues and could not find a match for this bug
- [x] I'd like to contribute the fix myself (see [contributing guide](https://github.com/argoproj/argo-workflows/blob/main/docs/CONTRIBUTING.md))

### What happened? What did you expect to happen?

I have the following links in the Argo Config:
```
links:
- name: Explore Pod Logs
scope: pod
url: http:///...from%22:%22${status.startedAtEpoch}%22,%22to%22:%22${status.finishedAtEpoch}%22...
```

Argo just takes into account **seconds** in `${status.finishedAt}` so any logs scraped after a few milliseconds will not be displayed. For example, I have a pod whose `init` container failed. Logs started at `16:59:46.303` and ended at `16:59:46.565`. Argo set the variables `${status.startedAtEpoch}` to `1729609185000 (16:59:45.000)` and `${status.finishedAtEpoch}` to `1729609186000 (16:59:46.000)`. Unfortunately, the latter is not in the range of the `init` container logs. Increasing `finishedAtEpoch=1729609187000 (16:59:47.000)` solves this issue.

I would expect the query in the created link to show all the logs of the pod, including the `init`, `main` and `wait` containers. It should be enough to add a few seconds to `finishedAtEpoch` in the query to include any log scraping delay.

### Version(s)

v.3.5.11, v.3.6.2

### Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.

```YAM
Any Workflow should be good. Links in the Controller should be done at the pod level as described above.
```

### Logs from the workflow controller

```text
The bug is in the Argo Links
```

### Logs from in your workflow's wait container

```text
The bug is in the Argo Links
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Argo Links handling for pod-level ${status.startedAtEpoch} and ${status.finishedAtEpoch} values, then reproduce the issue with a short-lived pod whose logs end within the same second. Done means generated links include the init, main, and wait container logs despite log-scraping delay, with coverage for the adjusted end time.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.