After much searching, I eventually found that the builds were not running because of a config error, logged in the ‘workflows’ display. But the logged errors are unreadable, and undocumented.
I ran across the cli tool, but the installation instructions don’t work, failing like so:
Unable to find image ‘circleci/picard@sha256:4e0de12cec3a7ff079097f26c0a1d3478a0cd67ec1032235fd97e9607d4820cb’ locally
Pulling repository circleci/picard
FATA[0061] Get https://registry-1.docker.io/v1/repositories/circleci/picard/tags: read tcp 52.206.40.44:443: i/o timeout
Are there any other options for debugging the config?
Could you share a link to your build, and post your config file either in a code block or in a gist at https://gist.github.com/? This will help a lot to debug your issue.
It was some yaml whitespace-counts-sometimes thing, plus the lack of support for ‘owner’ filters.
Is looking at each config individually really faster than documenting the schema & error messages? The output looks like some clojure thing, like spec or herbert, but maybe not precisely those. Can you just point to the docs for the lib that generates the error messages?
I don’t work in the development side of things, so I don’t know what library throws this error – at a guess, it looks like there’s a problem with your workflows filters. if I could see a link to your build though, I could help to debug what’s actually happening – non-CircleCI folks won’t be able to see your build, and CircleCI employees won’t be able to see your code. If you posted the config as a gist, non-CircleCI folks could also help to debug.
I’m running into something similar. Can you shed some more light on this? The docs say that “tags” filter is allowed for workflow, but I get this message when my job is run:
"
We weren’t able to start this workflow.
Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:wfBuild {:jobs [{:build (not (map? nil)), :filters {:tags disallowed-key}}]}}}
On a side note, this kind of logging is not helpful, and the yaml parser seems to function inconsistently with what the documentation says. That’s all I can conclude unless the error tells me more about what it thinks is wrong with the yaml file.
On a lark I tried converting a line to a list element, because the CircleCI suggests workflow names can be list items?
#!/bin/sh -eo pipefail
# Unable to parse YAML
# while parsing a block mapping; expected <block end>, but found BlockEntry; in 'string', line 35, column 3:
# - wfBuild:
# ^
false
Exited with code 1
Here is the CIrcleCI yaml output. The error doesn’t make sense because the YAML file is syntactically correct per: http://yaml-online-parser.appspot.com
I guess I’m not seeing what you mean by the build key. But the version below doesn’t generate an error. It builds on the master branch even though the master branch isn’t listed in the only list, but that’s another topic.
We weren't able to start this workflow.
Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:wfBuild {:jobs [{:build (not (map? nil)), :filters {:branches disallowed-key}}]}}}
For more examples see the [Workflows documentation](https://circleci.com/docs/2.0/workflows).
And my YAML parser tells me it’s a good YAML file. Here’s the output from that:
I see it now @halfer. Thanks for taking the time to elucidate. I’ll update and retest.
And I get the whole, “check your YAML” thing. Hopefully someone at CircleCI will realize how much time is acceptable to hunt down issues related to whitespace, and how much time is acceptable to cross-check config indentation and formatting in the first place. And I would suggest that the acceptable amount of time for both of those activities is precisely 0 seconds.
Feels like I’m in the home stretch. For my test today I got the branch filter working. Then I updated the filter to be tags. I pushed a tag of 1.2.3.4, and every push on the branch after that causes the build to run. I’m hoping to be able to run the build only the first time a specific tag is pushed.
Any ideas on how I should tweak my config file to make sure that happens?
Thanks again in advance.
Here’s what the server sees my workspace definition in my configuration file as …
Yes, by default filters are also “all branches”. You need an explicit “no branches” filter to go with your tag filter. See what I did in this demo project here, in the only-deploy-tags section. I believe this is in the documentation .
Incidentally, I’d recommend removing the only filter from your job and just rely on the workflows filter for now; there have been some reports of buggy behaviour with the job-level filter. I believe CircleCI are looking at it, but it is intermittent or dependent on some characteristic that is not immediately obvious.
A serious answer to the yaml problem is to set your ide/text editor to use 4 spaces(2 tabs). It makes it a lot easier to read. Also, checkout the cli: https://circleci.com/docs/2.0/local-cli/ This allows you to validate your yaml without pushing code changes.