Skip to content

gh run list has incorrect "elapsed" values #5931

@me-and

Description

@me-and

Describe the bug

When running gh run list against one of my repositories, the elapsed time for a currently-running job is shown incorrectly, and shows a much shorter elapsed time (25s rather than ~3h) than is accurate.

$ gh --version
gh version 2.13.0 (2022-06-22)
https://github.com/cli/cli/releases/tag/v2.13.0

Steps to reproduce the behavior

  1. Run gh run list -R me-and/Cygwin-Git

It's not clear to me what the actual trigger is; I suspect the problem may be related to the fact that the currently running build has two jobs, and the currently running job has a matrix with two entries.

Expected vs actual behavior

I see something like the below:

$ gh run list -R me-and/Cygwin-Git
STATUS  NAME                                             WORKFLOW  BRANCH                  EVENT  ID          ELAPSED   AGE
*       Bump to v2.37.1                                  CI        main                    push   2658354600  25s       3h
X       Bump to v2.37.1                                  CI        next                    push   2658353920  6m30s     3h
✓       t5601: update skipped test numbers               CI        main                    push   2638367152  4h45m27s  4d

I would expect that top output line to list an elapsed time that broadly matches the age of the run, since it's still running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions