Open jeremydonahue opened 1 month ago
Hello! Thank you for filing an issue.
The maintainers will triage your issue shortly.
In the meantime, please take a look at the troubleshooting guide for bug reports.
If this is a feature request, please review our contribution guidelines.
Checks
Controller Version
v0.27.6
Helm Chart Version
0.23.7
CertManager Version
v1.10.1
Deployment Method
Helm
cert-manager installation
Not applicable to this issue but is installed correctly.
Checks
Resource Definitions
To Reproduce
Describe the bug
Workflow Job run duration metrics are always in the
+Inf
bucket due to a bug in the code used to determine the run time. It is relying on the following code to get the queued and started time:And then it subtracts the started time from the completion time to calculate the run duration of the job. However, the
"Waiting for a runner to pick up this job..."
and"Job is about to start running on the runner:"
lines only exist in the job output until the job is completed, at which point Github removes from from the output. When those lines aren't present,completedTime
is correct butstartedTime
is the zero value fortime.Time
, which means you end up with a run duration of eg.2562047h47m16.854775807s
. See https://go.dev/play/p/fPfsc6Wp-gm for example.Describe the expected behavior
The job duration metric should be correct.
Whole Controller Logs
Whole Runner Pod Logs
Additional Context
Here are the job logs from the same job before and after the job is complete:
Before job is complete:
After job is complete:
~I'll be submitting a PR to fix this shortly~ PR which fixes the issue: https://github.com/actions/actions-runner-controller/pull/3532