Possible Recursion in Deps Pipelines
Looking at a dependency pipeline build of Grafana, or this pipeline with libpng
, it seems that we're recursing.
The error at the bottom of the libpng
build reads:
dependencies_io_check - failed - (reached maximum depth of child pipelines)
Digging into the continuous integration files, here is what I think is happening.
First, we run .gitlab-ci.yml
.
The dependencies_io_check
job will run if the branch name starts with deps
.
dependencies_io_check:
extends: .trigger-job
when: always
variables:
ee: "true"
rules:
# Because of inherit:variables being false, `PIPELINE_TYPE` isn't available here. :(
# https://gitlab.com/gitlab-org/gitlab/-/issues/368759
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^deps/ || $CI_COMMIT_BRANCH =~ /^deps/'
The trigger-job
which it extends, is a trigger. This means that the job will trigger a pipeline, which then in turn runs dependencies_io_check
, which then triggers a pipeline, and so on as long as the branch name starts with deps
.
The workflow rule in trigger-job
may have been what we intended to stop it, but the rules are not first one fails
like a firewall, they keep checking to see if any work. Thus, the dependencies_io_check
job always runs and just keeps triggering itself.