0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-08 21:58:24 +02:00
Nicolas fc23bd7b3a
Repair duration display for bad stopped timestamps (#37121)
Workflow run, job, task, and step durations could show **negative**
values (e.g. `-50s`) when `Stopped` was missing, zero (epoch), or
**before** `Started` (clock skew, races, reruns). The UI used
`calculateDuration` with no validation.

This change:

- Uses each row`s **Updated** timestamp as a **fallback end time** when
`Stopped` is invalid but the status is terminal, so duration
approximates elapsed time instead of `0s` or a negative.
- Keeps **`ActionRun.Duration()`** clamped to **≥ 0** when
`PreviousDuration` plus the current segment would still be negative
(legacy bad data).

Fixes #34582.

Co-authored-by: Composer <composer@cursor.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-07 02:11:52 +00:00
..
2026-03-23 18:23:42 +00:00
2026-03-07 00:28:46 +08:00
2026-02-28 11:23:20 -08:00
2026-04-03 12:19:04 +00:00
2026-04-03 12:19:04 +00:00