question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

YAML Anchors and References Break Schema Validation and Suggestions

See original GitHub issue

Describe the bug

When user anchors or references in CloudFormation YAML files, schemas stops working when anchors/references are used.

Expected Behavior

It works as normal.

Current Behavior

Following error keeps repeating as elements are hovered.

Error thrown while requesting schema "Error: end of the stream or a document separator is expected" when calling the registered contributor "cloudformation"

Steps to Reproduce

  1. Add an anchor to any element
...
 Tags: &tags
   - Key: Application
     Value: MyApp
...

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
evidolobcommented, Mar 4, 2021

It is bug kddejong.vscode-cfn-lint in as they use node-yaml-parser to parse yaml and it seems it not support yaml anchor’s. I will investigate more next week, we need to improve our behavior in case if contributing extension fails.

0reactions
svrxcommented, Mar 4, 2021

Thanks. Already opened issue with then about the issue. https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/issues/158

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced YAML syntax cheatsheet - Educative.io
Here's what we'll cover today: Validator and Parser; Anchors and Alias; Schemas; Escape Sequences; Separators and Directives; Wrapping up ...
Read more >
Optimize GitLab CI/CD configuration files
You can reduce complexity and duplicated configuration in your GitLab CI/CD configuration files by using: YAML-specific features like anchors ( & ), aliases ......
Read more >
YAML Ain't Markup Language (YAML™) revision 1.2.2
It is up to the YAML processor to come up with human-friendly key order and anchor names, possibly with the help of the...
Read more >
YAML Anchor, Aliases and Merge Keys
Schema -validation of a YAML document is only possible when all references and merge keys are represented. However, it is not that every...
Read more >
Structuring a complex schema — Understanding JSON ...
Like any other code, schemas are easier to maintain if they can be broken down into logical units that reference each other as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found