Skip to content

Fixes failed render when job stage data is missing

Miguel Rincon requested to merge 391194-fix-missing-stage-error into master

What does this MR do and why?

This change fixes a Vue render error that prevents diplaying the jobs table when its stage is missing.

Some jobs may not have a stage due to them being generated as seed data, as the stage is nullable in our API, which should account for it to be "null".

Screenshots or screen recordings

My job data has been generated by bin/rake "gitlab:seed:runner_fleet" so I get the following error in "Before":

Before After
image image

How to set up and validate locally

  1. Use seed data from bin/rake "gitlab:seed:runner_fleet"
  2. Enable feature flag admin_jobs_vue with
    • rails c then type Feature.enable(:admin_jobs_vue)
  3. Visit Admin -> Jobs e.g. http://gdk.test:3000/admin/jobs
  4. Confirm all jobs load correctly

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 #391194 (closed)

Merge request reports