Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Fix to handle the error in FindDeploymentStatusByID #432

Closed
noahingh opened this issue May 12, 2022 · 0 comments · Fixed by #433
Closed

Fix to handle the error in FindDeploymentStatusByID #432

noahingh opened this issue May 12, 2022 · 0 comments · Fixed by #433
Labels
bug Something isn't working
Milestone

Comments

@noahingh
Copy link
Member

noahingh commented May 12, 2022

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![email protected]/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![email protected]/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![email protected]/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.

@noahingh noahingh added the bug Something isn't working label May 12, 2022
@noahingh noahingh added this to the v0.7 milestone May 12, 2022
@noahingh noahingh linked a pull request May 12, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant