Repository navigation
v2.75 fails downloading logs from workflows with skipped jobs #11311
Description
Activity
Yeah, there's another report in a comment. Seems like we're not checking for the skipped job. Before the last changes, if a job wasn't in the ZIP archive we'd just skip over, but now the API call fails. I'm going to look into this.
Yeah, I can confirm the problem and that's what I mentioned in the above comment.
As expected, API responds with
HTTP 404when the job has been skipped:{ "message": "Not Found", "documentation_url": "https://docs.github.com/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run", "status": "404" }So, now we have two options to fix this; either check the job
Conclusionand if it'sskipped, just drop it from the log segments, or excludeHTTP 404from error cases. I don't like the latter since it's just burying potential API problems.I can put down the A/C for this, but first I'm want to hear what do you think, @williammartin?
Think we should try to avoid fetching skipped logs at all, in whatever way we choose to implement that.
Agreed. That's the first approach then. That way we just drop the skipped job at the top of the loop we don't even try finding the log in the ZIP archive, let alone an API call.
Acceptance Criteria
1. An entire run log, with skipped job(s)
Given I have a run with one or more skipped jobs
When I rungh run view --log <RUN-ID>
Then The available job logs are displayed without error2. A single job that is skipped
Given I have a run with one or more skipped jobs
When I rungh run view --log --job <JOB-ID>
Then An empty log trail is displayed without error- addedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributors
on Jul 16, 2025 - linked a pull request that will close this issueAvoid fetching logs for skipped jobs #11312
on Jul 16, 2025
Describe the bug
Recently, the github hosted runners were upgraded to use gh cli 2.75. Since then, one workflow of ours started failing. This workflow is downloading logs from other workflow runs. It seems like in previous versions, it did not attempt to download logs from skipped jobs (since they are unavailable).
This now apparently changed and makes the cli fail in this case.
Affected version
2.75
Steps to reproduce the behavior
gh cli run view --log <ID>Expected vs actual behavior
Expected:
Download all logs, ignore skipped jobs
Actual:
Fails on the first skipped job with
Logs
Paste the activity from your command line. Redact if needed.