-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Labels
area/devworkspaceImprovent or additions to the DevWorkspaces CRDImprovent or additions to the DevWorkspaces CRD
Description
Describe the bug
Passing nil
for parentFlattenedContent
or pluginFlattenedContent
in overriding.MergeDevWorkspaceTemplateSpec
causes a panic due to nil pointer.
Stacktrace:
E0111 12:31:43.096684 57531 runtime.go:78] Observed a panic: "value method github.com/devfile/api/pkg/apis/workspaces/v1alpha2.DevWorkspaceTemplateSpecContent.GetToplevelLists called using nil *DevWorkspaceTemplateSpecContent pointer" (value method github.com/devfile/api/pkg/apis/workspaces/v1alpha2.DevWorkspaceTemplateSpecContent.GetToplevelLists called using nil *DevWorkspaceTemplateSpecContent pointer)
goroutine 679 [running]:
panic(0x1d8d280, 0xc000908b30)
/usr/lib/golang/src/runtime/panic.go:975 +0x41b
github.com/devfile/api/pkg/apis/workspaces/v1alpha2.(*DevWorkspaceTemplateSpecContent).GetToplevelLists(0x0, 0x0)
<autogenerated>:1 +0xde
github.com/devfile/api/pkg/utils/overriding.checkKeys(0x20187f0, 0xc000a4b9c0, 0x2, 0x2, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/keys.go:26 +0x175
github.com/devfile/api/pkg/utils/overriding.ensureNoConflictWithParent(0xc00037cf50, 0x0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/merging.go:156 +0xf3
github.com/devfile/api/pkg/utils/overriding.MergeDevWorkspaceTemplateSpec(0xc00037cf50, 0x0, 0xc000492d08, 0x1, 0x1, 0x0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/merging.go:32 +0x28f
Expected behavior
Nil check should be done, and that component should be skipped
Metadata
Metadata
Assignees
Labels
area/devworkspaceImprovent or additions to the DevWorkspaces CRDImprovent or additions to the DevWorkspaces CRD