Skip to content

gh run view - only first attempt #5629

Description

@nyarly

Describe the bug

gh --version -> 2.10.1

After re-running a job, gh run view reports the logs only from the first attempt, not the most recent (or allowing a choice of attempt runs.) This is very confusing when debugging a CI run.

Steps to reproduce the behavior

> gh run rerun
(select a workflow run)
> gh run view
(select same workflow run)

Expected vs actual behavior

Expected to see most recent logs, or choose which attempt to see logs of.

Actually see only the oldest attempt's logs; because I'm expecting the most recent log run, spend hours debugging the wrong problem.

A clear and concise description of what you expected to happen and what actually happened.

Activity

  1. fl250144 commented on May 25, 2022

    @fl250144

    The gh run download does the same and we dont have an option to choose which attempt we want

  2. nyarly commented on May 26, 2022

    @nyarly
    Author

    @mislav @samcoe @josebalius I don't mean to be a pest, but this has been needs-triage for two weeks. I'm happy to look at writing a PR for this (and the other issues I've submitted) once they're ready for work.

  3. samcoe commented on May 30, 2022

    @samcoe
    Contributor

    @nyarly Thanks for the feature request and your patients. I am a bit confused as to the request though. When you trigger a new run using run rerun a new whole new run gets created with its own unique ID, if you want to view the new run you would need to specify the new ID. Is the feature request that you would like to use the previous run ID to view the new run?

  4. added
    more-info-neededMore info needed from user/contributor
    and removed on May 30, 2022
  5. nyarly commented on May 31, 2022

    @nyarly
    Author

    Hey @samcoe, thanks for checking in.

    I'm running through this workflow again now just to check the UI:

    > gh run rerun
     10:49:54 - started
    ? Select a workflow run X Merge remote-tracking branch 'origin/main' into github-deployer-permissions-update, Test Cluster Config (github-deployer-permissions-update) 38m45s ago
    ✓ Requested rerun of run 2416587330
    > gh run view
     10:50:06 - started
    ? Select a workflow run  [Use arrows to move, type to filter]
    > * Merge remote-tracking branch 'origin/main' into github-deployer-permissions-update, Test Cluster Config (github-deployer-permissions-update) 38m56s ago
      X Remove apiGroup value, Test Cluster Config (github-deployer-permissions-update) 47m49s ago
      ✓ Merge pull request #536 from my-org/github-deployer-permissions-update, Build Prod (main) 2h12m21s ago
      ✓ Merge pull request #536 from my-org/github-deployer-permissions-update, Build Demo (main) 2h12m21s ago
      X Merge pull request #536 from my-org/github-deployer-permissions-update, Build and Deploy QA (main) 2h12m21s ago
    

    What I'm seeing here is that there's only one "run" to select, which is consistent with the Web UI - there'd be one "run" with a dropdown of which numbered re-run you want to see. In the web version, though, the dropdown defaults to the latest iteration.
    If there's a new run created by rerun, and that's why I can only view the "oldest" (because it's the only), then the other runs should appear in the gh run view menu, right? Or there should be a sub-menu to select which run I mean.

    As I'm recreating this flow, I'm noticing that when I choose the run this time, I get the current, in-progress run, which is more useful, but from prior experience, if there are only completed runs, I got the oldest one (or a random one? something.)

  6. nyarly commented on May 31, 2022

    @nyarly
    Author

    Elaborating a bit:

    After that re-run completes:

    gh run view
    ? Select a workflow run  [Use arrows to move, type to filter]
    > X Merge remote-tracking branch 'origin/main' into github-deployer-permissions-update, Test Cluster Config (github-deployer-permissions-update) 1h48m32s ago
      X Remove apiGroup value, Test Cluster Config (github-deployer-permissions-update) 1h57m25s ago
      ✓ Merge pull request #536 from my-org/github-deployer-permissions-update, Build Prod (main) 3h21m57s ago
      ✓ Merge pull request #536 from my-org/github-deployer-permissions-update, Build Demo (main) 3h21m57s ago
      X Merge pull request #536 from my-org/github-deployer-permissions-update, Build and Deploy QA (main) 3h21m57s ago
    

    Only one run listed to choose from, not two, and selecting the run that I re-ran:

    X github-deployer-permissions-update Test Cluster Config #538 · 2416587330
    

    Which is the run ID of the initial run.

    I hope this is clarifying the issue I'm encountering. It seems like @fl250144 is having a similar issue with gh run download which I think uses a similar menu interface.

  7. mislav commented on Jun 27, 2022

    @mislav
    Contributor

    Thanks for all the info. I managed to reproduce this and am looking into it further

  8. added
    priority-2Affects more than a few users but doesn't prevent core functions
    and removed
    more-info-neededMore info needed from user/contributor
    on Jun 27, 2022
  9. self-assigned this
    on Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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