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

hab plan render should provide better error messages when input template has errors #6279

Closed
qubitrenegade opened this issue Mar 9, 2019 · 4 comments
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature

Comments

@qubitrenegade
Copy link
Contributor

When input template is invalid, the resulting error message is a bit ugly.

$ cargo run -p hab plan render ./test/fixtures/render/error/consul_config.json   --default-toml ./test/fixtures/render/consul/default.toml   --user-toml ./test/fixtures/render/consul/user.toml   --mock-data ./test/fixtures/render/consul/override.json   --render-dir result --print --no-render
    Finished dev [unoptimized + debuginfo] target(s) in 0.24s
     Running `target/debug/hab plan render ./test/fixtures/render/error/consul_config.json --default-toml ./test/fixtures/render/consul/default.toml --user-toml ./test/fixtures/render/consul/user.toml --mock-data ./test/fixtures/render/consul/override.json --render-dir result --print --no-render`
» Rendering: ./test/fixtures/render/error/consul_config.json into: result as: consul_config.json

» Importing default.toml: ./test/fixtures/render/consul/default.toml
» Importing user.toml: ./test/fixtures/render/consul/user.toml
» Importing override file: ./test/fixtures/render/consul/override.json
thread 'main' panicked at 'Could not register template content: TemplateError { reason: InvalidSyntax, template_name: Some("{\n  \"datacenter\": \"{{cfg.server.datacenter\",\n  \"data_dir\": \"{{cfg.server.data-dir}}\",\n  \"log_level\": \"{{cfg.server.loglevel}}\",\n  \"bind_addr\": \"{{sys.ip}}\",\n  \"client_addr\": \"{{sys.ip}}\",\n  \"server\": {{cfg.server.mode}},\n  \"retry_join\": [\n  {{#eachAlive svc.members as |member| ~}}\n    \"{{member.sys.ip}}\" {{~#unless @last}},{{/unless}}\n  {{/eachAlive ~}}\n  ],\n  \"ports\": {\n    \"dns\": {{cfg.ports.dns}},\n    \"http\": {{cfg.ports.http}},\n    \"https\": {{cfg.ports.https}},\n    \"serf_lan\": {{cfg.ports.serf_lan}},\n    \"serf_wan\": {{cfg.ports.serf_wan}},\n    \"server\": {{cfg.ports.server}}\n  }\n}\n"), line_no: Some(3), column_no: Some(17) }', src/libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
@stale
Copy link

stale bot commented Apr 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Apr 2, 2020
@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component and removed A-supervisor labels Jul 24, 2020
@stale stale bot removed the Stale label Jul 24, 2020
@christophermaier christophermaier added Type: Feature Issues that describe a new desired feature and removed C-feature labels Jul 24, 2020
@rahulgoel1 rahulgoel1 removed the L-rust label Jul 23, 2021
@stale
Copy link

stale bot commented Oct 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Oct 1, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.

1 similar comment
@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.

@stale stale bot closed this as completed May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature
Projects
None yet
Development

No branches or pull requests

4 participants