argoproj / argoproj/argo-workflows

UI: Support viewing logs for containers created by resource template

Open
#7,012 10 comments 9 reactions 0 assignees View on GitHub
area/docs area/templates/resource area/ui solution/superseded
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

AFAIK, currently argo can only log container defined in Workflow step, not the container it creates through resource template. It will be useful if users can specify the container they want to log.

# Use Cases

For example, if users want to use argo and kubeflow training operator for ML training, they can use the follow template
```yaml
- metadata:
labels:
user: xxx
name: step4
resource:
action: create
failureCondition: failed in (status.replicaStatuses.Master, status.replicaStatuses.Worker)
manifest: |
apiVersion: kubeflow.org/v1
kind: PyTorchJob
metadata:
generateName: step4-pytorchjob-
labels:
user: xxx
namespace: xxx
spec:

```
However, currently argo can only log the container of that "argo container", which looks like below:
```
time="2021-10-21T07:01:06.195Z" level=info msg="0/1 success conditions matched"
time="2021-10-21T07:01:06.195Z" level=info msg="Waiting for resource pytorchjob.kubeflow.org/pytorchjob-l8kc9 in namespace argo resulted in retryable error: Neither success condition nor the failure condition has been matched. Retrying..."
time="2021-10-21T07:01:11.199Z" level=info msg="Get pytorchjobs 200"
time="2021-10-21T07:01:11.199Z" level=info msg="failure condition '{failed in [status.replicaStatuses.Master status.replicaStatuses.Worker]}' evaluated false"
time="2021-10-21T07:01:11.199Z" level=info msg="success condition '{status.replicaStatuses.Master.succeeded exists []}' evaluated false"
time="2021-10-21T07:01:11.199Z" level=info msg="0/1 success
```
Can we support this feature? Thanks.

---

**Message from the maintainers**:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue. Start by tracing how the UI currently retrieves logs for workflow-step containers and how resource-template-created Kubernetes objects are represented; done means users can select a container from the created resource and view its logs, with coverage for the Kubeflow training-job example.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
backend, frontend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.