-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-runrelating to the gh run commandrelating to the gh run commandhelp wantedContributions welcomeContributions welcomep2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
This is a spinoff from #5011
Given a job in a workflow with a long name, gh run view --log will not display logs for that name.
Steps to reproduce the behavior
Here is a workflow definition that includes a job with a long name. Note that I accidentally left the step name as duplicate but it's not relevant.
Running gh run view 5415184943 --log produces only the logs for the shortjob:
shortjob Set up job 2023-06-29T18:15:54.4601154Z Current runner version: '2.305.0'
shortjob Set up job 2023-06-29T18:15:54.4659852Z ##[group]Operating System
shortjob Set up job 2023-06-29T18:15:54.4660607Z Ubuntu
shortjob Set up job 2023-06-29T18:15:54.4660922Z 22.04.2
shortjob Set up job 2023-06-29T18:15:54.4661172Z LTS
shortjob Set up job 2023-06-29T18:15:54.4661557Z ##[endgroup]
shortjob Set up job 2023-06-29T18:15:54.4661856Z ##[group]Runner Image
shortjob Set up job 2023-06-29T18:15:54.4662253Z Image: ubuntu-22.04
shortjob Set up job 2023-06-29T18:15:54.4662611Z Version: 20230625.1.0
shortjob Set up job 2023-06-29T18:15:54.4663193Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230625.1.0/images/linux/Ubuntu2204-Readme.md
shortjob Set up job 2023-06-29T18:15:54.4663834Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230625.1.0
shortjob Set up job 2023-06-29T18:15:54.4664318Z ##[endgroup]
shortjob Set up job 2023-06-29T18:15:54.4664681Z ##[group]Runner Image Provisioner
shortjob Set up job 2023-06-29T18:15:54.4664992Z 2.0.238.1
shortjob Set up job 2023-06-29T18:15:54.4665334Z ##[endgroup]
shortjob Set up job 2023-06-29T18:15:54.4666082Z ##[group]GITHUB_TOKEN Permissions
shortjob Set up job 2023-06-29T18:15:54.4666664Z Contents: read
shortjob Set up job 2023-06-29T18:15:54.4666956Z Metadata: read
shortjob Set up job 2023-06-29T18:15:54.4667704Z Packages: read
shortjob Set up job 2023-06-29T18:15:54.4668042Z ##[endgroup]
shortjob Set up job 2023-06-29T18:15:54.4671985Z Secret source: Actions
shortjob Set up job 2023-06-29T18:15:54.4672585Z Prepare workflow directory
shortjob Set up job 2023-06-29T18:15:54.5458534Z Prepare all required actions
shortjob Set up job 2023-06-29T18:15:54.5759678Z Complete job name: shortjob
shortjob Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry's standard dummy text ever since the 1500s 2023-06-29T18:15:54.6997865Z ##[group]Run echo "You should not see me"
shortjob Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry's standard dummy text ever since the 1500s 2023-06-29T18:15:54.6998447Z echo "You should not see me"
shortjob Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry's standard dummy text ever since the 1500s 2023-06-29T18:15:54.7617853Z shell: /usr/bin/bash -e {0}
shortjob Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry's standard dummy text ever since the 1500s 2023-06-29T18:15:54.7618322Z ##[endgroup]
shortjob Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has been the industry's standard dummy text ever since the 1500s 2023-06-29T18:15:54.8244988Z You should not see me
shortjob Complete job 2023-06-29T18:15:54.8549991Z Cleaning up orphan processes
Expected vs actual behavior
I would expect to see logs as in the Web UI for the job with the long name.
Why does this happen?
As described in my comment when the .zip file is produced, file paths are truncated due to intrinsic length limitations of .zip files. Our regexp matching logic does not apply the same behaviour, resulting in us not matching file names to their jobs.
See the truncated Loreum Ipsum dir name below:
➜ run-log-5415184943-1688062544 ls -lah
total 32
-rw-r--r-- 1 williammartin staff 2.2K Jun 29 18:25 1_Lorem Ipsum is simply dummy text of the printing and types (1).txt
-rw-r--r-- 1 williammartin staff 452B Jun 29 18:25 1_Lorem Ipsum is simply dummy text of the printing and types.txt
-rw-r--r-- 1 williammartin staff 2.1K Jun 29 18:25 1_shortjob.txt
-rw-r--r-- 1 williammartin staff 454B Jun 29 18:25 2_shortjob.txt
drwxr-xr-x 5 williammartin staff 160B Jun 29 20:25 Lorem Ipsum is simply dummy text of the printing and typesetting industry Lorem Ipsum has
drwxr-xr-x 5 williammartin staff 160B Jun 29 20:25 shortjob
Notes
shayn-orca
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-runrelating to the gh run commandrelating to the gh run commandhelp wantedContributions welcomeContributions welcomep2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions