YAML filters validation failure

circle.yml

#1

Steps to reproduce:

  1. Create incorrectly nested filter in Workflow, e.g.:
      - notify_production:
          requires:
            - post_process
            - stop_redundant_versions
          filters:
            only:
              - master
  1. Run circleci config validate -c .circleci/config.yml
  2. Start Workflow

What happens: validator reports config file is valid, but it fails on CircleCI with:

We weren’t able to start this workflow.
Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:build-and-deploy {:jobs [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil {:notify_production_complete {:filters {:only disallowed-key}}}]}}}
For more examples see the Workflows documentation.

What should happen: validation should fail


Incorrect Validation of config.yml
CircleCI Local CLI doesn't validate config file's workflows
#2

We agree it should fail validation. We are working on changes that should catch this and other schema errors. Thanks for the clear case!


#3

I would like to add, if you use a code editor, such as VS Code, it is now possible to Lint your code very accurately. CircleCI Schema Validator (linter)


#4

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.