Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Duffle should tell you where it's output is coming from #819

Open
youreddy opened this issue Aug 3, 2019 · 0 comments
Open

Duffle should tell you where it's output is coming from #819

youreddy opened this issue Aug 3, 2019 · 0 comments
Milestone

Comments

@youreddy
Copy link
Contributor

youreddy commented Aug 3, 2019

I was installing a bundle using duffle and got a stack trace that would have been much quicker to debug had it been obvious that the error was coming from the container and not the runtime itself.

I initially assumed that the panic was happening in duffle since it's written in go and vendors the yaml parsing library that throws this error. It turns out that it was actually my bundle's run tool panicking which was using the same library (and coincidentally failing because of cnabio/cnab-go#86).

I think duffle should print some helpful logging statements and tell users where it's output is coming from to avoid situations like this in the future.

$ duffle install myBundle -d docker bundle.json --bundle-is-file -p params.json
Executing install action...
panic: attempted to parse unknown event: none [recovered]
	panic: attempted to parse unknown event: none

goroutine 1 [running]:
github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml%2ev2.handleErr(0xc00003b860)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml.v2/yaml.go:249 +0x9a
panic(0x5ce880, 0xc000040a50)
	/usr/local/Cellar/go/1.11.4/libexec/src/runtime/panic.go:513 +0x1b9
github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml%2ev2.(*parser).parse(0xc0000d2000, 0x626728)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml.v2/decode.go:158 +0x1af
github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml%2ev2.(*Decoder).Decode(0xc0000409e0, 0x5c4560, 0xc0000409d0, 0x0, 0x0)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/mikefarah/yaml.v2/yaml.go:122 +0xe3
main.readProperty.func1(0xc0000409e0, 0xc0000409e0, 0x600)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/yq.go:262 +0xa8
main.readStream(0x7fffaf5d9ed0, 0x1b, 0xc00004a400, 0x0, 0x0)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/yq.go:691 +0x274
main.readProperty(0xc000092a00, 0xc000040970, 0x1, 0x1, 0x0, 0x0)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/yq.go:260 +0x172
github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra%2ev0.(*Command).execute(0xc000092a00, 0xc000040910, 0x1, 0x1, 0xc000092a00, 0xc000040910)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra.v0/command.go:762 +0x473
github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra%2ev0.(*Command).ExecuteC(0xc000092780, 0xc000093180, 0xc000093400, 0xc000093680)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra.v0/command.go:852 +0x2fd
github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra%2ev0.(*Command).Execute(0xc000092780, 0xc00003bf88, 0x0)
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/vendor/gopkg.in/spf13/cobra.v0/command.go:800 +0x2b
main.main()
	/Users/mikefarah/dev/go/src/github.com/mikefarah/yq/yq.go:34 +0x27
Error: Install step failed: error: [failed to parse "vars": invalid character 'm' looking for beginning of value failed to parse "state": invalid character 'm' looking for beginning of value]

@jeremyrickard jeremyrickard added this to the Duffle 1.0 milestone Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants