Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
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

Description

@noahingh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions