GraphQL error: Field 'troubleshootJobWithAi' doesn't exist on type 'Pipeline'
We are getting "GraphQL error: Field 'troubleshootJobWithAi' doesn't exist on type 'Pipeline'" (red) error messages displayed on top of the screen on pipeline MR list page (https://gitlab.internal/xx/yy/-/merge_requests/4871/pipelines) after upgrade Gitlab ti 17.8.2 running on docker CE edition.
The issue is there is no content displayed when we click on "Failed jobs" link - the list below is empty.
On failures detail page (https://gitlab.internal/xx/yy/-/pipelines/56105/failures) the error message is displayed correctly.
It seems this impacts other users as well.
Technical proposal
Issue: The query app/assets/javascripts/ci/pipelines_page/graphql/queries/get_pipeline_failed_jobs.query.graphql
uses the field troubleshootJobWithAi
which is an EE
only field. This query is called in app/assets/javascripts/ci/pipelines_page/components/failure_widget/failed_jobs_list.vue
.
Fix: We should create a EE graphql fragment that is only imported to the query if the product version is EE. An example of this pattern in-use can be seen here app/assets/javascripts/vue_merge_request_widget/queries/get_state.query.graphql