Open dpengftw opened 3 months ago
My guess is that the API calls are reaching a rate limit, therefore the code is running into nil pointer.
Solution would be to use a backoff function to call AWS api, if the first call fails.
`> ecsgo ? Select a task: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102fdafac]
goroutine 18 [running]: github.com/tedsmitt/ecsgo/internal.getPlatformFamily({0x103619a00, 0x1400011a100}, {0x1034115e0?, 0x140004ded80?}, 0x140004c8900) github.com/tedsmitt/ecsgo/internal/internal.go:87 +0x8c github.com/tedsmitt/ecsgo/internal.(App).getContainerOS(0x140004016b0) github.com/tedsmitt/ecsgo/internal/app.go:426 +0xa0 github.com/tedsmitt/ecsgo/internal.(App).getTask(0x140004016b0) github.com/tedsmitt/ecsgo/internal/app.go:366 +0xb8c github.com/tedsmitt/ecsgo/internal.(App).Start.func1() github.com/tedsmitt/ecsgo/internal/app.go:70 +0x130 created by github.com/tedsmitt/ecsgo/internal.(App).Start github.com/tedsmitt/ecsgo/internal/app.go:60 +0x84`
Forgot to mention that this is with ECS with EC2 backend.
My guess is that the API calls are reaching a rate limit, therefore the code is running into nil pointer.
Solution would be to use a backoff function to call AWS api, if the first call fails.
`> ecsgo ? Select a task: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102fdafac]
goroutine 18 [running]: github.com/tedsmitt/ecsgo/internal.getPlatformFamily({0x103619a00, 0x1400011a100}, {0x1034115e0?, 0x140004ded80?}, 0x140004c8900) github.com/tedsmitt/ecsgo/internal/internal.go:87 +0x8c github.com/tedsmitt/ecsgo/internal.(App).getContainerOS(0x140004016b0) github.com/tedsmitt/ecsgo/internal/app.go:426 +0xa0 github.com/tedsmitt/ecsgo/internal.(App).getTask(0x140004016b0) github.com/tedsmitt/ecsgo/internal/app.go:366 +0xb8c github.com/tedsmitt/ecsgo/internal.(App).Start.func1() github.com/tedsmitt/ecsgo/internal/app.go:70 +0x130 created by github.com/tedsmitt/ecsgo/internal.(App).Start github.com/tedsmitt/ecsgo/internal/app.go:60 +0x84`