Skip to content

Commit 68eccdc

Browse files
committed
Revert validation workaround 4ae81c3
Signed-off-by: Angel Misevski <[email protected]>
1 parent 37ea809 commit 68eccdc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

controllers/workspace/devworkspace_controller.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"strings"
2323
"time"
2424

25+
devfilevalidation "github.com/devfile/api/v2/pkg/validation"
2526
controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1"
2627
"github.com/devfile/devworkspace-operator/controllers/workspace/metrics"
2728
"github.com/devfile/devworkspace-operator/pkg/common"
@@ -252,14 +253,13 @@ func (r *DevWorkspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request
252253
reconcileStatus.setConditionTrue(conditions.DevWorkspaceResolved, "Resolved plugins and parents from DevWorkspace")
253254

254255
// Verify that the devworkspace components are valid after flattening
255-
// TODO: Disable validation until https://github.com/devfile/api/issues/821 is resolved and pulled into this repo
256-
// components := workspace.Spec.Template.Components
257-
// if components != nil {
258-
// eventErrors := devfilevalidation.ValidateComponents(components)
259-
// if eventErrors != nil {
260-
// return r.failWorkspace(workspace, eventErrors.Error(), metrics.ReasonBadRequest, reqLogger, &reconcileStatus)
261-
// }
262-
// }
256+
components := workspace.Spec.Template.Components
257+
if components != nil {
258+
eventErrors := devfilevalidation.ValidateComponents(components)
259+
if eventErrors != nil {
260+
return r.failWorkspace(workspace, eventErrors.Error(), metrics.ReasonBadRequest, reqLogger, &reconcileStatus)
261+
}
262+
}
263263

264264
storageProvisioner, err := storage.GetProvisioner(workspace)
265265
if err != nil {

0 commit comments

Comments
 (0)