Skip to content

Job log jump to failures

Miranda Fluharty requested to merge job-log-jump-to-failures into master

What does this MR do and why?

This MR adds another "scroll to" button to the job log header that scrolls to the next "failure" (any text with .term-fg-l-red) when clicked.

Why? To make it easier to find what actually went wrong in a very long job log.

This feature is behind the job_log_jump_to_failures feature flag.

Screenshots or screen recordings

Screen_Recording_2022-06-30_at_10.44.09

How to set up and validate locally

  1. git checkout job-log-jump-to-failures
  2. echo "Feature.enable(:job_log_jump_to_failures)" | bundle exec rails console
  3. run a pipeline with a job that generates a long job log with some errors/failures

tip: you can use this .gitlab-ci.yml to test any job.log file by downloading it from another pipeline and putting it in the repo:

cat-job:
    stage: test
    script:
        - cat job.log
  1. navigate to the job log and click the "Scroll to next failure" button (next to the "Scroll to top" button)
  2. if there are no failures in the log, a toast should appear
  3. the first time you click it, it should jump to the first failure
  4. each time after that, it should scroll to the next failure, cycling back to the first when it reaches the end
  5. after you click the "Scroll to top" button, clicking "Scroll to next failure" should start at the first failure again

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 issues: #343658 (closed)

Edited by Miranda Fluharty

Merge request reports