@@ -22,6 +22,7 @@ import (
22
22
"strings"
23
23
"time"
24
24
25
+ devfilevalidation "github.com/devfile/api/v2/pkg/validation"
25
26
controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1"
26
27
"github.com/devfile/devworkspace-operator/controllers/workspace/metrics"
27
28
"github.com/devfile/devworkspace-operator/pkg/common"
@@ -252,14 +253,13 @@ func (r *DevWorkspaceReconciler) Reconcile(ctx context.Context, req ctrl.Request
252
253
reconcileStatus .setConditionTrue (conditions .DevWorkspaceResolved , "Resolved plugins and parents from DevWorkspace" )
253
254
254
255
// 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
+ }
263
263
264
264
storageProvisioner , err := storage .GetProvisioner (workspace )
265
265
if err != nil {
0 commit comments