usagereport-plugin
usagereport-plugin copied to clipboard
Panic if org deleted during run
Hi,
We're experiencing a panic running this plugin. It appears to happen if an org is deleted while this report is running (we continuously run the CF smoke tests, so this is quite common for us). The full output is:
panic: interface conversion: interface is nil, not float64
goroutine 1 [running]:
panic(0x6f04e0, 0xc420169e40)
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1
github.com/krujos/usagereport-plugin/apihelper.(*APIHelper).GetOrgMemoryUsage(0xc42000f680, 0xc42024b4c0, 0x36, 0xc42023f9a0, 0x1c, 0xc42024b500, 0x3a, 0xc42024b540, 0x3d, 0x0, ...)
/Users/jkruck/git/go/src/github.com/krujos/usagereport-plugin/apihelper/apihelper.go:132 +0x100
main.(*UsageReportCmd).getOrgDetails(0xc42000f620, 0xc42024b4c0, 0x36, 0xc42023f9a0, 0x1c, 0xc42024b500, 0x3a, 0xc42024b540, 0x3d, 0x0, ...)
/Users/jkruck/git/usagereport-plugin/usagereport.go:127 +0x96
main.(*UsageReportCmd).getOrgs(0xc42000f620, 0x1, 0x1, 0x0, 0x0, 0x746edc)
/Users/jkruck/git/usagereport-plugin/usagereport.go:108 +0x14a
main.(*UsageReportCmd).UsageReportCommand(0xc42000f620, 0xc42000a260, 0x1, 0x1)
/Users/jkruck/git/usagereport-plugin/usagereport.go:83 +0x423
main.(*UsageReportCmd).Run(0xc42000f620, 0x8b5720, 0xc42000f630, 0xc42000a260, 0x1, 0x1)
/Users/jkruck/git/usagereport-plugin/usagereport.go:189 +0xf2
github.com/cloudfoundry/cli/plugin.Start(0x8b00e0, 0xc42000f620)
/Users/jkruck/git/go/src/github.com/cloudfoundry/cli/plugin/plugin_shim.go:30 +0x288
main.main()
/Users/jkruck/git/usagereport-plugin/usagereport.go:194 +0x47