Update circular dependencies message
What does this MR do and why?
Update the error message when a cycle is found in the pipeline dependencies. The original error message was a raw output from TSort's Cyclic exception message, this MR updates the error message to increase better show what the dependency cycle is (especially for less experienced users). This change also affects self-dependencies which raise the same exception.
Screenshots or screen recordings
I have collected screenshots for the updated text in all places I believe the text to be shown
Circular dependencies
Old:
New:
Self dependency
Old:
New:
How to set up and validate locally
Circular Dependency
- Create a new repository
- Create a gitlab pipeline using the following script
image: maven:latest
stages:
- build
- test
job_A:
stage: test
tags:
- docker
script:
- "echo jobA"
dependencies:
- job_C
needs:
- job: job_C
artifacts: false
job_B:
stage: test
tags:
- docker
script:
- "echo jobB"
dependencies:
- job_A
needs:
- job: job_A
artifacts: false
job_C:
stage: test
tags:
- docker
script:
- "echo jobC"
dependencies:
- job_B
needs:
- job: job_B
artifacts: false
- Go to pipeline editor and check on the pipeline
- The error should be displayed
Self dependency
- Replace the
.gitlab-ci.yml
with the following YML
image: maven:latest
stages:
- test
job_A:
stage: test
tags:
- docker
script:
- "echo jobA"
dependencies:
- job_A
needs:
- job: job_A
artifacts: false
- Wait for the pipeline to be validated, the new error message should be shown
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Joshua Hunt