seal-io / walrus

Walrus is an open-source application management platform based on IaC tools including OpenTofu, Terraform and others. It helps platform engineers build golden paths for developers and empowers developers with self-service capabilities.
Apache License 2.0
428 stars 42 forks source link

Error getting keys when deploy cloud provider resources: unsupported resource type #760

Closed Finenyaco closed 1 year ago

Finenyaco commented 1 year ago

Version: main
UI: dev-6168160 Commit ID: 2123c63e14cb8461eb00fc5a594999b5bc82483d Env: Ubuntu 22.04 amd64, aws EC2

Test Steps:

  1. Deloy some cloud provider resource, such as github.com/Finenyaco/modules_test//alicloud/alicloud-disk.
  2. View appication details.

Test Result:

  1. Some error logs are printed out.
    2023-06-12T11:15:17.999Z    E   api.application-resource    error getting keys: unsupported resource type
    github.com/seal-io/seal/pkg/apis/applicationresource.getCollection
    github.com/seal-io/seal/pkg/apis/applicationresource/handler.go:306
    github.com/seal-io/seal/pkg/apis/applicationresource.Handler.CollectionGet
    github.com/seal-io/seal/pkg/apis/applicationresource/handler.go:93
    reflect.Value.call
    reflect/value.go:584
    reflect.Value.Call
    reflect/value.go:368
    github.com/seal-io/seal/pkg/apis/runtime.RouteResource.func1
    github.com/seal-io/seal/pkg/apis/runtime/routes.go:520
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.RequestShaping.func3
    github.com/seal-io/seal/pkg/apis/runtime/middleware_flowcontrol.go:167
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/auths.Account.Filter
    github.com/seal-io/seal/pkg/auths/account.go:61
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.RequestThrottling.func2
    github.com/seal-io/seal/pkg/apis/runtime/middleware_flowcontrol.go:86
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.I18n.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_i18n.go:28
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.Erroring.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_error.go:22
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.Recovering.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_recovery.go:44
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/seal-io/seal/pkg/apis/runtime.Logging.func2
    github.com/seal-io/seal/pkg/apis/runtime/middleware_route.go:80
    github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
    github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
    github.com/gin-gonic/gin@v1.9.0/gin.go:620
    github.com/gin-gonic/gin.(*Engine).ServeHTTP
    github.com/gin-gonic/gin@v1.9.0/gin.go:576
    net/http.serverHandler.ServeHTTP
    net/http/server.go:2947
    net/http.initALPNRequest.ServeHTTP
    net/http/server.go:3556
    net/http.(*http2serverConn).runHandler
    net/http/h2_bundle.go:5910

Expected Result: No error returned.

Finenyaco commented 1 year ago

Version: main
UI: dev-4f7188d Commit ID: 777698ff07c9e4c86e851cdbc4db7f5d1b9186d5 Env: Ubuntu 22.04 amd64, aws EC2

Test Steps:

  1. Deploy an aws instance.
  2. View instance logs and connect to terminal.

Test Result:

  1. Cannot view logs and connect to terminal.

    image image
  2. Viewing seal logs, it is failed to get keys.

    image
2023-06-14T05:31:33.432Z    E   api.service-resource    error getting keys: unsupported resource type
github.com/seal-io/seal/pkg/apis/serviceresource.getCollection
    github.com/seal-io/seal/pkg/apis/serviceresource/handler.go:305
github.com/seal-io/seal/pkg/apis/serviceresource.Handler.CollectionGet
    github.com/seal-io/seal/pkg/apis/serviceresource/handler.go:92
reflect.Value.call
    reflect/value.go:584
reflect.Value.Call
    reflect/value.go:368
github.com/seal-io/seal/pkg/apis/runtime.RouteResource.func1
    github.com/seal-io/seal/pkg/apis/runtime/routes.go:520
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.RequestShaping.func3
    github.com/seal-io/seal/pkg/apis/runtime/middleware_flowcontrol.go:167
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/auths.Account.Filter
    github.com/seal-io/seal/pkg/auths/account.go:61
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.RequestThrottling.func2
    github.com/seal-io/seal/pkg/apis/runtime/middleware_flowcontrol.go:86
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.I18n.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_i18n.go:28
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.Erroring.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_error.go:22
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.Recovering.func1
    github.com/seal-io/seal/pkg/apis/runtime/middleware_recovery.go:44
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/seal-io/seal/pkg/apis/runtime.Logging.func2
    github.com/seal-io/seal/pkg/apis/runtime/middleware_route.go:80
github.com/gin-gonic/gin.(*Context).Next
    github.com/gin-gonic/gin@v1.9.0/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
    github.com/gin-gonic/gin@v1.9.0/gin.go:620
github.com/gin-gonic/gin.(*Engine).ServeHTTP
    github.com/gin-gonic/gin@v1.9.0/gin.go:576
net/http.serverHandler.ServeHTTP
    net/http/server.go:2947
net/http.initALPNRequest.ServeHTTP
    net/http/server.go:3556
net/http.(*http2serverConn).runHandler
    net/http/h2_bundle.go:5910
Finenyaco commented 1 year ago

Version: main
UI: dev-be7ce50 Commit ID: 7f5bd970d8c6701785c7af04c6669c5f53b03e42 Env: Ubuntu 22.04 amd64, aws EC2 Test Result:

  1. Check log. There is a ui display issue https://github.com/seal-io/seal/issues/817.

    image
  2. Check terminal.

    image