Describe the bug
The server is crashing in the process of forwarding the deployment event.
Logs or Screenshots
Logs
gitploy-5cb78f8c9c-8g8t4 gitploy panic: runtime error: invalid memory address or nil pointer dereference
gitploy-5cb78f8c9c-8g8t4 gitploy [signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0xdd3cec]
gitploy-5cb78f8c9c-8g8t4 gitploy
gitploy-5cb78f8c9c-8g8t4 gitploy goroutine 492 [running]:
gitploy-5cb78f8c9c-8g8t4 gitploy github.com/gitploy-io/gitploy/internal/server/api/v1/stream.(*Stream).GetEvents.func1(0xc000396a00)
gitploy-5cb78f8c9c-8g8t4 gitploy /server/internal/server/api/v1/stream/events.go:42 +0x70c
gitploy-5cb78f8c9c-8g8t4 gitploy reflect.Value.call({0x1135da0, 0xc00018b950, 0x13}, {0x1330b06, 0x4}, {0xc00024c960, 0x1, 0x1})
gitploy-5cb78f8c9c-8g8t4 gitploy /usr/local/go/src/reflect/value.go:556 +0x845
gitploy-5cb78f8c9c-8g8t4 gitploy reflect.Value.Call({0x1135da0, 0xc00018b950, 0xc000545100}, {0xc00024c960, 0x1, 0x1})
gitploy-5cb78f8c9c-8g8t4 gitploy /usr/local/go/src/reflect/value.go:339 +0xc5
gitploy-5cb78f8c9c-8g8t4 gitploy github.com/asaskevich/EventBus.(*EventBus).doPublish(0xc000107dc8, 0xc00018b980, {0x50d125, 0xc00047b800}, {0xc000545100, 0xc0000b27e0, 0x0})
gitploy-5cb78f8c9c-8g8t4 gitploy /go/pkg/mod/github.com/asaskevich/!event!bus@v0.0.0-20200907212545-49d423059eef/event_bus.go:160 +0x53
gitploy-5cb78f8c9c-8g8t4 gitploy github.com/asaskevich/EventBus.(*EventBus).doPublishAsync(0xc000058701, 0x448605, {0x133a78f, 0xa8c54e}, {0xc000545100, 0x15021f8, 0xc00018a870})
gitploy-5cb78f8c9c-8g8t4 gitploy /go/pkg/mod/github.com/asaskevich/!event!bus@v0.0.0-20200907212545-49d423059eef/event_bus.go:168 +0xa5
gitploy-5cb78f8c9c-8g8t4 gitploy created by github.com/asaskevich/EventBus.(*EventBus).Publish
gitploy-5cb78f8c9c-8g8t4 gitploy /go/pkg/mod/github.com/asaskevich/!event!bus@v0.0.0-20200907212545-49d423059eef/event_bus.go:152 +0x5a5
Additional context
I think the FindDeploymentStatusByID doesn't return an error even though it gets an error from the database.
Describe the bug
The server is crashing in the process of forwarding the deployment event.
Logs or Screenshots
Logs
Additional context
I think the
FindDeploymentStatusByIDdoesn't return an error even though it gets an error from the database.