Fix pipeline throwing error when needs is undefined
There was an instance where we would get an optional job in the pipeline graph, which would not exist, but another job was referencing that job through their needs. This commit fixes this problem and add additional spec coverage.
Showing
- app/assets/javascripts/pipelines/components/parsing_utils.js 17 additions, 7 deletionsapp/assets/javascripts/pipelines/components/parsing_utils.js
- app/assets/javascripts/pipelines/utils.js 10 additions, 4 deletionsapp/assets/javascripts/pipelines/utils.js
- changelogs/unreleased/329895-fix-needs-is-undefined-in-pipeline-graph.yml 5 additions, 0 deletions...eased/329895-fix-needs-is-undefined-in-pipeline-graph.yml
- spec/frontend/pipelines/components/dag/mock_data.js 14 additions, 0 deletionsspec/frontend/pipelines/components/dag/mock_data.js
- spec/frontend/pipelines/parsing_utils_spec.js 8 additions, 2 deletionsspec/frontend/pipelines/parsing_utils_spec.js
- spec/frontend/pipelines/pipeline_graph/utils_spec.js 22 additions, 0 deletionsspec/frontend/pipelines/pipeline_graph/utils_spec.js
Please register or sign in to comment