Skip to content

Conversation

@KetchupOnMyKetchup
Copy link
Contributor

@KetchupOnMyKetchup KetchupOnMyKetchup commented Apr 11, 2023

Closes #72

New requirement:

  1. Get all workflows and paginate using octokit
  2. Get all jobs per run and paginate using oktokit
  3. Get the last 100 workflow runs

--

Proof of each of the above 3 requirements:

  1. Get all workflows and paginate using octokit is already happening so no code changes were needed. For proof: see screenshot of use of .paginate pulling all 33 workflows from a repo and paginating (also tested changing per_page: 10 to ensure it would still get all 33 workflows and it did):
    image

  2. Get all jobs per run and paginate using oktokit. I set per page to 2 in the screenshot below to test and show that it gets all the pages with the .paginate code and pulls more than 2 jobs on the right of the screen under a run under both Current Branch and Workflows.
    image

  3. Get the last 100 workflow runs demo, by bumping per_page to 100 for workflows for the current branch.:
    perpage100

--

Demo showing that workflows, runs, and jobs tree working:
demoworkflows

@KetchupOnMyKetchup KetchupOnMyKetchup requested a review from a team as a code owner April 11, 2023 20:58
@KetchupOnMyKetchup KetchupOnMyKetchup marked this pull request as draft April 11, 2023 21:10
@elbrenn
Copy link
Collaborator

elbrenn commented Apr 11, 2023

Based on the screenshot in #72, the issue was about the number of jobs shown for a given workflow run. This is a different api.

Likely this user is running into friction with the default page size of the workflow jobs api

@KetchupOnMyKetchup KetchupOnMyKetchup changed the title Bump number of displayed current workflows to 100 Get and display all workflows, all jobs per workflow, and last 100 workflow runs in the extension view Apr 12, 2023
@KetchupOnMyKetchup KetchupOnMyKetchup marked this pull request as ready for review April 12, 2023 19:50
Copy link
Contributor

@jtamsut jtamsut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty reasonable to me. Thanks for the screenshots in the PR description. Made understanding the problem very clear. 😄

Copy link
Collaborator

@elbrenn elbrenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds changes to increase page size for workflow runs and fetch all jobs for a workflow run/ workflow run attempt as stated in the PR description 👍

However I don't see any changes to fetch all workflows. Workflows are fetched in WorkflowRepoNode

@KetchupOnMyKetchup
Copy link
Contributor Author

This PR adds changes to increase page size for workflow runs and fetch all jobs for a workflow run/ workflow run attempt as stated in the PR description 👍

However I don't see any changes to fetch all workflows. Workflows are fetched in WorkflowRepoNode

All workflows are getting fetched already and I put a screenshot in the description to show the code that does it and that I tested it:
image

@KetchupOnMyKetchup KetchupOnMyKetchup merged commit ed918ba into main Apr 13, 2023
@KetchupOnMyKetchup KetchupOnMyKetchup deleted the ketchup/bumpPerPageCurrentBranch branch April 13, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Number of checks displayed inside GH action is limited to 30

4 participants