Skip to content

Fix pipeline schedules view when owner is nil

Stan Hu requested to merge sh-fix-nil-pipeline-schedule-owner into master

What does this MR do and why?

The pipeline schedule Vue refactor in !128913 (merged) caused pipeline schedules not to be rendered when an owner of a pipeline schedule was nil. This can happen if the user is deleted.

Update the GraphQL schema and Vue code to allow for a nil owner.

Relates to #427747 (closed)

How to set up and validate locally

  1. Choose a project and click on Build -> Pipeline schedules.
  2. Create a new pipeline schedule.
  3. Run bin/rails console and update the owner_id to nil: Ci::PipelineSchedule.last.update(owner_id: nil).
  4. Load the pipeline schedule page again. You should see There was a problem fetching pipeline schedules..
  5. With this branch, reload the page. It should display. If you are an owner of the project, you can also take ownership of this orphaned pipeline schedule.

MR acceptance checklist

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

Edited by Stan Hu

Merge request reports