-
Notifications
You must be signed in to change notification settings - Fork 315
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
Fix array access regression in template rendering #4620
Conversation
The `handlebars` crate introduced a change to how it accesses array members in version 0.29.0 which is incompatible with Habitat's current template syntax. Where Habitat would use something like `{{members[0]}}` to access a specific array member, `handlebars` now expects `{{members.[0]}}`. This syntax actually mirrors the original JavaScript implementation, as well as the syntax of other tools like `jq`. Since using 0.29.0 or higher of `handlebars` would break any Habitat templates that use direct array access, we need to lock to version 0.28.3, the last prior version that works for us. Future work will need to be done to either use an alternative template engine, or evolve our templating syntax to use the new syntax. Thanks to @krnowak for discovering this regression. Fixes #4615 Signed-off-by: Christopher Maier <cmaier@chef.io>
Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
@thesentinels approve |
🤘 I am testing your branch against master before merging it. We do this to ensure that the master branch is never failing tests. |
Travis CI has started testing this PR. |
💖 Travis CI reports this PR passed. It always makes me feel nice when humans approve of one anothers work. I'm merging this PR now. I just want you and the contributor to answer me one question: |
Recent versions of
handlebars
change array index access syntax, breaking that feature in Habitat templates. This pins to the last known-good version ofhandlebars
.Read commits for further details.
Fixes #4615