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
gh run view --log -j <job_id> erroneously returns no stdout/stderr, exits 0 #10853
Both repos have "Artifact and log retention" set to 90d, under /settings/actions, and the jobs above were all run in the last 24hrs.
I initially flagged this in #5011 (comment), and @williammartinsuggested that it may have to do with the / character injected in job names by workflow_call/matrix (cc @babakks as well).
However, job 41020345782 above, from my fork, returns logs despite being all the same attributes (same workflow, triggered at same commit by push to same branch).
Meanwhile, other simple jobs in single-cell-data/TileDB-SOMA also fail to return logs (despite no workflow_call, matrix, or /s in job names, e.g. 41001342582 above).
I was on 2.69.0 (via Homebrew, on macOS 15.4) yesterday when I observed the issue.
I ran brew upgrade this AM and now have:
gh version
# gh version 2.71.0 (2025-04-23)# https://github.com/cli/cli/releases/tag/v2.71.0
Re-running my examples from OP, I now see:
gh run -R single-cell-data/TileDB-SOMA view --log -j 41013280987 # ❌ exits 0, no output (same as yesterday)
gh run -R single-cell-data/TileDB-SOMA view --log -j 40986064176 # ❌ exits 0, no output (same as yesterday)
gh run -R single-cell-data/TileDB-SOMA view --log -j 41015499160 # ❌ exits 0, no output (same as yesterday)
gh run -R single-cell-data/TileDB-SOMA view --log -j 41001342582 # 🚨 returns logs today (didn't yesterday); simple "control" job (no workflow_call or matrix)
gh run -R ryan-williams/TileDB-SOMA view --log -j 41020345782 | wc # Same as yesterday# 17335 272882 3063392
I'm now getting logs for job 41001342582, which was my "control" yesterday (no workflow_call or matrix).
However, I'm still getting no logs for 41013280987, but yes logs for 41020345782, even though they are the same job (just run in upstream vs. fork).
I'm also still getting no logs for:
40986064176 (different workflow than the above, but similar structure: matrix entries workflow_call another workflow, which contains multiple jobs, resulting in /s in job-names), and
41015499160 (simple matrix, no workflow_call or sub-jobs with /s).
I'd think you could run any of these commands and see the same things; can you confirm?
For example, under the covers (you can check using GH_DEBUG=api) , gh run -R single-cell-data/TileDB-SOMA view --log -j 41015499160 makes a requests for all logs for the run with the intention to prune them client side.
* Request to https://api.github.com/repos/single-cell-data/TileDB-SOMA/actions/runs/14615136857/logs
> GET /repos/single-cell-data/TileDB-SOMA/actions/runs/14615136857/logs HTTP/1.1
But the content of the returned zip only contains one job (Ubuntu 1.15.7):
See that fetching the logs for that particular job actually does work (cache needs to be cleared first, usually lives in $XDG_CACHE_HOME/gh or ~/.cache/gh):
By default gh grabs the latest zip logs for a run, which in this case only includes the job you reran. You can validate this by getting logs from the first run with:
gh run -R single-cell-data/TileDB-SOMA view --attempt 1 --log -j 41015499160
It seems like the UI does some work to stitch runs together. Maybe that's a feature we should look to support as well.
In terms of your comment in #10853 (comment), I think this is because one log is being served by the old log service and one log is being served by the new log service. I actually don't see the same _ usage as you, so perhaps you can double check that. Here's what I see when running gh run -R ryan-williams/TileDB-SOMA view --log -j 41020345782 (note no _ just blank):
Other jobs in the workflow were re-run (due to 1st attempts failing), so "attempt 2" exists for them (but not for 41015499160)
By default, gh looks for the max attempt across jobs in the workflow (in this case 2), then looks for that attempt within each job (even if the job in question wasn't run that many times).
gh doesn't warn or error about it, silently fails but exits 0.
The last 2 bullets each seem like potential standalone issues.
Double-checking:
cmd=(gh run -R single-cell-data/TileDB-SOMA view --log -j 41015499160)
"${cmd[@]}"# ❌ no output, exits 0"${cmd[@]}" --attempt 1 | wc # ✅ emits logs, as expected# 4233 50546 614051
I actually don't see the same _ usage as you, so perhaps you can double check that. Here's what I see when running gh run -R ryan-williams/TileDB-SOMA view --log -j 41020345782 (note no _ just blank):
➜ run-log-14620886373-1745418926 tree
...
I'm unclear how you got from that gh run command to a tree-able directory, but here's my attempt at it:
The significance of the different log-archive structures isn't clear to me, but sounds like you have some leads re: log-server changes behind the scenes, hopefully something here is helpful!
@ruan-williams It seems like your issue with the missing logs is now partially sorted by using the --attempt option. There's still a problem with the old-vs-new services that we need to fix, and I'm going to open another issue for it to make it easier to follow the thread since here we're dealing with two different problems.
Activity
williammartin commentedon Apr 23, 2025
Can you add your
gh versionhere please.ryan-williams commentedon Apr 24, 2025
I was on 2.69.0 (via Homebrew, on macOS 15.4) yesterday when I observed the issue.
I ran
brew upgradethis AM and now have:Re-running my examples from OP, I now see:
I'm now getting logs for job 41001342582, which was my "control" yesterday (no
workflow_callormatrix).However, I'm still getting no logs for 41013280987, but yes logs for 41020345782, even though they are the same job (just run in upstream vs. fork).
I'm also still getting no logs for:
matrixentriesworkflow_callanother workflow, which contains multiple jobs, resulting in/s in job-names), andworkflow_callor sub-jobs with/s).I'd think you could run any of these commands and see the same things; can you confirm?
williammartin commentedon Apr 24, 2025
Just FWIW we released 2.71.1 10 minutes ago to fix a bug in
pr create.Yes I see the same thing as you, just wanted to get you moved forward to a version that included the most recent log fixes.
I would expect any workflows with
/in names to not work. So I think we just need to understand https://github.com/single-cell-data/TileDB-SOMA/actions/runs/14615136857/job/41015499160Will have a look now.
williammartin commentedon Apr 24, 2025
As far as I'm concerned, the log service is returning incorrect logs for https://github.com/single-cell-data/TileDB-SOMA/actions/runs/14615136857
For example, under the covers (you can check using
GH_DEBUG=api) ,gh run -R single-cell-data/TileDB-SOMA view --log -j 41015499160makes a requests for all logs for the run with the intention to prune them client side.But the content of the returned zip only contains one job (Ubuntu 1.15.7):
See that fetching the logs for that particular job actually does work (cache needs to be cleared first, usually lives in
$XDG_CACHE_HOME/ghor~/.cache/gh):Going to ask the team that owns logs about this.
ryan-williams commentedon Apr 24, 2025
Thanks, just one note re:
41020345782 has
/s in job names, and returns logs fine. The only difference I've ID'd between it and 41013280987 is which repo they ran in:When I download log archives for both (from web UI), I see similar structure as you showed yesterday (with
_substituted for/), except:gh) includes a directory and a file for each jobgh) only has a file per jobwilliammartin commentedon Apr 24, 2025
I think what's happening with https://github.com/single-cell-data/TileDB-SOMA/actions/runs/14615136857 (thanks other team) is that you re-ran failed jobs:
By default
ghgrabs the latest zip logs for a run, which in this case only includes the job you reran. You can validate this by getting logs from the first run with:It seems like the UI does some work to stitch runs together. Maybe that's a feature we should look to support as well.
In terms of your comment in #10853 (comment), I think this is because one log is being served by the old log service and one log is being served by the new log service. I actually don't see the same
_usage as you, so perhaps you can double check that. Here's what I see when runninggh run -R ryan-williams/TileDB-SOMA view --log -j 41020345782(note no_just blank):ryan-williams commentedon Apr 24, 2025
41015499160
Interesting catch! Re-stating the apparent issue:
ghlooks for the max attempt across jobs in the workflow (in this case 2), then looks for that attempt within each job (even if the job in question wasn't run that many times).ghdoesn't warn or error about it, silently fails but exits 0.The last 2 bullets each seem like potential standalone issues.
Double-checking:
41013280987 / 41020345782
re:
I'm unclear how you got from that
gh runcommand to atree-able directory, but here's my attempt at it:download_unzip_tree single-cell-data/TileDB-SOMA 14618823537download_unzip_tree ryan-williams/TileDB-SOMA 14620886373The latter seems to match what you showed, while the former (which
ghfails to show logs for) has a different structure.Previously, I was looking at log archives downloaded from this web UI button:
The URLs it currently shows me are:
I didn't find a way to programmatically access those URLs, but downloading them again (via the web UI) yields
.zipwith the structure I showed before:id=37564081503; unzip -d $id logs_$id.zip && tree $idid=37569792382; unzip -d $id logs_$id.zip && tree $idThe significance of the different log-archive structures isn't clear to me, but sounds like you have some leads re: log-server changes behind the scenes, hopefully something here is helpful!
babakks commentedon Apr 25, 2025
Great investigation! Big thanks to @ryan-williams and @williammartin! 🎉
@ruan-williams It seems like your issue with the missing logs is now partially sorted by using the
--attemptoption. There's still a problem with the old-vs-new services that we need to fix, and I'm going to open another issue for it to make it easier to follow the thread since here we're dealing with two different problems.UPDATE: I just created #10868.
kperkins-godaddy commentedon May 28, 2025
I'm seeing this as well, and it's clearly a CLI problem given what I see here: