Bug: Empty jobs array in new pipeline view
For some reason, a small number of jobs arrays are coming in empty from the GraphQL endpoint. This is not the case for the REST endpoint, as we can tell by both the group.size
of the empty jobs and by the legacy REST code, which does not check that the array is populated before indexing in to jobs[0]
, but also does not error.
The structure of the queries is:
stages {
nodes {
groups {
nodes {
size
jobs {
nodes {
}
}
}
}
}
}
Sometimes, rarely, this is coming in as groups.size === 1
but jobs.nodes
is empty. We have instrumented the unwrapping code to determine it is coming in that way. This has only happened on private repos so far, so we cannot say much else about the responses.
Previous summary
Having looked into Sentry bugs from flipping the pipeline feature flag (https://sentry.gitlab.net/gitlab/gitlabcom-clientside/issues/2534640/?query=is%3Aunresolved%20has%3Acomponent, https://sentry.gitlab.net/gitlab/gitlabcom-clientside/issues/2534670/?query=is%3Aunresolved%20has%3Acomponent \[internal\]), it appears that somehow a job is appearing as `undefined` in an an array.Edited by Sarah Groff Hennigh-Palermo