Skip to content

Include trigger jobs in failure MR widget

Frédéric Caplette requested to merge fc-fix-show-failures-widget-data into master

What does this MR do and why?

Add trigger jobs in the list of failed jobs and disable the retry button for now. We need to handle the retry the same we do in the graph, which means showing a warning that we will recreate the whole downstream. In the spirit of iteration, for now we simply disable the action. Note also that clicking on the job ID now takes you to the downstream pipeline since trigger jobs do not properly exists within the project,you cannot go to jobs/trigger_job_id as you would get a 404 error. This is the same behaviour that we have in the big pipeline graph.

This is behind a FF ci_job_failures_in_mr

Screenshots or screen recordings

Before After
Screenshot_2023-07-18_at_3.17.14_PM Screenshot_2023-07-18_at_3.16.54_PM
- Screenshot_2023-07-18_at_3.39.00_PM

How to set up and validate locally

Pre-requisites: make sure to have working runners

  1. Enable the FF in rails console Feature.enable(:ci_job_failures_in_mr)
  2. Inside your repository, create a file names pipeline.yml
  3. That file should contain any job that will fail. Let's make it:
job_from_my_child_pipeline:
  script: exit 1
  1. Navigate to your pipeline editor Build -> Pipeline Editor
  2. Add a trigger job that will link to the new CI configuration
trigger_job:
  stage: build
  trigger:
    include: pipeline.yml
    strategy: depend
  1. Commit this change
  2. Now, create a merge request for any code change and go to the MR
  3. Navigate to the Pipelines tab of the MR
  4. Notice that the Trigger job has failed
  5. Notice that you can see that job inside the pipeline widget failure

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 Frédéric Caplette

Merge request reports