Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh run rerun --failed fails with "its workflow file may be broken" when workflow not finished yet #9221

Copy link
Copy link

Description

@findepi
Issue body actions

Describe the bug

When gh run rerun --failed is invoked on a workflow that did not complete yet (and thus is not re-runnable at least in the web UI), the command prints "run .... cannot be rerun; its workflow file may be broken", which does not indicate actual reason of the failure

$ gh --version
gh version 2.50.0 (2024-05-29)
https://github.com/cli/cli/releases/tag/v2.50.0

Steps to reproduce the behavior

  1. Create a workflow with multiple jobs so that one fails and one continues to run longer
  2. Create a PR, wait for the to-be-failed job to fail
  3. Obtain status checks for this PR e.g. with gh pr checks "${pr_link}" --json 'link,bucket' --jq 'map(. | select(.bucket == "fail")' -- the job is reported as failed
  4. Obtain the run ID -- either from web UI or with something like gh pr checks "${pr_link}" --json 'link,bucket' --jq 'map(. | select(.bucket == "fail") | .link | sub(".*/runs/(?<id>[0-9]+)/job/[0-9]+$"; "\(.id)") ) | unique | .[]'
  5. Attempt re-running the failed jobs: gh run rerun --failed "${run_id}"

Expected vs actual behavior

Expected: gh run rerun to print something indicating that workflow/run cannot be rerun before it finishes
Actual: message not indicating what the actual problem is

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workinggh-runrelating to the gh run commandrelating to the gh run commandhelp wantedContributions welcomeContributions welcomepriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.