Skip to content

gh run view (--log||--log-failed) no longer produces logs? #10551

Description

@shindere

I started to use this feature quite recently and initially it seemed to
work but now I simply cannot get any log, but no error either.

Is there any trick I can use to debug? Shall I provide an example of a
repo and run id for which I encounter this problem?

Activity

  1. changed the title [-]gh run view (--log || -failed) no longer produces logs?[/-] [+]gh run view (--log||--log-failed) no longer produces logs?[/+] on Mar 6, 2025
  2. iamazeem commented on Mar 6, 2025

    @iamazeem
    Contributor

    Would be helpful if you could update the description according to the bug report template:
    https://github.com/cli/cli/issues/new?template=bug_report.md

    The usage of GH_DEBUG is mentioned in the note at the end of the template to generate the debug info.

  3. shindere commented on Mar 6, 2025

    @shindere
    Author
  4. iamazeem commented on Mar 7, 2025

    @iamazeem
    Contributor

    See #10551 (comment) for the update.


    Disregard this part containing the preliminary investigation:

    Details

    Just looked at your failing workflows:
    https://github.com/shindere/stdcompat/actions/workflows/ci.yml

    The workflow run 13677151402 is for a pull request and gh run view command doesn't support that at the moment.
    You can observe the same from the GH_DEBUG=true logs i.e. exclude_pull_requests=true:

    * Request to https://api.github.com/repos/shindere/stdcompat/actions/runs/13677151402?exclude_pull_requests=true
    

    I checked the code and the handling of pull requests is not there even when exclude_pull_requests=false (or omitted which means false by default according to its API Get a workflow run).

    You should be able to see the logs for other non-PR runs e.g.:

    shindere/stdcompat@123c070

    which is a direct commit (push) to the default branch.

    Workflow run: https://github.com/shindere/stdcompat/actions/runs/13393034352
    Run ID: 13393034352

    $ gh run view --log-failed -R shindere/stdcompat 13393034352
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6578622Z Current runner version: '2.322.0'
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6609497Z ##[group]Operating System
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6610284Z Ubuntu
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6610877Z 24.04.1
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6611425Z LTS
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6611911Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6612521Z ##[group]Runner Image
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6613112Z Image: ubuntu-24.04
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-02-18T14:42:25.6613809Z Version: 20250209.1.0
    ...

    So, it's a feature request, not a bug.
    Let's see what the maintainers decide after triage. 🤞

  5. shindere commented on Mar 7, 2025

    @shindere
    Author
  6. BagToad commented on Mar 7, 2025

    @BagToad
    Member

    @shindere @iamazeem Thank you for the investigation everyone 🙏

    I haven't finished digging into this yet, but I think something else may be going on because the command still fails even when exclude_pull_requests is removed from the request parameters.

    ❯ GH_DEBUG=true ./bin/gh run view --log-failed -R shindere/stdcompat 13677151402
    ⣾* Request at 2025-03-07 10:39:08.946284 -0700 MST m=+0.085645709
    * Request to https://api.github.com/repos/shindere/stdcompat/actions/runs/13677151402
    ⢿* Request took 360.202792ms
    * Request at 2025-03-07 10:39:09.355176 -0700 MST m=+0.494534209
    * Request to https://api.github.com/repos/shindere/stdcompat/actions/workflows/144784623
    ⡿* Request took 143.70425ms
    ⣾* Request at 2025-03-07 10:39:09.555462 -0700 MST m=+0.694818876
    * Request to https://api.github.com/repos/shindere/stdcompat/actions/runs/13677151402/jobs?per_page=100
    ⣽* Request took 3.008319708s
    

    I also noticed the command completes successfully when the --log-failed option is removed, even with the exclude_pull_requests parameter is present.

    @shindere Does the command complete successfully with other PRs? Do you happen to have an example PR which the command completes successfully?

  7. self-assigned this
    on Mar 7, 2025
  8. iamazeem commented on Mar 7, 2025

    @iamazeem
    Contributor

    @BagToad:
    The issues seems to be related to --log and --log-failed flags only.
    Without these, the command runs fine for PR workflows as well.
    The logs are downloaded once and cached locally as ZIP i.e. ~/.cache/gh/run-log-<RUN_ID>-<TIMESTAMP>.zip.
    Still looking into it to pinpoint the root cause.

    May be related to attachRunLog and/or displayRunLog here:

    if opts.Log || opts.LogFailed {
    if selectedJob != nil && selectedJob.Status != shared.Completed {
    return fmt.Errorf("job %d is still in progress; logs will be available when it is complete", selectedJob.ID)
    }
    if run.Status != shared.Completed {
    return fmt.Errorf("run %d is still in progress; logs will be available when it is complete", run.ID)
    }
    opts.IO.StartProgressIndicator()
    runLogZip, err := getRunLog(opts.RunLogCache, httpClient, repo, run, attempt)
    opts.IO.StopProgressIndicator()
    if err != nil {
    return fmt.Errorf("failed to get run log: %w", err)
    }
    defer runLogZip.Close()
    attachRunLog(&runLogZip.Reader, jobs)
    return displayRunLog(opts.IO.Out, jobs, opts.LogFailed)
    }

  9. shindere commented on Mar 8, 2025

    @shindere
    Author
  10. iamazeem commented on Mar 8, 2025

    @iamazeem
    Contributor

    @shindere: It's documented here as a comment above attachRunLog:

    // This function takes a zip file of logs and a list of jobs.
    // Structure of zip file
    //
    // zip/
    // ├── jobname1/
    // │ ├── 1_stepname.txt
    // │ ├── 2_anotherstepname.txt
    // │ ├── 3_stepstepname.txt
    // │ └── 4_laststepname.txt
    // └── jobname2/
    // ├── 1_stepname.txt
    // └── 2_somestepname.txt
    //
    // It iterates through the list of jobs and tries to find the matching
    // log in the zip file. If the matching log is found it is attached
    // to the job.
    func attachRunLog(rlz *zip.Reader, jobs []shared.Job) {
    for i, job := range jobs {
    for j, step := range job.Steps {
    re := logFilenameRegexp(job, step)
    for _, file := range rlz.File {
    if re.MatchString(file.Name) {
    jobs[i].Steps[j].Log = file
    break
    }
    }
    }
    }
    }

    But, as you've observed, it different from the actual ZIP.
    The cached ZIP has all the files on the root (except one directory):

    $ unzip -l run-log-13677151402-1741181422
    Archive:  run-log-13677151402-1741181422.zip
      Length      Date    Time    Name
    ---------  ---------- -----   ----
         1870  1980-00-00 00:00   0_build-ubuntu-old-ocamls (make-no-magic, 3.12.1).txt
         1870  1980-00-00 00:00   1_build-ubuntu-old-ocamls (make, 3.08.4).txt
         1870  1980-00-00 00:00   2_build-ubuntu-old-ocamls (make, 4.00.1).txt
         1870  1980-00-00 00:00   3_build-ubuntu-old-ocamls (make, 3.09.3).txt
         1870  1980-00-00 00:00   4_build-ubuntu-old-ocamls (make-no-magic, 4.00.1).txt
         1870  1980-00-00 00:00   5_build-ubuntu-old-ocamls (make-no-magic, 3.08.4).txt
         1870  1980-00-00 00:00   6_build-ubuntu-old-ocamls (make-no-magic, 3.10.2).txt
         1870  1980-00-00 00:00   7_build-ubuntu-old-ocamls (make, 4.01.0).txt
         1870  1980-00-00 00:00   8_build-ubuntu-old-ocamls (make-no-magic, 3.07).txt
         1870  1980-00-00 00:00   9_build-ubuntu-old-ocamls (make-no-magic, 3.11.2).txt
        70596  1980-00-00 00:00   10_build-ubuntu (dune, 4.08.x).txt
        99872  1980-00-00 00:00   11_build-macos-and-windows (macos-latest, make, 5.0.0).txt
        50453  1980-00-00 00:00   12_build-macos-and-windows (windows-latest, dune, 4.02.x).txt
        76064  1980-00-00 00:00   13_build-ubuntu (dune, 4.02.x).txt
         1870  1980-00-00 00:00   14_build-ubuntu-old-ocamls (make, 3.12.1).txt
         1870  1980-00-00 00:00   15_build-ubuntu-old-ocamls (make, 3.07).txt
         1870  1980-00-00 00:00   16_build-ubuntu-old-ocamls (make-no-magic, 3.09.3).txt
        45798  1980-00-00 00:00   17_build-macos-and-windows (macos-latest, make-no-magic, 4.02.x).txt
       128295  1980-00-00 00:00   18_build-macos-and-windows (windows-latest, make-no-magic, 4.14.x).txt
        45789  1980-00-00 00:00   19_build-macos-and-windows (macos-latest, dune, 4.02.x).txt
         1870  1980-00-00 00:00   20_build-ubuntu-old-ocamls (make, 3.11.2).txt
        99887  1980-00-00 00:00   21_build-macos-and-windows (macos-latest, make-no-magic, 5.0.0).txt
       128654  1980-00-00 00:00   22_build-macos-and-windows (windows-latest, make-no-magic, 5.2.0).txt
       128341  1980-00-00 00:00   23_build-macos-and-windows (windows-latest, make-no-magic, 5.1.1).txt
       128198  1980-00-00 00:00   24_build-macos-and-windows (windows-latest, make, 4.14.x).txt
        69959  1980-00-00 00:00   25_build-macos-and-windows (windows-latest, dune, 5.2.0).txt
       124492  1980-00-00 00:00   26_build-macos-and-windows (macos-latest, make, 5.1.1).txt
       126631  1980-00-00 00:00   27_build-ubuntu (make, 5.1.1).txt
        50453  1980-00-00 00:00   28_build-macos-and-windows (windows-latest, make, 4.02.x).txt
       102424  1980-00-00 00:00   29_build-ubuntu (make, 4.09.x).txt
        70410  1980-00-00 00:00   30_build-macos-and-windows (windows-latest, dune, 4.14.x).txt
        96956  1980-00-00 00:00   31_build-ubuntu (make, 4.03.x).txt
       124802  1980-00-00 00:00   32_build-macos-and-windows (macos-latest, make, 4.14.x).txt
       103788  1980-00-00 00:00   33_build-macos-and-windows (windows-latest, make-no-magic, 5.0.0).txt
       128647  1980-00-00 00:00   34_build-macos-and-windows (windows-latest, make, 5.1.1).txt
        47960  1980-00-00 00:00   35_build-macos-and-windows (windows-latest, make-no-magic, ocaml-variants.4.14.0+mingw64c).txt
        97492  1980-00-00 00:00   36_build-ubuntu (make, 4.07.x).txt
         1870  1980-00-00 00:00   37_build-ubuntu-old-ocamls (make-no-magic, 4.01.0).txt
        76143  1980-00-00 00:00   38_build-ubuntu (dune, 4.03.x).txt
        97653  1980-00-00 00:00   39_build-ubuntu (make, 4.04.x).txt
        76376  1980-00-00 00:00   40_build-ubuntu (dune, 4.06.x).txt
        66450  1980-00-00 00:00   41_build-macos-and-windows (macos-latest, dune, 4.14.x).txt
       124492  1980-00-00 00:00   42_build-macos-and-windows (macos-latest, make, 5.2.0).txt
        76898  1980-00-00 00:00   43_build-ubuntu (dune, 4.04.x).txt
        71527  1980-00-00 00:00   44_build-macos-and-windows (windows-latest, dune, 5.0.0).txt
        96924  1980-00-00 00:00   45_build-ubuntu (make-no-magic, 4.06.x).txt
        47951  1980-00-00 00:00   46_build-macos-and-windows (windows-latest, dune, ocaml-variants.4.14.0+mingw64c).txt
        68081  1980-00-00 00:00   47_build-ubuntu (dune, 4.11.x).txt
        74162  1980-00-00 00:00   48_build-ubuntu (dune, 4.07.x).txt
        70104  1980-00-00 00:00   49_build-ubuntu (dune, 5.0.0).txt
       126511  1980-00-00 00:00   50_build-ubuntu (make, 4.12.x).txt
       102496  1980-00-00 00:00   51_build-ubuntu (make, 4.08.x).txt
        50462  1980-00-00 00:00   52_build-macos-and-windows (windows-latest, make-no-magic, 4.02.x).txt
        45793  1980-00-00 00:00   53_build-macos-and-windows (macos-latest, make, 4.02.x).txt
       124815  1980-00-00 00:00   54_build-macos-and-windows (macos-latest, make-no-magic, 4.14.x).txt
        67950  1980-00-00 00:00   55_build-macos-and-windows (macos-latest, dune, 5.0.0).txt
        48105  1980-00-00 00:00   56_build-macos-and-windows (windows-latest, make, ocaml-variants.4.14.0+mingw64c).txt
       127019  1980-00-00 00:00   57_build-ubuntu (make-no-magic, 4.12.x).txt
         1870  1980-00-00 00:00   58_build-ubuntu-old-ocamls (make, 3.10.2).txt
       126513  1980-00-00 00:00   59_build-ubuntu (make, 4.13.x).txt
        97041  1980-00-00 00:00   60_build-ubuntu (make-no-magic, 4.03.x).txt
       103449  1980-00-00 00:00   61_build-macos-and-windows (windows-latest, make, 5.0.0).txt
        68011  1980-00-00 00:00   62_build-ubuntu (dune, 4.13.x).txt
       126573  1980-00-00 00:00   63_build-ubuntu (make-no-magic, 5.2.0).txt
       128575  1980-00-00 00:00   64_build-macos-and-windows (windows-latest, make, 5.2.0).txt
        65982  1980-00-00 00:00   65_build-macos-and-windows (macos-latest, dune, 5.1.1).txt
       124506  1980-00-00 00:00   66_build-macos-and-windows (macos-latest, make-no-magic, 5.1.1).txt
       101881  1980-00-00 00:00   67_build-ubuntu (make, 5.0.0).txt
        68165  1980-00-00 00:00   68_build-ubuntu (dune, 4.12.x).txt
       126592  1980-00-00 00:00   69_build-ubuntu (make, 4.11.x).txt
        97913  1980-00-00 00:00   70_build-ubuntu (make-no-magic, 4.05.x).txt
       124506  1980-00-00 00:00   71_build-macos-and-windows (macos-latest, make-no-magic, 5.2.0).txt
        96193  1980-00-00 00:00   72_build-ubuntu (make, 4.02.x).txt
       102439  1980-00-00 00:00   73_build-ubuntu (make-no-magic, 4.10.x).txt
        67977  1980-00-00 00:00   74_build-ubuntu (dune, 5.1.1).txt
        97596  1980-00-00 00:00   75_build-ubuntu (make-no-magic, 4.04.x).txt
        96910  1980-00-00 00:00   76_build-ubuntu (make, 4.06.x).txt
        70679  1980-00-00 00:00   77_build-ubuntu (dune, 4.09.x).txt
       126527  1980-00-00 00:00   78_build-ubuntu (make-no-magic, 4.11.x).txt
        65981  1980-00-00 00:00   79_build-macos-and-windows (macos-latest, dune, 5.2.0).txt
       101899  1980-00-00 00:00   80_build-ubuntu (make-no-magic, 5.0.0).txt
       126513  1980-00-00 00:00   81_build-ubuntu (make, 4.14.x).txt
        70144  1980-00-00 00:00   82_build-macos-and-windows (windows-latest, dune, 5.1.1).txt
       102504  1980-00-00 00:00   83_build-ubuntu (make, 4.10.x).txt
       102508  1980-00-00 00:00   84_build-ubuntu (make-no-magic, 4.08.x).txt
       126475  1980-00-00 00:00   85_build-ubuntu (make, 5.2.0).txt
       126489  1980-00-00 00:00   86_build-ubuntu (make-no-magic, 5.1.1).txt
       126527  1980-00-00 00:00   87_build-ubuntu (make-no-magic, 4.14.x).txt
        96279  1980-00-00 00:00   88_build-ubuntu (make-no-magic, 4.02.x).txt
        67977  1980-00-00 00:00   89_build-ubuntu (dune, 5.2.0).txt
        77171  1980-00-00 00:00   90_build-ubuntu (dune, 4.05.x).txt
          240  1980-00-00 00:00   build-ubuntu (dune, 4.05.x)/system.txt
       102435  1980-00-00 00:00   91_build-ubuntu (make-no-magic, 4.09.x).txt
        97660  1980-00-00 00:00   92_build-ubuntu (make-no-magic, 4.07.x).txt
       126604  1980-00-00 00:00   93_build-ubuntu (make-no-magic, 4.13.x).txt
        68011  1980-00-00 00:00   94_build-ubuntu (dune, 4.14.x).txt
        97898  1980-00-00 00:00   95_build-ubuntu (make, 4.05.x).txt
        70679  1980-00-00 00:00   96_build-ubuntu (dune, 4.10.x).txt
    ---------                     -------
      7587815                     98 files

    Currently, the files are not being attached correctly in attachRunLog.
    The issue lies in logFilenameRegexp:

    func logFilenameRegexp(job shared.Job, step shared.Step) *regexp.Regexp {
    // As described in https://github.com/cli/cli/issues/5011#issuecomment-1570713070, there are a number of steps
    // the server can take when producing the downloaded zip file that can result in a mismatch between the job name
    // and the filename in the zip including:
    // * Removing characters in the job name that aren't allowed in file paths
    // * Truncating names that are too long for zip files
    // * Adding collision deduplicating numbers for jobs with the same name
    //
    // We are hesitant to duplicate all the server logic due to the fragility but it may be unavoidable. Currently, we:
    // * Strip `/` which occur when composite action job names are constructed of the form `<JOB_NAME`> / <ACTION_NAME>`
    // * Truncate long job names
    //
    sanitizedJobName := strings.ReplaceAll(job.Name, "/", "")
    sanitizedJobName = strings.ReplaceAll(sanitizedJobName, ":", "")
    sanitizedJobName = truncateAsUTF16(sanitizedJobName, JOB_NAME_MAX_LENGTH)
    re := fmt.Sprintf(`^%s\/%d_.*\.txt`, regexp.QuoteMeta(sanitizedJobName), step.Number)
    return regexp.MustCompile(re)
    }

    Locally, for me, this is working fine:

    - re := fmt.Sprintf(`^%s\/%d_.*\.txt`, regexp.QuoteMeta(sanitizedJobName), step.Number)
    + re := fmt.Sprintf(`^\d+_%s.*\.txt`, regexp.QuoteMeta(sanitizedJobName))

    Test run:

    $ bin/gh run view --repo shindere/stdcompat 13677151402 --log-failed | head -n 100
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6031507Z Current runner version: '2.322.0'
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6056655Z ##[group]Operating System
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6057486Z Ubuntu
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6057960Z 24.04.2
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6058453Z LTS
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6058875Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6059454Z ##[group]Runner Image
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6060050Z Image: ubuntu-24.04
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6060519Z Version: 20250302.1.0
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6061844Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250302.1/images/ubuntu/Ubuntu2404-Readme.md
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6063187Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250302.1
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6064058Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6064610Z ##[group]Runner Image Provisioner
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6065211Z 2.0.422.1
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6065630Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6067959Z ##[group]GITHUB_TOKEN Permissions
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6070233Z Actions: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6071198Z Attestations: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6071808Z Checks: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6072346Z Contents: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6072814Z Deployments: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6073310Z Discussions: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6073791Z Issues: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6074299Z Metadata: read
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6074741Z Packages: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6075251Z Pages: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6075758Z PullRequests: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6076236Z RepositoryProjects: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6076806Z SecurityEvents: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6077355Z Statuses: write
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6077838Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6080096Z Secret source: Actions
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6081104Z Prepare workflow directory
    build-ubuntu-old-ocamls (make, 3.08.4)	Set up job	2025-03-05T13:30:32.6681575Z ##[error]The template is not valid. .github/workflows/ci.yml (Line: 95, Col: 19): Unexpected value ''
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8959630Z Current runner version: '2.322.0'
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8985159Z ##[group]Operating System
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8985916Z Ubuntu
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8986403Z 24.04.2
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8987036Z LTS
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8987479Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8988284Z ##[group]Runner Image
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8988923Z Image: ubuntu-24.04
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8989468Z Version: 20250223.1.0
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8990474Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250223.1/images/ubuntu/Ubuntu2404-Readme.md
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8992019Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250223.1
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8992993Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8993479Z ##[group]Runner Image Provisioner
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8994118Z 2.0.422.1
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8994557Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8997071Z ##[group]GITHUB_TOKEN Permissions
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.8999554Z Actions: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9000241Z Attestations: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9000925Z Checks: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9001408Z Contents: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9001932Z Deployments: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9002473Z Discussions: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9002955Z Issues: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9003492Z Metadata: read
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9004001Z Packages: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9004499Z Pages: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9004931Z PullRequests: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9005524Z RepositoryProjects: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9006036Z SecurityEvents: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9006543Z Statuses: write
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9007046Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9009211Z Secret source: Actions
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9009886Z Prepare workflow directory
    build-ubuntu-old-ocamls (make, 3.07)	Set up job	2025-03-05T13:37:50.9592271Z ##[error]The template is not valid. .github/workflows/ci.yml (Line: 95, Col: 19): Unexpected value ''
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7092655Z Current runner version: '2.322.0'
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7119780Z ##[group]Operating System
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7120524Z Ubuntu
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7121026Z 24.04.2
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7121518Z LTS
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7122011Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7122479Z ##[group]Runner Image
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7123089Z Image: ubuntu-24.04
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7123629Z Version: 20250302.1.0
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7124617Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250302.1/images/ubuntu/Ubuntu2404-Readme.md
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7125984Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250302.1
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7126852Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7127391Z ##[group]Runner Image Provisioner
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7127924Z 2.0.422.1
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7128619Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7130957Z ##[group]GITHUB_TOKEN Permissions
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7132999Z Actions: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7133712Z Attestations: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7134381Z Checks: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7134840Z Contents: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7135310Z Deployments: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7135854Z Discussions: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7136385Z Issues: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7136829Z Metadata: read
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7137360Z Packages: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7137830Z Pages: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7138523Z PullRequests: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7139249Z RepositoryProjects: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7139797Z SecurityEvents: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7140349Z Statuses: write
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7140827Z ##[endgroup]
    build-ubuntu-old-ocamls (make, 3.09.3)	Set up job	2025-03-05T13:31:35.7143188Z Secret source: Actions

    I'll be testing and verifying by correlating this output with the failed jobs.
    I'll keep updating here as I proceed.


    This is working without removing that exclude_pull_requests=true query parameter.
    So, it's not related to that as I previously mentioned in my comment.

  11. shindere commented on Mar 8, 2025

    @shindere
    Author
  12. shindere commented on Mar 8, 2025

    @shindere
    Author
  13. iamazeem commented on Mar 8, 2025

    @iamazeem
    Contributor

    @shindere

    Do we know why GH stores files this way?

    From the code, gh doesn't seem to do any intermediate processing.
    The response is being read and then dumped as-is in ZIP format.

  14. 21 remaining items

  15. babakks commented on Apr 3, 2025

    @babakks
    Member

    Thanks everyone in the thread for digging into this. 👏

    As a summary, there is a new service producing ZIP archives that is being rolled out and it's not a stable interface. We’re going to fix the CLI to work with both formats for the time being.

  16. shindere commented on Apr 3, 2025

    @shindere
    Author
  17. babakks commented on Apr 3, 2025

    @babakks
    Member

    Sure. Actually, it's not a two totally different formats case. Sometimes, the ZIP archive includes the logs for the individual steps, sometimes it's not. This is due to the internals of the API back-end. In either case there is a top-level log file in the archive. The CLI will fallback to the mentioned file if the step-wise logs were not present. So, the differentiation is based on the directory structure and missing step files.

    I hope this answers your question.

  18. babakks commented on Apr 3, 2025

    @babakks
    Member

    UPDATE: Check the updated list in a few comments below (here).

    Here's the C/A for the fix.

    Acceptance Criteria

    Given I have a job run whose logs are produced by the new results service
    When I run gh run view --logs <JOB-ID>
    Then the job logs are displayed with proper step name on every line

    Given I have a job run whose logs are produced by new results service without individual step logs
    When I run gh run view --logs <JOB-ID>
    Then the job logs are displayed with UNKNOWN placeholder for step name on every line

  19. added
    coreThis issue is not accepting PRs from outside contributors
    and removed on Apr 3, 2025
  20. shindere commented on Apr 3, 2025

    @shindere
    Author
  21. babakks commented on Apr 3, 2025

    @babakks
    Member

    No worries.

    Isthere any determinism in this sometimes? Any clue so that we know
    when we are going to receive what, or is it unpredictable?

    This is due to how the Actions API work. Unfortunately, we don't yet have a full understanding about the underlying causes and we're still following up on this internally. So, the best we can do here the CLI side is to make it aware and adapt to the possible cases.

    Will you please also take into account the previoous comments where I
    mentionned it would be awesome to have the possibility to download a zip
    with only the log of failed builds?

    Sure. I noted this to bring it up in our internal comms with the Actions team. Not to mention the ZIP archive is created at the API side and this request involves introducing changes to it so that the CLI can use it.

  22. assigned and unassigned on Apr 4, 2025
  23. babakks commented on Apr 7, 2025

    @babakks
    Member

    During investigation, we noticed another issue with legacy filename formats. So, the updated A/C is as below:

    Acceptance Criteria

    1. Step logs present

    Given I have a job run whose logs are produced by the new results service
    When I run gh run view --logs <JOB-ID>
    Then the job logs are displayed with proper step name on every line

    2. Step logs missing

    Given I have a job run whose logs are produced by new results service without individual step logs
    When I run gh run view --logs <JOB-ID>
    Then the job logs are displayed with UNKNOWN placeholder for step name on every line

    3. Legacy filename format

    Given I have a job run whose logs are named in the legacy format (e.g., -2147483648_issue.txt) and its individual step logs are missing
    When I run gh run view --logs <JOB-ID>
    Then the job logs are displayed with UNKNOWN placeholder for step name on every line

  24. babakks commented on Apr 11, 2025

    @babakks
    Member

    Thanks everyone for helping spot the problem here. A fix has been landed and will be available in the next release, which is very soon. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsgh-runrelating to the gh run commandpriority-2Affects more than a few users but doesn't prevent core functions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions