Config is being interpreted as a workflow... but it's not a workflow

Hey guys! I think I’ve found a bug that cropped up yesterday, so flagging here. I created a new project yesterday, and used a standard CircleCI config/.circleci.yml file format that I’ve used in ~20 other projects.

The full config is below:

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.0
jobs:
  build:

    # Only build on dev, staging and production branches for deployment
    # For now these don't seem to be working, no idea why
    branches:
      only:
        - development
        - staging
        - production

    docker:
      # specify the version you desire here
      - image: circleci/node:8.10

    working_directory: ~/repo

    steps:
      - checkout

      # Enable private NPM modules
      - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - deploy:
          name: Deploy
          command: |
            if [ "${CIRCLE_BRANCH}" == "production" ]; then
              yarn deploy_production
            elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
              yarn deploy_staging
            elif [ "${CIRCLE_BRANCH}" == "development" ]; then
              yarn deploy_development
            else
              echo "Not development, staging or production, so not deploying"
            fi

However, when I push the project up to CircleCI, I get a “config processing error”. When clicking over to the “job configuration” tab, I see the following:

jobs:
  Config Processing Error:
    docker:
    - image: bash:4.4.19
    steps:
    - run:
        name: Config Processing Error
        command: |-
          # Job \"build\" has filters configured in the job definition. These filters are incompatible with workflows.
          false
workflows:
  version: 2
  Config Processing Error:
    jobs:
    - Config Processing Error
version: 2

It looks very much like CircleCI converting my build to a workflow before running it, and then failing because the build is incompatible with workflows. (I tried commenting out the branches section of my config - and the build worked, but it ran as a workflow, not a regular build job)

Not sure if anyone else has spotted this, but this feels like a bug!

1 Like

Hi Chris,

We have a new project setting that default to true for new projects that is causing this. You can disable “build processing” at the bottom of the advanced project settings page. This will make your config behave like your existing projects.

Stepping up a level, you have hit a bug in our build processing. The conversion from single jobs to workflows is meant to result in the same outcome.

I’ll log this bug today.

Thanks,

Marc

2 Likes