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

Before Stack is Created - stack output command results in Exception Crash #2792

Closed
jestrjk opened this issue May 31, 2019 · 1 comment · Fixed by #2794
Closed

Before Stack is Created - stack output command results in Exception Crash #2792

jestrjk opened this issue May 31, 2019 · 1 comment · Fixed by #2794
Assignees
Labels
area/cli UX of using the CLI (args, output, logs) kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@jestrjk
Copy link

jestrjk commented May 31, 2019

I have a project structure where A and B are projects. Each has its own index.ts stack definition.

/A
/A/B

Before updating the /A/B stack, executing from /A:
pulumi --cwd ./B stack output --json returns the Exception reported below

Once I pulumi update the /A/B stack, the stack output --json call works correctly and returns the relevant JSON.

Minor bug, maybe just some more informational error handling needed?

Pulumi Version:   v0.17.14
Go Version:       go1.12
Go Compiler:      gc
Architecture:     amd64
Operating System: linux
Panic:            runtime error: invalid memory address or nil pointer dereference

goroutine 1 [running]:
runtime/debug.Stack(0xc0007dda60, 0x1174aa0, 0x21da410)
        /home/travis/.gimme/versions/go1.12.linux.amd64/src/runtime/debug/stack.go:24 +0x9d
main.panicHandler()
        /home/travis/gopath/src/github.com/pulumi/pulumi/main.go:30 +0x6e
panic(0x1174aa0, 0x21da410)
        /home/travis/.gimme/versions/go1.12.linux.amd64/src/runtime/panic.go:522 +0x1b5
github.com/pulumi/pulumi/cmd.getStackOutputs(0xc000229e60, 0x1597900, 0xc00003c0a0, 0xc000229e60, 0x0)
        /home/travis/gopath/src/github.com/pulumi/pulumi/cmd/stack_output.go:111 +0x60
github.com/pulumi/pulumi/cmd.newStackOutputCmd.func1(0xc0001aca00, 0xc0001fe6c0, 0x0, 0x3, 0x10, 0x10)
        /home/travis/gopath/src/github.com/pulumi/pulumi/cmd/stack_output.go:58 +0x161
github.com/pulumi/pulumi/pkg/util/cmdutil.RunFunc.func1(0xc0001aca00, 0xc0001fe6c0, 0x0, 0x3, 0x0, 0x0)
        /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/util/cmdutil/exit.go:95 +0x51
github.com/pulumi/pulumi/pkg/util/cmdutil.RunResultFunc.func1(0xc0001aca00, 0xc0001fe6c0, 0x0, 0x3)
        /home/travis/gopath/src/github.com/pulumi/pulumi/pkg/util/cmdutil/exit.go:111 +0x6b
github.com/pulumi/pulumi/vendor/github.com/spf13/cobra.(*Command).execute(0xc0001aca00, 0xc0001aa000, 0x3, 0x4, 0xc0001aca00, 0xc0001aa000)
        /home/travis/gopath/src/github.com/pulumi/pulumi/vendor/github.com/spf13/cobra/command.go:766 +0x2ae
github.com/pulumi/pulumi/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000138280, 0x137b0d0, 0x0, 0x0)
        /home/travis/gopath/src/github.com/pulumi/pulumi/vendor/github.com/spf13/cobra/command.go:852 +0x2c0
github.com/pulumi/pulumi/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        /home/travis/gopath/src/github.com/pulumi/pulumi/vendor/github.com/spf13/cobra/command.go:800
main.main()
        /home/travis/gopath/src/github.com/pulumi/pulumi/main.go:49 +0x4c
@lukehoban lukehoban added kind/bug Some behavior is incorrect or out of spec area/cli UX of using the CLI (args, output, logs) labels May 31, 2019
@ellismg
Copy link
Contributor

ellismg commented May 31, 2019

Minor bug, maybe just some more informational error handling needed?

Indeed! Thanks for the report, I submitted a fix.

@ellismg ellismg added this to the 0.24 milestone Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli UX of using the CLI (args, output, logs) kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants