komodorio / helm-dashboard

The missing UI for Helm - visualize your releases
Apache License 2.0
4.91k stars 298 forks source link

failed to get k8s resulting object #492

Open wirwolf opened 10 months ago

wirwolf commented 10 months ago

Description

Hey team. I deploy this chart for applying migration in my project. And after sometimes when I run helm-dashboard I see this error in trace

WARN[0201] Failed to get resource info for ***********-mysql-migration-34562855 stage/***********-mysql-migration-34562855: failed to get k8s object, cause: failed to get k8s resulting object, cause: jobs.batch "***********-mysql-migration-34562855" not found
 at github.com/komodorio/helm-dashboard/pkg/dashboard/objects.(*K8s).GetResource()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/objects/kubectl.go:143
 at github.com/komodorio/helm-dashboard/pkg/dashboard/objects.(*K8s).GetResourceInfo()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/objects/kubectl.go:150
 at github.com/komodorio/helm-dashboard/pkg/dashboard/handlers.(*HelmHandler).Resources()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/handlers/helmHandlers.go:163
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/komodorio/helm-dashboard/pkg/dashboard.errorHandler()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/api.go:27
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/komodorio/helm-dashboard/pkg/dashboard.noCache()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/api.go:23
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/komodorio/helm-dashboard/pkg/dashboard.contextSetter.func1()
        /home/runner/work/helm-dashboard/helm-dashboard/pkg/dashboard/api.go:59
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/gin-gonic/gin.LoggerWithConfig.func1()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240
 at github.com/gin-gonic/gin.(*Context).Next()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 at github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
 at github.com/gin-gonic/gin.(*Engine).ServeHTTP()
        /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
 at net/http.serverHandler.ServeHTTP()
        /opt/hostedtoolcache/go/1.20.5/x64/src/net/http/server.go:2936
 at net/http.(*conn).serve()
        /opt/hostedtoolcache/go/1.20.5/x64/src/net/http/server.go:1995
 at runtime.goexit()
        /opt/hostedtoolcache/go/1.20.5/x64/src/runtime/asm_amd64.s:1598

Maybe reason - job deleted after ttlSecondsAfterFinished

Screenshots

No response

Additional information

No response

undera commented 10 months ago

So this is by design - the resource is missing and log message explains that. Probably just the message could be less "scary".