Skip to content
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

Support pagination in listJobsForWorkflowRunAttempt #51

Closed
ben-z opened this issue Nov 17, 2023 · 5 comments · Fixed by #55
Closed

Support pagination in listJobsForWorkflowRunAttempt #51

ben-z opened this issue Nov 17, 2023 · 5 comments · Fixed by #55
Labels
bug Something isn't working

Comments

@ben-z
Copy link

ben-z commented Nov 17, 2023

I recently started experimenting with this project, but I'm observing that only around 30 out of my 61 jobs are shown in the resulting gantt chart. It appears that the default page size is 30: https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run-attempt. Could you support pagination?

@Kesin11
Copy link
Owner

Kesin11 commented Nov 18, 2023

@ben-z
Thanks for trying actions-timeline!
It seems List jobs for a workflow run attempt parameter per_page can accept max to 100.
I think almost use case are enough to handle 100 jobs, so I will use this parameter instead of pagination.

@Kesin11
Copy link
Owner

Kesin11 commented Nov 18, 2023

@ben-z
I released v2.0.1
Please try it.

@ben-z
Copy link
Author

ben-z commented Nov 19, 2023

@ben-z I released v2.0.1 Please try it.

Works well! Thanks for the update

@ben-z
Copy link
Author

ben-z commented Nov 21, 2023

Just came across some pagination code from another repo, it's a good reference in case we want to implement it here.

https://github.com/inception-health/otel-export-trace-action/blob/b70e5a1e4cc4764bbbaeb963f8952b8d3d1529ba/src/github.ts#L182-L205

@Kesin11
Copy link
Owner

Kesin11 commented Nov 22, 2023

@ben-z
Thanks!
But we also need to consider the size limit for mermaid. Even if we could get all the jobs in the workflow, we may not be able to render them due to mermaid errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants