Skip to content

gh run watch fails intermittently when called immediately after gh workflow run #14948

Open

Description

@wilkinsona

Describe the bug

A call to gh run watch immediately after gh workflow run fails intermittently with what appears to be a race condition. The latter returns the URL of the run that has been triggered but the former fails with a 404 when trying to retrieve the run's jobs:

failed to get jobs: HTTP 404: Not Found (https://api.github.com/repos/spring-io/release-train/actions/runs/41896807416/jobs?per_page=100)

Affected version

The failure's occurring with the version that's currently (2026-11-05) available on hosted GHA runners.

Steps to reproduce the behavior

Our workflows that are affected include a step that runs the following bash:

run_url=$(
  gh workflow run ready \
  --repo ${{ inputs.release-train-repository }} \
  --ref ${{ inputs.release-train }} \
  --field commit-hash=${{ github.sha }} \
  --field release-branch=${{ github.ref_name }} \
  --field release-repository=${{ github.repository }}
)
echo "Dispatched workflow run. Waiting for $run_url to complete."
run_id=${run_url##*/}
watch_exit_code=0
gh run watch $run_id --repo ${{ inputs.release-train-repository }} --exit-status --interval=3 || watch_exit_code=$?
if [[ $watch_exit_code -eq 0 ]]; then
  echo "Workflow run succeeded."
else
  echo "Workflow run failed."
fi
exit $watch_exit_code

Expected vs actual behavior

gh run watch should not consider a 404 when retrieving the run's jobs to be fatal. Instead, it should try again after the configured interval.

Logs

See above for the relevant gh commands. On failure, it outputs the following:

failed to get jobs: HTTP 404: Not Found (https://api.github.com/repos/spring-io/release-train/actions/runs/41896807416/jobs?per_page=100)

Activity

  1. added
    needs-triage
    on Nov 5, 2026
  2. cli-triage commented on Nov 9, 2026

    @cli-triage

    Unable to test: the command runner was unavailable.

    The current source still treats a jobs request error as fatal during polling, so the reported 404 is consistent with the command stopping instead of waiting for the next interval. I could not execute the controlled comparison across the reported, release, and source builds.

    $ gh run watch 41896807416 -R example.invalid/release-train --exit-status --interval=3

    Output: not available.

    Exit status: not available.

    The exact hosted-runner version is also unknown. A caller-side retry or short delay is a temporary workaround.

    Supporting reports

    Generated by issue triage.

  3. deleted a comment from cli-triage on Nov 9, 2026
  4. added
    bug
    priority-3
    gh-run
    on Nov 9, 2026
  5. removed
    needs-triage
    on Nov 9, 2026
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

    buggh-runpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions