Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Debugging parse errors in workloads is complicated #71

Description

@markdryan

If there's a parse error in a workload the create command fails with an error that looks something like this.

$ ccloudvm create --debug xenial
Error: Error applying template to user-data: Error parsing workload: Unable to unmarshal userdata: yaml: line 45: found unexpected end of stream

This information, including the line number, is useless as it doesn't indicate which workload is causing the problem (if you're using inheritance there may be more than one) and as the workload is pre-processed before handing it to the yaml parser, the line number 45 is meaningless.

The only way to really fix this is ccloudvm to return better error information including some sort of context along with the error. Something like

 - {{endTaskCheck .}}
'   <-- PARSE ERROR
{{range .Mounts}}

would be great if we could do it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions