Draft: [CI] Adds CiJob.trace field
What does this MR do?
This MR adds a new field to the CiJob
GraphQL type: CiJob.trace
, which provides
access to build traces.
This feature is available via the REST API, and this featureaddition brings the GraphQL API up to parity, and more, since this type is capable of accessing the pre-parsed build-sections, which is a much more powerful API.
Considering the cost of accessing build traces, this field is given a high complexity.
Example Query
query($path: ID!, $name: String) {
project(fullPath: $path) {
pipelines(first: 1) {
nodes {
jobs {
nodes {
name
duration
trace { raw(tail: 25) }
}
}
}
}
}
}
Ideally we don't want to encourage fetching lots of traces at a time like this. For that reason, the complexity is high, and we set the tail argument to a conservative value by default.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
This MR exposes build traces, which may contain potentially sensitive information. This feature is
guarded by the appropriate ability check of read_build_report_results
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team