apache / incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
https://devlake.apache.org/
Apache License 2.0
2.6k stars 523 forks source link

[Bug][PagerDuty] search-remote-scope response 500 error #7421

Closed adrienzieba closed 5 months ago

adrienzieba commented 6 months ago

Search before asking

What happened

When trying to search a service for PagerDuty, I receive a panic

2024/05/02 19:09:17 [Recovery] 2024/05/02 - 19:09:17 panic recovered:
GET /plugins/pagerduty/connections/1/search-remote-scopes?search=d&page=1&pageSize=20 HTTP/1.1
...
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:260 (0x99895c)
/usr/local/go/src/runtime/signal_unix.go:837 (0x99892c)
/app/plugins/pagerduty/api/remote_api.go:88 (0x7f5b97aff181)
/app/plugins/pagerduty/api/remote_api.go:125 (0x7f5b97aff424)
/app/helpers/pluginhelper/api/ds_remote_api_scope_search_helper.go:65 (0x7f5b97b0b56b)
/app/plugins/pagerduty/api/remote_api.go:162 (0x7f5b97aff4ef)
/app/server/api/router.go:141 (0x15d58ce)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x15d3702)
/app/server/api/middlewares.go:95 (0x15d36e6)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x15d3b9a)
/app/server/api/middlewares.go:117 (0x15d3a42)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x1230a01)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0x12309ec)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x122fb26)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0x122fb09)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x122e9aa)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0x122e631)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0x122e15c)
/usr/local/go/src/net/http/server.go:2936 (0xccb095)
/usr/local/go/src/net/http/server.go:1995 (0xcc6231)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x9b5ac0)

What do you expect to happen

The search for a PagerDuty Data Scope return results

How to reproduce

Create a connection for PagerDuty and try to search for a Data Scope.

From the log this GET is done

GET /plugins/pagerduty/connections/1/search-remote-scopes?search=d&page=1&pageSize=20

Anything else

I also notice that the pagerDuty Task is not working for services already present in projects. I get the following error

error preparing task data for pagerduty (400) Wraps: (2) not enough info for Pagerduty execution (400) Error types: (1) *hintdetail.withDetail (2) *errors.errorString

Version

v1.0.0-beta6

Are you willing to submit PR?

Code of Conduct

Puvendhan commented 5 months ago

Hi team,

I am also getting the same error, can someone look at this?

Puvendhan commented 5 months ago

Hi , I upgraded to version version v0.21.0 (https://github.com/apache/incubator-devlake/releases/tag/v0.21.0). It's started working. I don't see the anymore errors now.

klesh commented 5 months ago

@Puvendhan Thanks for sharing, nice to know

adrienzieba commented 5 months ago

@klesh Can we re open this issue please? The problem I experience is with v1.0.0-beta6. Going to v0.21.0 is a downgrade in my case.

klesh commented 5 months ago

@adrienzieba Sorry for the mistake, will look into the problem soon.

yoramshai commented 5 months ago

@klesh I'm using v1.0.0-beta9 and also getting the same error error preparing task data for pagerduty (400) Wraps: (2) not enough info for Pagerduty execution (400) Error types: (1) *hintdetail.withDetail (2) *errors.errorString

How can I bypass this ?