Skip to content

Commit 4ae81c3

Browse files
amisevskibuziuk
authored andcommitted
Temporarily disable validation of DevWorkspaces to workaround api issue
Temporarily disable validation of the flattened DevWorkspace to work around an issue in the devfile/api validation package where all endpoint targetPorts must be unique Signed-off-by: Angel Misevski <[email protected]>
1 parent 41e8ccb commit 4ae81c3

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,7 +22,6 @@ import (
2222
"strings"
2323
"time"
2424

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

255254
// Verify that the devworkspace components are valid after flattening
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-
}
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+
// }
263263

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

0 commit comments

Comments
 (0)