devtron-labs / devtron

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

Bug: Issue in EA Mode Cluster - error: pg: multiple rows in result set. #5547

Open badal773 opened 1 month ago

badal773 commented 1 month ago

📜 Description

Upon installing a fresh EA mode cluster and attempting to deploy Helm apps, several issues have been identified:

  1. Error on Configure Page:

        After installing a fresh EA mode cluster and deploying Helm apps, navigating to the configure page results in the following error: pg: multiple rows in result set.

👟 Reproduction steps

  1. Install a fresh EA mode cluster.
  2. Attempt to deploy Helm apps.
  3. Navigate to the configure page.

👍 Expected behavior

  1. No pg: multiple rows in result set" errors should be encountered.

  2. Helm apps should be visible without needing to delete the kubelink pod.

    Screenshot 2024-07-24 at 4 33 30 PM
  3. The app details page should have options to delete or check events.

Screenshot 2024-07-24 at 4 22 53 PM

👎 Actual Behavior

  1. Encountering a pg: multiple rows in result set" error in configure page.
 {"level":"error","ts":1721816599.6739595,"caller":"appInfo/AppInfoRestHandler.go:183","msg":"service err, GetAppMetaInfo","err":"pg: multiple rows in result set","stacktrace":"github.com/devtron-labs/devtron/api/restHandler/app/appInfo.AppInfoRestHandlerImpl.GetHelmAppMetaInfo\n\t/go/src/github.com/devtron-labs/devtron/api/restHandler/app/appInfo/AppInfoRestHandler.go:183\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2141\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:44\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2141\ngithub.com/devtron-labs/devtron/internal/middleware.PrometheusMiddleware.func1\n\t/go/src/github.com/devtron-labs/devtron/internal/middleware/instrument.go:141\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2141\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/gorilla/mux/mux.go:210\nmain.(*App).Start.(*App).Start.Authorizer.func1.func2\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/authenticator/middleware/AuthMiddleware.go:91\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2141\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2943\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:2014"}
[Jul 24 2024 15:53:19 GMT+0530] devtron-5748b69f5-vwnw6: {"level":"info","ts":1721816599.674006,"caller":"common/apiError.go:117","msg":"ERROR RES","TYPE":"API-ERROR","RES":500,"ERROR-MSG":[{"code":"000","internalMessage":"[{pg: multiple rows in result set}]","userMessage":"pg: multiple rows in result set"}],"err":null}
Screenshot 2024-07-24 at 3 59 01 PM
  1. Helm apps are not visible until the kubelink pod is deleted.
Screenshot 2024-07-24 at 4 31 48 PM
  1. The app details page lacks options to delete or check events. Screenshot 2024-07-24 at 4 38 43 PM

☸ Kubernetes version

1.28

Cloud provider

aws

🌍 Browser

Chrome

🧱 Your Environment

prod

✅ 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#10211

azure-boards[bot] commented 1 month ago

❌ There was a problem linking to Azure Boards work item(s):

Please check the IDs and try again using the AB# syntax. Learn more

mayank-devtron commented 3 weeks ago

we have only fixed pt1 pg: multiple rows in result set" via https://github.com/devtron-labs/sprint-tasks/issues/671