Skip to content

Allow finding retried and latest pipeline jobs

Alex Kalderimis requested to merge graphql-pipeline-jobs-retried into master

What does this MR do and why?

Adds a new argument to Pipeline.jobs to allow filtering by latest/retried status.

See: #365345

Example GraphQL Query

Find only current failures:

query($id: MergeRequestID!) {
  mergeRequest(id: $id) {
    headPipeline {
      status
      finishedAt startedAt createdAt duration
      latest: jobs(retried: false) {
        nodes { name retried }
      }
      retried: jobs(retried: true) {
        nodes { name retried }
      }
    }
  }
}

How to set up and validate locally

  1. Create a pipeline
  2. Retry one or more jobs
  3. Use the above GraphQL query

The retried jobs should only appear in the retried collection, and their replacements in the latest collection.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading