Skip to content

gh run list has incorrect "elapsed" values #5931

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.

Activity

  1. added
    priority-2Affects more than a few users but doesn't prevent core functions
    and removed on Jul 13, 2022
  2. mislav commented on Jul 13, 2022

    @mislav
    Contributor

    Hi, thank you for reporting. The cause of this is related to #5629 and the bug will be addressed as part of that fix. Will keep this issue open separately for visibility 👍

  3. me-and commented on Jul 13, 2022

    @me-and
    Author

    @mislav perfect, thank you! I did spot that issue before raising this one, but it wasn't obvious to me that it had the same underlying cause.

  4. Michael222223 commented on Jul 20, 2022

    @Michael222223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects 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