From 7c6f95a39b4765e22b217254c5a7849decb607f2 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Tue, 20 Apr 2021 14:02:25 -0400 Subject: [PATCH 1/2] Rename ideUrl to mainUrl Since not all DevWorkspaces contain IDEs, it makes more sense to use a generic name rather than the IDE-specific language. Signed-off-by: Angel Misevski --- pkg/apis/workspaces/v1alpha1/conversion.go | 4 ++-- pkg/apis/workspaces/v1alpha2/devworkspace_types.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/apis/workspaces/v1alpha1/conversion.go b/pkg/apis/workspaces/v1alpha1/conversion.go index c1442ff0f..4be589bdf 100644 --- a/pkg/apis/workspaces/v1alpha1/conversion.go +++ b/pkg/apis/workspaces/v1alpha1/conversion.go @@ -7,7 +7,7 @@ import ( func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspace) error { dest.ObjectMeta = src.ObjectMeta dest.Status.DevWorkspaceId = src.Status.WorkspaceId - dest.Status.IdeUrl = src.Status.IdeUrl + dest.Status.MainUrl = src.Status.IdeUrl dest.Status.Phase = v1alpha2.DevWorkspacePhase(src.Status.Phase) dest.Status.Message = src.Status.Message convertConditionsTo_v1alpha2(src, dest) @@ -20,7 +20,7 @@ func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspa func convertDevWorkspaceFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorkspace) error { dest.ObjectMeta = src.ObjectMeta dest.Status.WorkspaceId = src.Status.DevWorkspaceId - dest.Status.IdeUrl = src.Status.IdeUrl + dest.Status.IdeUrl = src.Status.MainUrl dest.Status.Phase = WorkspacePhase(src.Status.Phase) dest.Status.Message = src.Status.Message convertConditionsFrom_v1alpha2(src, dest) diff --git a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go index 50a914c0b..c7fe603c5 100644 --- a/pkg/apis/workspaces/v1alpha2/devworkspace_types.go +++ b/pkg/apis/workspaces/v1alpha2/devworkspace_types.go @@ -16,9 +16,9 @@ type DevWorkspaceSpec struct { type DevWorkspaceStatus struct { // Id of the DevWorkspace DevWorkspaceId string `json:"devworkspaceId"` - // URL at which the DevWorkspace Editor can be joined - IdeUrl string `json:"ideUrl,omitempty"` - Phase DevWorkspacePhase `json:"phase,omitempty"` + // Main URL for this DevWorkspace + MainUrl string `json:"mainUrl,omitempty"` + Phase DevWorkspacePhase `json:"phase,omitempty"` // Conditions represent the latest available observations of an object's state Conditions []DevWorkspaceCondition `json:"conditions,omitempty"` // Message is a short user-readable message giving additional information From 3a9479151c23e0ee098555514b2d5ac66a798f19 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Tue, 20 Apr 2021 14:07:35 -0400 Subject: [PATCH 2/2] Regenerate CRDs and schemas after renaming ideUrl Signed-off-by: Angel Misevski --- crds/workspace.devfile.io_devworkspaces.v1beta1.yaml | 4 ++-- crds/workspace.devfile.io_devworkspaces.yaml | 4 ++-- schemas/latest/dev-workspace.json | 4 ++-- schemas/latest/ide-targeted/dev-workspace.json | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index bc25b4d9f..ffa384c0d 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -7444,8 +7444,8 @@ spec: devworkspaceId: description: Id of the DevWorkspace type: string - ideUrl: - description: URL at which the DevWorkspace Editor can be joined + mainUrl: + description: Main URL for this DevWorkspace type: string message: description: Message is a short user-readable message giving additional diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index af4af7b32..3ac68781d 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -7449,8 +7449,8 @@ spec: devworkspaceId: description: Id of the DevWorkspace type: string - ideUrl: - description: URL at which the DevWorkspace Editor can be joined + mainUrl: + description: Main URL for this DevWorkspace type: string message: description: Message is a short user-readable message giving additional diff --git a/schemas/latest/dev-workspace.json b/schemas/latest/dev-workspace.json index aaa101f94..97e6a0a41 100644 --- a/schemas/latest/dev-workspace.json +++ b/schemas/latest/dev-workspace.json @@ -3294,8 +3294,8 @@ "description": "Id of the DevWorkspace", "type": "string" }, - "ideUrl": { - "description": "URL at which the DevWorkspace Editor can be joined", + "mainUrl": { + "description": "Main URL for this DevWorkspace", "type": "string" }, "message": { diff --git a/schemas/latest/ide-targeted/dev-workspace.json b/schemas/latest/ide-targeted/dev-workspace.json index dc98edb75..b2ab52531 100644 --- a/schemas/latest/ide-targeted/dev-workspace.json +++ b/schemas/latest/ide-targeted/dev-workspace.json @@ -3683,10 +3683,10 @@ "type": "string", "markdownDescription": "Id of the DevWorkspace" }, - "ideUrl": { - "description": "URL at which the DevWorkspace Editor can be joined", + "mainUrl": { + "description": "Main URL for this DevWorkspace", "type": "string", - "markdownDescription": "URL at which the DevWorkspace Editor can be joined" + "markdownDescription": "Main URL for this DevWorkspace" }, "message": { "description": "Message is a short user-readable message giving additional information about an object's state",