You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v2.75 fails downloading logs from workflows with skipped jobs #11311
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
Note that the workflow run id of a workflow run that has skipped jobs
run 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
log not found: <SKIPPED JOB ID>
Logs
Paste the activity from your command line. Redact if needed.
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.
So, now we have two options to fix this; either check the job Conclusion and if it's skipped, just drop it from the log segments, or exclude HTTP 404 from 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?
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.
Activity
williammartin commentedon Jul 16, 2025
@babakks probably related to #11172
babakks commentedon Jul 16, 2025
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.
babakks commentedon Jul 16, 2025
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?
williammartin commentedon Jul 16, 2025
Think we should try to avoid fetching skipped logs at all, in whatever way we choose to implement that.
babakks commentedon Jul 16, 2025
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.
babakks commentedon Jul 16, 2025
Acceptance Criteria
1. An entire run log, with skipped job(s)
Given I have a run with one or more skipped jobs
When I run
gh run view --log <RUN-ID>Then The available job logs are displayed without error
2. A single job that is skipped
Given I have a run with one or more skipped jobs
When I run
gh run view --log --job <JOB-ID>Then An empty log trail is displayed without error