devtron-labs / silver-surfer

Kubernetes objects api-version compatibility checker and provides migration path for K8s objects and prepare it for cluster upgrades
https://devtron.ai/
Apache License 2.0
356 stars 37 forks source link

Fix: FilterValidationResults added condition for empty object #31

Open jatin-jangir opened 1 year ago

jatin-jangir commented 1 year ago
W0627 11:51:45.528640   19467 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+ invalid character ':' after top-level value (404: Not Found)
E0627 11:51:42.688078   19467 memcache.go:196] couldn't get resource list for custom.metrics.k8s.io/v1beta1:
fatal error: runtime: out of memory

goroutine 1 [running]:
runtime.systemstack_switch()
    /usr/local/Cellar/go/1.15.6/libexec/src/runtime/asm_amd64.s:330 fp=0xc001fc47f8 sp=0xc001fc47f0 pc=0x468a60
...
encoding/json.Unmarshal(0xc023ff4000, 0x16a1, 0x1800, 0x146f380, 0xc022d1ee00, 0x1800, 0x16a1)
    /usr/local/Cellar/go/1.15.6/libexec/src/encoding/json/decode.go:107 +0x112 fp=0xc001fc5338 sp=0xc001fc52f0 pc=0x657872
github.com/devtron-labs/silver-surfer/pkg.(*kubeSpec).ValidateJson(0xc001ea1e00, 0xc023fca800, 0x16a1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/pkg/Validator.go:57 +0xf5 fp=0xc001fc5580 sp=0xc001fc5338 pc=0x130fbd5
github.com/devtron-labs/silver-surfer/pkg.(*kubeCheckerImpl).ValidateJson(0xc001fc59e8, 0xc023fca800, 0x16a1, 0x168d6fd, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/pkg/K8sSchemaParser.go:199 +0x13b fp=0xc001fc5798 sp=0xc001fc5580 pc=0x130837b
github.com/devtron-labs/silver-surfer/kubedd.ValidateCluster(0xc00036a9a0, 0xc0003628c0, 0x0, 0x0, 0xc00036a9a0, 0x14f8740, 0x0)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/kubedd/kubedd.go:125 +0x345 fp=0xc001fc5c28 sp=0xc001fc5798 pc=0x1314be5
main.processCluster(0x168d8f9)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/main.go:168 +0xd7 fp=0xc001fc5d40 sp=0xc001fc5c28 pc=0x13f86b7
main.glob..func1(0x215fce0, 0x21a5d38, 0x0, 0x0)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/main.go:108 +0x10c fp=0xc001fc5d88 sp=0xc001fc5d40 pc=0x13f972c
github.com/spf13/cobra.(*Command).execute(0x215fce0, 0xc00003a230, 0x0, 0x0, 0x215fce0, 0xc00003a230)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/vendor/github.com/spf13/cobra/command.go:766 +0x2c2 fp=0xc001fc5e60 sp=0xc001fc5d88 pc=0x12a1822
github.com/spf13/cobra.(*Command).ExecuteC(0x215fce0, 0x4062c5, 0xc00007a058, 0x0)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/vendor/github.com/spf13/cobra/command.go:852 +0x2fe fp=0xc001fc5f38 sp=0xc001fc5e60 pc=0x12a243e
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/vendor/github.com/spf13/cobra/command.go:800
main.Execute()
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/main.go:258 +0x31 fp=0xc001fc5f78 sp=0xc001fc5f38 pc=0x13f9071
main.main()
    /Users/pghildiy/go/src/github.com/devtron-labs/silver-surfer/main.go:286 +0x25 fp=0xc001fc5f88 sp=0xc001fc5f78 pc=0x13f9605
runtime.main()
    /usr/local/Cellar/go/1.15.6/libexec/src/runtime/proc.go:204 +0x209 fp=0xc001fc5fe0 sp=0xc001fc5f88 pc=0x4385c9
runtime.goexit()
    /usr/local/Cellar/go/1.15.6/libexec/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc001fc5fe8 sp=0xc001fc5fe0 pc=0x46a6a1