Misleading error on missing job dependencies
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Current implementation
If required dependencies are not found when specified using the needs keyword, the job will fail to start while raising a rather vague error message to hint the user in the right direction:
This is already an improvement over the previous state, but was limited to an MVC as discussed in Misleading error on invalid job dependencies.
This is a follow-up to that, so we can improve it further and deflect a considerable number of support tickets.
Proposal
Improve on the error message raised when needs dependencies cannot be found.
Users are often led on a long troubleshooting journey before they can figure out what the actual cause for the failure is. We should be able to improve the error handling to at least distinguish between the main possible root causes:
- Cross project artifacts download feature is not available for the given project/plan
- User doesn't have permissions to read the job in the source project
- Specific combination of
project - job - refwas not found - Parent or source job was not successful
- Specified parent or source job name does not match (specially common when using variables to define job names)
- Pipeline was not found in the current pipeline's hierarchy (parent-child pipelines) - must be part of the same hierarchy excluding current pipeline
