Skip to content

Create graphQL field for Traces of Failed Jobs

What does this MR do and why?

We'll need a way to return failed traces for builds in graphQL. This is so the FE can migrate away from REST and into graphQL to request failed job traces. This is defaulted to last 10 lines, as that is the standard currently for the UI.

Existing REST method the FE uses currently: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/helpers/ci/builds_helper.rb#L10

Did not want to make this customizable, as it'll increase the potential to overwork the system. Some traces have thousands of lines so we want to hard cap it.

Screenshots or screen recordings

image

How to set up and validate locally

Clone and try this query

{
  project(fullPath: "testproject/root") {
        pipeline(iid: 9999) {
          jobs {
            nodes {
              id
              trace {
                htmlSummary
              }
            }
      	  }
    	}
   }
}

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 to #398195 (closed)

Edited by Max Fan

Merge request reports