devtron-labs / devtron

Tool integration platform for Kubernetes
https://devtron.ai
Apache License 2.0
4.26k stars 473 forks source link

Bug: Getting error while cloning the Devtron application #5197

Closed ajaydevtron closed 2 months ago

ajaydevtron commented 3 months ago

πŸ“œ Description

When attempt to clone Devtron application , getting pg: no rows in result set error

Error logs


 {"level":"error","ts":1716971615.8038082,"caller":"appClone/AppCloneService.go:223","msg":"error in cloning  env override","err":"pg: no rows in result set","stacktrace":"github.com/devtron-labs/devtron/pkg/appClone.(*AppCloneServiceImpl).CloneApp\n\t/go/src/github.com/devtron-labs/devtron/pkg/appClone/AppCloneService.go:223\ngithub.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure.(*PipelineConfigRestHandlerImpl).CreateApp\n\t/go/src/github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go:408\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux.traceware.ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux/mux.go:179\ngithub.com/devtron-labs/common-lib/middlewares.Recovery.func1\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/common-lib/middlewares/recovery.go:26\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-labs/devtron/internal/middleware.PrometheusMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/internal/middleware/instrument.go:142\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-l

 {"level":"error","ts":1716971615.8038707,"caller":"configure/PipelineConfigRestHandler.go:411","msg":"service err, CreateApp","err":"pg: no rows in result set","CreateApp":{"appName":"test-scan-vehicle","description":"","material":null,"teamId":5,"templateId":6072,"appType":0},"stacktrace":"github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure.(*PipelineConfigRestHandlerImpl).CreateApp\n\t/go/src/github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure/PipelineConfigRestHandler.go:411\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux.traceware.ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux/mux.go:179\ngithub.com/devtron-labs/common-lib/middlewares.Recovery.func1\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/common-lib/middlewares/recovery.go:26\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-labs/devtron/internal/middleware.PrometheusMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/internal/middleware/instrument.go:142\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/devtron-labs/devtron/api/util.LoggingMiddlewareImpl.LoggingMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/api/util/logger.go:68\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/gorilla/mux/mux.go:210\ngithub.com/devtron-labs/authenticator/middleware.Authorizer.func1.1\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/authenticator/middleware/AuthMiddleware.go:92\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2936\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1995"}

Affected areas

App creation

Additional affected areas

CD

Prod/Non-prod environments?

Prod

Is User unblocked?

Yes

How was the user un-blocked?

None

Impact on Enterprise

Client is not able to clone the application

πŸ‘Ÿ Steps to replicate the Issue

NA

πŸ‘ Expected behavior

It should clone the application

πŸ‘Ž Actual Behavior

Currently it is not able to clone the app

☸ Kubernetes version

1.25

Cloud provider

AWS

🌍 Browser

Chrome

βœ… Proposed Solution

No response

πŸ‘€ Have you spent some time to check if this issue has been raised before?

🏒 Have you read the Code of Conduct?

AB#9869

github-actions[bot] commented 3 months ago

Final Score: 160