-
Notifications
You must be signed in to change notification settings - Fork 136
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
Stop supporting optional tag:yaml.org,2002:bool
to ease adoption for GitHub Actions Workflow templating
#407
Comments
Hey Craig. Yes, this is an irritating behavior from what was intended to be an optional part of the YAML 1.1 spec. 👉🏻 An immediate workaround is to make such values explicitly strings by surrounding them in quotes: name: CI
"on":
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
... ... Now, this was corrected in the YAML 1.2 spec. However, the current version of the Go YAML package (v2.x of that library) attempted to be compatible with both the YAML 1.1 and YAML 1.2 specs and so continues to accept these synonyms for boolean. It's been a long-standing issue that this behavior is an annoyance (see go-yaml/yaml#214 for details). It has been addressed in the not-yet-released version (v3.x) of the the Go YAML package. Even when this version of the package is released, it will be a breaking change for |
Floating this:
Which gets my mind to what @m0un10 is pointing out, here: that this optional implementation portion of the YAML spec is actively aggressive for a whole class of potential users. What's the downside of introducing a breaking change where we simply no longer support these optional boolean aliases? |
on:
is changed to true:
tag:yaml.org,2002:bool
to ease adoption for GitHub Actions Workflow templating
sorry, I accidentally closed it (so re-opened it). I was just going to leave a comment to say that commenting out line 42 and rebuilding gives me a way forward for templating github actions workflows. It would be great if the aggressive bool tag renaming got removed in a future release though! |
Okay... I suspect no one is using any of the synonyms. To avoid confusion, I'm suggesting that we support none of the synonyms. Not:
and only support the true/false variants:
Querying the community: https://kubernetes.slack.com/archives/CH8KCCKA5/p1623796540037600 |
Getting absolutely no pushback on this issue. And we're getting a regular report of this being an irritant. Let's do it. |
This one has yet to be prioritized and it caught another: #764 . sigh |
What steps did you take:
Using
on:
in a yaml fileWhat happened:
The
on:
was replaced withtrue:
What did you expect:
As
on:
is a valid field it should not have been converted to trueAnything else you would like to add:
This is very strange and impacts the ability to create templates for github actions.
Environment:
0.33.0
The text was updated successfully, but these errors were encountered: