[Concourse] Outline view not loaded with VSCode Concourse CI extension when pipeline.yaml not complete
See original GitHub issueHi,
I have big pipeline descriptors with a lot of anchors and references which make VSC Concourse extension not work (cf. https://github.com/spring-projects/sts4/issues/483).
In order to navigate easily in my pipeline files, I tried to split these files into several ones (that I merge before load into my Concourse CI instance). But the problem is that the extension doesn’t load the outline view anymore. I don’t have content assist either by the way…
Here an exemple of a splitted file:
- name: deploy
serial: true
public: true
plan:
- in_parallel:
- get: git-ci
- get: metadata
- get: git-tests
- get: version-back
trigger: true
passed:
- build
- get: version-front
trigger: true
passed:
- build
- task: kustomize update
file: git-ci/ci/tasks/kustomize/task.yaml
input_mapping:
git-ci: git-ci
version-back: version-back
version-front: version-front
output_mapping:
git-ci: git-ci
k8s: k8s
- task: Control
file: git-ci/ci/tasks/control/task.yaml
input_mapping:
to_validate: k8s
pipeline_data: metadata
<<: *notifications
What’s the requirement for the files to be correctly parsed by the extension? Do I have to write every sections (resources, jobs, groups, …) in order it to work? Do the references have to be resolved in the same file ? Does the yaml only has to be valid?
Thanks for your answer
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
These questions are not actually very easy to answer. But in general things will ‘break’ in various ways for incomplete or invalid files. The editor implicitly assumes that you have your pipeline in one file and it cannot know that or how you are running it through any kind of processor before actually passing it to concourse cli.
How badly things breaks is somewhat dependent on implementation details.
We use snakeyaml to parse a file. If snakeyaml cannot parse a file, most things will not work. That’s probably what happens with the anchors. I think snakeyaml will try to resolve the anchors so if it cannot find the anchor it will error.
Probably not to be parsed as yml. But the editor will be confused about the file structure if it doesn’t have enough context. So, for example it won’t know this is actually a job and you’ll get various errors reported because of that.
Not to parse things, but the editor does make checks such as whether when you refer a resource, it is defined elsewhere in the file. So you’ll get warnings for ‘missing resources’.
… (because of #483) …
I’m sorry that didn’t yet get round to fixing that. I’ll try and fit it in soon. There’s probably something we can do to make it work better.