-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh run view limit on output? #7771
gh run view limit on output? #7771
Comments
@christopher-watanabe-snkeos Do you by happen chance mean |
@samcoe Thanks for the response! Sorry for the confusion, the exact command I am running locally on my git repo is:
What I notice is that there are jobs that I can view in the repo's actions tab for the workflow run, but those jobs are for some reason missing in the output of the above command. I've also just had a look at the information that is given when I set |
I've run another test by accessing the listed jobs with the listJobsForWorkflowRun and pagination of Octokit. What I found was that by paging over the results from this call, I was able to list all of the workflows, including the previously missing one. Could it be that the CLI call is only returning the first list of jobs from the workflow run? Can we adapt this behavior? |
I've found the documentation that points to this default of 30 page size https://docs.github.com/en/free-pro-team@latest/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run. I don't need the I still think that it would be useful to communicate via the CLI to get all jobs from the run view, however there are certainly workarounds. |
@christopher-watanabe-snkeos Thanks for the clarification and investigation, you are correct that we are only retrieving the first page of results from the jobs url. We should definitely be paginating automatically to retrieve all the jobs for a given run. Going to open this up for contributions. |
@samcoe I might want to take a stab at this. Here are the callers for ref: cli/pkg/cmd/run/watch/watch.go Line 210 in f777bec
Line 224 in f777bec
Line 224 in f777bec
cli/pkg/cmd/run/shared/shared.go Lines 430 to 440 in f777bec
|
@harveysanders I think it makes sense for |
@samcoe sounds good. Thanks! |
Describe the bug
I am validating that my github workflows accomplish what I expect them to. For this, I run my re-usable workflows over multiple projects. I do this with 6 re-usable workflows and 6 projects in the scope of the same workflow, so ultimately I expect
gh run view
to return the results for 36 different jobs.I noticed that there appears to be a limit on the output of the
gh run view
, as some of the jobs that I expected to run are shown in the Actions tab of the repo, but not listed in the jobs of thegh run view
.I can't seem to find any information about a limit to output of the
gh run view
, but if I remove one of the projects, limiting the number of jobs to 30, I notice that the jobs that were not listed before are suddenly listed once more. Is there a limit on the output I can expect fromgh run view
?Steps to reproduce the behavior
gh run view
Expected vs actual behavior
I would expect all of my workflows to be listed.
The text was updated successfully, but these errors were encountered: