Repository navigation
Description
Problem
It's not clear why/when action results log ZIP archives are served from different sources. Unfortunately, as noticed in #10853, the structures are slightly different but still big enough to render GH CLI unable to detect the right content. I'm following up on this internally with the Actions team to see if we can fix this with a more reliable solution.
In the meantime, we should improve GH CLI to capture both structures.
To recap, below are two sample cases served by different services. Note that the underscores in question appear in both top-level and nested .txt files in the ZIP archive.
gh run -R single-cell-data/TileDB-SOMA view --log -j 41013280987 # new service (with underscores)
gh run -R ryan-williams/TileDB-SOMA view --log -j 41020345782 # old service (no underscores)Old service ZIP structure
$ unzip -l run-log-14620886373-1745418926.zip
Archive: run-log-14620886373-1745418926.zip
Length Date Time Name
--------- ---------- ----- ----
8607 2025-04-25 12:38 build (macos-latest, 3.11) build/12_Log pip dependencies.txt
326 2025-04-25 12:38 build (macos-latest, 3.10) build/5_Select XCode version.txt
678045 2025-04-25 12:38 build (ubuntu-24.04, 3.13) build/7_Set Up Test Data.txt
992 2025-04-25 12:38 -2147434496_build.txt
972023 2025-04-25 12:38 build (macos-latest, 3.13) build/14_Run pytests for Python.txt
648 2025-04-25 12:38 build (ubuntu-24.04, 3.11) build/29_Post Set up Python 3.11.txt
17777 2025-04-25 12:38 build (macos-latest, 3.12) build/13_Run libtiledbsoma unit tests.txt
484 2025-04-25 12:38 build (ubuntu-24.04, 3.9) build/29_Post Set up Python 3.9.txt
292 2025-04-25 12:38 build (macos-latest, 3.9) build/2_Show matrix OS.txt
1463 2025-04-25 12:38 build (macos-latest, 3.13) build/4_MacOS CPU info.txt
0 2025-04-25 12:38 build (ubuntu-24.04, 3.9) build/
2193670 2025-04-25 12:38 0_build (ubuntu-24.04, 3.9) build.txt
...
New service ZIP structure
$ unzip -l run-log-14618823537-1745413328.zip
Archive: run-log-14618823537-1745413328.zip
Length Date Time Name
--------- ---------- ----- ----
2115907 1980-00-00 00:00 7_build (ubuntu-24.04, 3.13) _ build.txt
804 1980-00-00 00:00 build (ubuntu-24.04, 3.13) _ build/system.txt
1934162 1980-00-00 00:00 8_build (macos-latest, 3.12) _ build.txt
804 1980-00-00 00:00 build (macos-latest, 3.12) _ build/system.txt
2178955 1980-00-00 00:00 9_build (ubuntu-24.04, 3.9) _ build.txt
804 1980-00-00 00:00 build (ubuntu-24.04, 3.9) _ build/system.txt
1993470 1980-00-00 00:00 10_build (macos-latest, 3.13) _ build.txt
804 1980-00-00 00:00 build (macos-latest, 3.13) _ build/system.txt
24094 1980-00-00 00:00 12_build (ubuntu-24.04, 3.11) _ lint.txt
...
Acceptance Criteria
Given I have a actions results log served by the old service
when I gh run view --log <run-id>
then The logs are shown
Given I have a actions results log served by the new service
when I gh run view --log <run-id>
then The logs are shown
Given I am running against a GHES remote
when I run gh run view --log <run-id>
then The logs (that will come back in the old format) are shown
Activity
andykingit commentedon May 30, 2025
Any plans to work on this issue? A month later it's still a problem.
babakks commentedon Jun 2, 2025
Thanks for the nudge, @andykingit! 🙏 This issue has been discussed in the team and it's under our radar to bring it into our planning after we're done with some other stuff. Also, since this is a bit of integration issue, we're following up with the other stakeholders. I cannot give you an estimate here, though.
babakks commentedon Jun 27, 2025
@ryan-williams, @kperkins-godaddy, @andykingit, @richmondjerry, @dlvhdr, @ptorgalmath-gpsw we're implementing a fallback approach (stated in #11118 and #11169, and implemented in #11172) for when
ghcouldn't find the logs in the downloaded ZIP archive. It's not a replacement for this issue, of course, but will fix the use cases. You're welcome to buildghfrom the PR's branch and test it on your end.dlvhdr commentedon Jun 28, 2025
Hey @babakks, I just confirmed, PR #11172 works great! I can fetch all jobs' logs.
thinkmorepawan commentedon Oct 30, 2026
Still reproducible on
gh version 2.103.3 (2026-10-26).Since the API fallback (#11172), logs are now printed, but for any reusable-workflow job (named
<caller> / <callee>) every line is labelledUNKNOWN STEP, because the step files in the ZIP are never matched.Example: job
deploy / scan (env: prod)is stored in the ZIP asdeploy _ scan (env prod)/5_<step name>.txt, butgetJobNameForLogFilenameinpkg/cmd/run/view/logs.godeletes the/and searches fordeploy scan (env prod)(double space), so neither the job file nor any step file matches.Replacing
/with_instead of deleting it (ingetJobNameForLogFilename) matches the step files in the ZIP for our runs, so--log-failedwould show real step names again.rplanasHavDev commentedon Oct 30, 2026
Another data point, from a private repository, so no runs I can link. This one has no
/in the job name, and the output is partial rather than empty.gh version 2.103.2 (2026-10-23)on Linux. Twopull_requestruns of the same workflow in the same repository, both attempt 1, an hour apart, each with one job namedBuild, typecheck, test (npm):GET /repos/{owner}/{repo}/actions/runs/{id}/logsholds onlyBuild, typecheck, test (npm)/system.txtand the top-level0_Build, typecheck, test (npm).txt(242,885 bytes).gh run view <id> --logprints the whole job, 1601 lines.0_…txt(242,978 bytes) plus per-step files:1_Set up job.txt,2_Run [email protected],3_Run [email protected],4_Run npm ci.txt,5_Run npm run build.txt,6_Run npm run typecheck.txt,7_…,8_…,9_…,10_Run npm test.txt(221,105 bytes), then18_…to21_Complete job.txt. The jobs API lists steps 1–10 and 18–21, allsuccess.gh run view <id> --logprints 89 lines covering steps 1, 3, 4 and 5 only, and exits 0. Step 2 is dropped, and so is everything from step 6 on, the 221 KB step 10 included. Re-running the command gives the same output.GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logsreturns the complete log for run 2's job. Throughgh apithat needs--allow-escape-sequences, because the log contains ANSI colour codes.So the per-step layout is not all-or-nothing: some step files are matched and others silently skipped, while the exit status stays 0. For tooling that parses
--logoutput (we read test counts from it), that is worse than an empty result, since nothing signals that the log is incomplete. In both layouts the top-level0_<job>.txtheld the full log, which may be the more reliable source when it is present.