Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lang] yaml 1.1 vs yaml 1.2 support #146

Closed
Naatan opened this issue May 19, 2020 · 4 comments
Closed

[lang] yaml 1.1 vs yaml 1.2 support #146

Naatan opened this issue May 19, 2020 · 4 comments
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution enhancement This issue is a feature request surprising to users

Comments

@Naatan
Copy link

Naatan commented May 19, 2020

My yaml source contains:

on:
  push:
    branches:
      - master
  pull_request:
    - master

Which gets compiled as:

true:
  push:
    branches:
    - master
  pull_request:
  - master
@ewrenn8 ewrenn8 added the bug This issue describes a defect or unexpected behavior label May 19, 2020
@cppforlife
Copy link
Contributor

currently ytt uses yaml library that follows yaml 1.1 spec i believe. in that spec on is equivalent to true. to make this work youll have to do something like this:

"on":
  push:
    branches:
      - master
  pull_request:
    - master

@cppforlife cppforlife added the discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution label May 19, 2020
@cppforlife
Copy link
Contributor

cppforlife commented May 19, 2020

btw give --strict a try for this case. it's puts ytt into mode where it checks against yaml ambiguities: https://github.com/k14s/ytt/blob/develop/docs/strict.md

@Naatan
Copy link
Author

Naatan commented May 19, 2020

Thanks for the workaround! That unblocks me for now at least :)

@cppforlife cppforlife removed the bug This issue describes a defect or unexpected behavior label May 19, 2020
@cppforlife cppforlife changed the title on: key is compiled as true: [lang] yaml 1.1 vs yaml 1.2 support May 19, 2020
@cppforlife cppforlife added the enhancement This issue is a feature request label Aug 18, 2020
@pivotaljohn
Copy link
Contributor

#407 outlines an approach to solve this.

Ideally, the older issue remains and the younger issue is closed as a duplicate. In this case, progress has been recorded on #407, so closing this issue as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution enhancement This issue is a feature request surprising to users
Projects
None yet
Development

No branches or pull requests

4 participants