Skip to content

Add graphQL Schema to lazy load Jobs Dropdown

Max Fan requested to merge 360847-backend-add-graphql-for-scheduled_actions into master

What does this MR do and why?

Currently, we are loading all manual_jobs and scheduled_jobs on each pipeline on the Pipelines#index page. This returns too many jobs as some pipelines have 400+ manual jobs.

This MR introduces 2 attributes has_manual_actions and has_scheduled_actions.

The corresponding Frontend MR will use these actions to know if there are any jobs that can be expanded. And will do an additional graphQL query to fetch these jobs when needed

The graphQL questions needed to support the FE are also in this MR

Screenshots or screen recordings

image

How to set up and validate locally

  1. Trigger graphQL request as above to confirm returned fields
  2. Request to http://172.16.123.1:3000/root/maxci/-/pipelines.json should return has_manual_actions and has_scheduled_actions fields

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #360847 (closed)

Edited by drew stachon

Merge request reports

Loading