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

Regression: ddev list, with appdir deleted, gives a panic #521

Closed
rfay opened this issue Oct 24, 2017 · 0 comments
Closed

Regression: ddev list, with appdir deleted, gives a panic #521

rfay opened this issue Oct 24, 2017 · 0 comments
Assignees
Milestone

Comments

@rfay
Copy link
Member

rfay commented Oct 24, 2017

What happened (or feature request):

In #444 we made it possible to do a ddev list even if an app's directory was removed. Unfortunately there's been a regression and we're worse than we were before: Now we get a panic in this case.

$ ddev list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1428df7]

goroutine 1 [running]:
github.com/drud/ddev/pkg/plugins/platform.GetApps(0x0)
	/go/src/github.com/drud/ddev/pkg/plugins/platform/utils.go:55 +0x3f7
github.com/drud/ddev/cmd/ddev/cmd.glob..func11(0x19a90a0, 0x19d57e0, 0x0, 0x0)
	/go/src/github.com/drud/ddev/cmd/ddev/cmd/list.go:17 +0x34
github.com/drud/ddev/vendor/github.com/spf13/cobra.(*Command).execute(0x19a90a0, 0x19d57e0, 0x0, 0x0, 0x19a90a0, 0x19d57e0)
	/go/src/github.com/drud/ddev/vendor/github.com/spf13/cobra/command.go:654 +0x2a2
github.com/drud/ddev/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x19a9be0, 0xc42001c0b8, 0x0, 0xc42013df48)
	/go/src/github.com/drud/ddev/vendor/github.com/spf13/cobra/command.go:729 +0x2fe
github.com/drud/ddev/vendor/github.com/spf13/cobra.(*Command).Execute(0x19a9be0, 0x0, 0x0)
	/go/src/github.com/drud/ddev/vendor/github.com/spf13/cobra/command.go:688 +0x2b
github.com/drud/ddev/cmd/ddev/cmd.Execute()
	/go/src/github.com/drud/ddev/cmd/ddev/cmd/root.go:105 +0x3b
main.main()
	/go/src/github.com/drud/ddev/cmd/ddev/main.go:6 +0x20

What you expected to happen:

How to reproduce this:

With current master, v0.9.3-3-g4ca6d38a (g4ca6d38a),

  1. start an app,
  2. remove its directory,
  3. do a ddev list

Version: Please include the output of ddev version, docker version and the project's .ddev/config.yaml.

n$ ddev version
cli:       	v0.9.3-3-g4ca6d38a
web:       	drud/nginx-php-fpm-local:v0.8.0
db:        	drud/mysql-local-57:v0.6.2
dba:       	drud/phpmyadmin:v0.2.0
router:    	drud/ddev-router:v0.4.3
commit:    	v0.9.3-3-g4ca6d38a
build info:	Built Tue Oct 24 15:01:34 MDT 2017 rfay@Randy-Air.local drud/golang-build-container:v0.5.0

Anything else do we need to know:

Related source links or issues:

#444 was the issue where we solved this, and v0.9.3 doesn't have any trouble with it, so the regression is likely introduced in #495, the command-line config changes.

We also have a pending, nearly-done and highly-related PR in #460 which solves the problem for ddev rm and others.

I guess we probably need a test for this case if we're going to support it.

It looks to me like the panic is in platform.GetApps,

https://github.com/drud/ddev/blob/4ca6d38aa2158595160231fd3ac7aeec2501f3bc/pkg/plugins/platform/utils.go#L48-L56

When we try to assign to siteStruct.AppConfig.Name we get the panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants