argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.91k stars 3.18k forks source link

CronWorkflow reports incorrect Finished and Duration details in the CLI and UI #12888

Open jdinsel-xealth opened 5 months ago

jdinsel-xealth commented 5 months ago

Pre-requisites

What happened/what did you expect to happen?

Looking at the details for a CronWorkflow, the CLI shows the workflow with incorrect Duration details.

NAME                             STATUS                AGE   DURATION   PRIORITY   MESSAGE
xxxxxxx-1712228400   Succeeded            8h     8h                 0

When viewed with argo get, the details are also incorrect.

Name:              xxxxxxx-1712228400
Namespace:         mine
ServiceAccount:    xxxxxxxx
Status:            Succeeded
Conditions:          
 PodRunning.       False
Created:           Thu Apr 04 04:00:00 -0700 (8 hours ago)
Started:           Thu Apr 04 04:00:00 -0700 (8 hours ago)
Duration:          8 hours 35 minutes
Progress:          184/277

The actual duration was closer to 1 hour than 8 hours.

The UI will report the same value for Started and Duration and will show no information in the Finished column. This is seen on the tabular Workflows page. When viewing the workflow tab for the CronWorkflow execution, the START TIME and END TIME for the first node in the graphical display, report the correct values.

Version

v3.5.5

pacmansyu commented 5 months ago

I observe this behavior for all workflows, not just CronWorkflows. The Finished column in the web UI is empty, and the started/duration times match each other in the web UI, and the CLI via "argo list" and "argo get". The Summary tab on the first node in any workflow shows the correct Start/End Time, and Duration.

I am running 3.5.4, recently upgraded from 3.4.7 where I don't recall seeing this behavior.

bastien-k commented 5 months ago

I observed the same behavior when terminating a workflow. Running on 3.5.5.