-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
area/devworkspaceImprovent or additions to the DevWorkspaces CRDImprovent or additions to the DevWorkspaces CRD
Description
Describe the bug
Overriding code panics when attempting to merge plugin overrides, due to this line. When overrides do not contain e.g. projects, keySets has length 1.
Stacktrace:
{"level":"info","ts":1610388875.9142458,"logger":"controllers.DevWorkspace","msg":"Reconciling Workspace","Request.Namespace":"dw","Request.Name":"theia-nodejs","workspace_id":"workspacea86f74107bad4cb7"}
E0111 13:14:36.162339 83107 runtime.go:78] Observed a panic: runtime.boundsError{x:1, y:1, signed:true, code:0x0} (runtime error: index out of range [1] with length 1)
goroutine 675 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x1e925e0, 0xc0008ae320)
/home/amisevsk/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/runtime/runtime.go:74 +0x131
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/runtime/runtime.go:48 +0xd8
panic(0x1e925e0, 0xc0008ae320)
/usr/lib/golang/src/runtime/panic.go:975 +0x41b
github.com/devfile/api/pkg/utils/overriding.ensureOnlyExistingElementsAreOverridden.func1(0x1f79d67, 0x8, 0xc0008f6090, 0x1, 0x1, 0x0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/overriding.go:119 +0x361
github.com/devfile/api/pkg/utils/overriding.checkKeys(0x2029df8, 0xc000c1a158, 0x2, 0x2, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/keys.go:32 +0x53c
github.com/devfile/api/pkg/utils/overriding.ensureOnlyExistingElementsAreOverridden(0xc0009207a0, 0x2237e00, 0xc000ac68a0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/overriding.go:117 +0x12c
github.com/devfile/api/pkg/utils/overriding.OverrideDevWorkspaceTemplateSpec(0xc0009207a0, 0x2237e00, 0xc000ac68a0, 0x0, 0x0, 0x0)
/home/amisevsk/go/pkg/mod/github.com/devfile/api@v0.0.0-20201125082321-aeda60d43619/pkg/utils/overriding/overriding.go:59 +0x110
Metadata
Metadata
Assignees
Labels
area/devworkspaceImprovent or additions to the DevWorkspaces CRDImprovent or additions to the DevWorkspaces CRD