Skip to content

Add link to job log in Runners dashboard

What does this MR do and why?

Add a link to the job log in the runners dashboard if available. This is related to !131124 (merged).

Note: I am taking over for @mrincon (hey there 👋 ) at the request of @pedropombeiro (Internal link: https://gitlab.slack.com/archives/C0GQHHPGW/p1694094914544059). Instead of simply offering guidance on the CSS change, I thought I might as well take a minute to make the MR itself.

Issue: #413096 (closed)

Screenshots or screen recordings

Before After
Screenshot_2023-09-07_at_1.38.44_PM Screenshot_2023-09-07_at_11.10.52_AM

How to set up and validate locally

In rails console (rails c) enable the feature

Feature.enable(:runners_dashboard)
  1. 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. In the rails 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) }

Refresh the page to see the list.

  1. Notice the new links!

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