Skip to content

Filter job failures in runner fleet dashboard

What does this MR do and why?

MR Description
!130560 (merged) Implement redis cache of failed builds executed on instance runners
!130579 (merged) GraphQL: Implement failure_reason filter in AllJobsResolver
!131124 (merged) you are here Filter job failures in runner fleet dashboard

This MR changes the top-left panel in the runner performance dashboard to only show jobs that failed with a runner system failure. It also displays the last 2 lines of the log, instead of the last 10.

EE: true

Part of #413096 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console (rails c) enable the feature

    Feature.enable(:runners_dashboard)
  2. Visit the admin performance page http://gdk.test:3000/admin/runners/dashboard

Verify the empty state

  1. Verify the empty state, you will see it as long as you are not running jobs.

Verify with data

  1. On the GDK console, ensure you have the required license:

    > License.feature_available?(:runner_performance_insights)
    => true
  2. On the shell terminal, run bundle exec rake "gitlab:seed:runner_fleet" to generate mock jobs.

  3. On the GDK console, run the following command to ensure that we have some jobs failed with :runner_system_failure:

    builds = Ci::Build.with_runner_type(:instance_type).order(id: :desc).where(status: 'failed').limit(2)
    builds.update_all(failure_reason: :runner_system_failure)
    builds.each { |build| ::Ci::InstanceRunnerFailedJobs.track(build) }
  4. Refresh the page to see the list.

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 Pedro Pombeiro

Merge request reports