-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-runrelating to the gh run commandrelating to the gh run commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
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
- Create a workflow with multiple jobs so that one fails and one continues to run longer
- Create a PR, wait for the to-be-failed job to fail
- 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 - 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 | .[]' - 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
nomeata, huuquyet, artemisart and AKarbasandyfeller and chi3316
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-runrelating to the gh run commandrelating to the gh run commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic