I think I may have found a bug with workflow job filters which I could use some input on.
Consider the following config and pushing to the branch “branch-something”, the job “next-job-a-2” incorrectly runs. I would expect that job “check-branch-a” runs because the branch only filter passes, while the job “check-branch-a-2” should not run (and it appears not to because its not rendered in the workflow graph) yet job “next-job-a-2” executes, even though one of its requires has not run. Job “next-job-a” correctly runs.
Any input would be helpful. Thanks!
version: 2.1
jobs:
checking-branch-job:
docker:
- image: circleci/node:10.8
steps:
- run: echo "hello world"
next-job:
docker:
- image: circleci/node:10.8
steps:
- run: echo "1"
workflows:
build:
jobs:
- checking-branch-job:
name: check-branch-a
filters:
branches:
only:
- /^branch-.*$/
- checking-branch-job:
name: check-branch-a-2
filters:
branches:
only:
- /^branch-.*-2$/
- next-job:
name: next-job-a
requires:
- check-branch-a
- next-job:
name: next-job-a-2
requires:
- check-branch-a
- check-branch-a-2