Fix N+1 query problem for previousStageJobsOrNeeds
There were three problems; 1. The relation name was previousStageJobsAndNeeds, then it was changed to previousStageJobsOrNeeds. However, the include_needs condition stayed the same. 2. Batch loader of Job.previous_stage_jobs was not working well. 3. N+1 tests were not working well
显示
- app/graphql/types/ci/job_type.rb 7 个添加, 3 个删除app/graphql/types/ci/job_type.rb
- app/graphql/types/ci/stage_type.rb 1 个添加, 1 个删除app/graphql/types/ci/stage_type.rb
- spec/requests/api/graphql/project/jobs_spec.rb 6 个添加, 25 个删除spec/requests/api/graphql/project/jobs_spec.rb
- spec/requests/api/graphql/project/pipeline_spec.rb 28 个添加, 8 个删除spec/requests/api/graphql/project/pipeline_spec.rb
想要评论请 注册 或 登录