Skip to content

[UX] Improve error message during generation of configuration #1677

Description

@moretea

If one makes a typo in a config file, the supervisor prints out a Rust Result directly.

Maybe the supervisor should just abort if the generation of configuration files fails; the current behaviour might lead to starting mis-configured services.

How to reproduce

  1. Create an empty plan.sh and a config/some_file
  2. Fill config/some_file with:
aaa{{ref}aaa

This will generate an error similar to:

php-redis.default(SR): Failed to write service configuration: hab-sup(SC)[src/manager/service/config.rs:161:27]: TemplateError(TemplateError { reason: InvalidSyntax, template_name: Some("phpfpm.conf"), line_no: Some(6), column_no: Some(32) })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Focus :Plan BuildFocus: StudioRelated to the Habitat Studio (core/hab-studio) componentFocus:SupervisorRelated to the Habitat Supervisor (core/hab-sup) component

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions