Skip to content
GitLab
Next
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #272627

"List pipeline jobs" GitLab API does not return an information about retired jobs anymore

Summary

"List pipeline jobs" GitLab API call does not return an information about retired jobs anymore. GitLab versions prior to 13.5 include all jobs into a response, starting from GitLab 13.5 retired jobs are omitted from a response.

This causes some problems, for instance:

  1. No way to determine (using API) whether a given task was retried or not, and how many times if it was.
  2. As retried tasks are not reachable they can not be cleaned up using API, a script which is responsible for removing retired artifacts can not do its work anymore.
  3. Dashboards which calculate fail rates do not show correct numbers anymore.

Steps to reproduce

  1. Retry any job in any pipeline.
  2. Get pipeline jobs via API: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs
  3. The original job (which was retired) will be missing in a response.

There is a vey simple project which can be used for demonstrating this problem: https://gitlab.com/kutelev/retry-job

Pipeline which has a retired job. In a Web interface 2 jobs are shown: https://gitlab.com/kutelev/retry-job/-/pipelines/207336828/builds

API responds with just one: https://gitlab.com/api/v4/projects/22007522/pipelines/207336828/jobs

Job with ID 810672584 is omitted from a response.

Example Project

https://gitlab.com/kutelev/retry-job

What is the current bug behavior?

"List pipeline jobs" API call does not return an information about jobs which were retried.

What is the expected correct behavior?

An information about all pipeline jobs should be returned.

Relevant logs and/or screenshots

-

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

-

Results of GitLab application Check

-

Possible fixes

-

Edited Dec 03, 2020 by Alexander Kutelev
Assignee
Assign to
Time tracking