Skip to content

Commit 585f5fe

Browse files
yangcao77amisevsk
andauthored
remove vscodetask and vscodelaunch, deprecate project.github (#349)
* remove vscodetask and vscodelaunch, deprecate project.github Signed-off-by: Stephanie <[email protected]> * Remove VSCodeTask and VSCodeLaunch from coverage in conversion tests Signed-off-by: Angel Misevski <[email protected]> * Add deprecation and removal notice to vscode tasks in v1alpha1 Signed-off-by: Angel Misevski <[email protected]> * run go fmt Signed-off-by: Stephanie <[email protected]> Co-authored-by: Angel Misevski <[email protected]>
1 parent 283b0c5 commit 585f5fe

File tree

57 files changed

+235
-6918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+235
-6918
lines changed

crds/workspace.devfile.io_devworkspaces.v1beta1.yaml

Lines changed: 27 additions & 388 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspaces.yaml

Lines changed: 27 additions & 388 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml

Lines changed: 26 additions & 378 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspacetemplates.yaml

Lines changed: 26 additions & 378 deletions
Large diffs are not rendered by default.

pkg/apis/workspaces/v1alpha1/attributes_conversion.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ func getCommandAttributes(command *Command) map[string]string {
3131
return command.Exec.Attributes
3232
case command.Apply != nil:
3333
return command.Apply.Attributes
34-
case command.VscodeTask != nil:
35-
return command.VscodeTask.Attributes
36-
case command.VscodeLaunch != nil:
37-
return command.VscodeLaunch.Attributes
3834
case command.Composite != nil:
3935
return command.Composite.Attributes
4036
case command.Custom != nil:

pkg/apis/workspaces/v1alpha1/commands.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,14 @@ type Command struct {
8686
Apply *ApplyCommand `json:"apply,omitempty"`
8787

8888
// Command providing the definition of a VsCode Task
89+
//
90+
// Deprecated; removed in v1alpha2
8991
// +optional
9092
VscodeTask *VscodeConfigurationCommand `json:"vscodeTask,omitempty"`
9193

9294
// Command providing the definition of a VsCode launch action
95+
//
96+
// Deprecated; removed in v1alpha2
9397
// +optional
9498
VscodeLaunch *VscodeConfigurationCommand `json:"vscodeLaunch,omitempty"`
9599

pkg/apis/workspaces/v1alpha1/commands_conversion.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ func convertCommandTo_v1alpha2(src *Command, dest *v1alpha2.Command) error {
2727
srcAttributes = src.Exec.Attributes
2828
case src.Apply != nil:
2929
srcAttributes = src.Apply.Attributes
30-
case src.VscodeTask != nil:
31-
srcAttributes = src.VscodeTask.Attributes
32-
case src.VscodeLaunch != nil:
33-
srcAttributes = src.VscodeLaunch.Attributes
3430
case src.Composite != nil:
3531
srcAttributes = src.Composite.Attributes
3632
case src.Custom != nil:
@@ -76,12 +72,6 @@ func convertCommandFrom_v1alpha2(src *v1alpha2.Command, dest *Command) error {
7672
case dest.Exec != nil:
7773
dest.Exec.Attributes = destAttributes
7874
dest.Exec.Id = id
79-
case dest.VscodeLaunch != nil:
80-
dest.VscodeLaunch.Attributes = destAttributes
81-
dest.VscodeLaunch.Id = id
82-
case dest.VscodeTask != nil:
83-
dest.VscodeTask.Attributes = destAttributes
84-
dest.VscodeTask.Id = id
8575
}
8676
return err
8777
}

pkg/apis/workspaces/v1alpha1/conversion_test.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var componentFuzzFunc = func(component *Component, c fuzz.Continue) {
4040
}
4141

4242
var commandFuzzFunc = func(command *Command, c fuzz.Continue) {
43-
switch c.Intn(6) {
43+
switch c.Intn(4) {
4444
case 0:
4545
c.Fuzz(&command.Apply)
4646
case 1:
@@ -49,10 +49,6 @@ var commandFuzzFunc = func(command *Command, c fuzz.Continue) {
4949
c.Fuzz(&command.Custom)
5050
case 3:
5151
c.Fuzz(&command.Exec)
52-
case 4:
53-
c.Fuzz(&command.VscodeLaunch)
54-
case 5:
55-
c.Fuzz(&command.VscodeTask)
5652
}
5753
}
5854

@@ -130,7 +126,7 @@ var parentComponentFuzzFunc = func(component *Component, c fuzz.Continue) {
130126
var parentCommandFuzzFunc = func(command *Command, c fuzz.Continue) {
131127
// Do not generate Custom commands for Parents
132128
// Also: commands in Parents cannot have attributes.
133-
switch c.Intn(5) {
129+
switch c.Intn(3) {
134130
case 0:
135131
c.Fuzz(&command.Apply)
136132
if command.Apply != nil {
@@ -146,16 +142,6 @@ var parentCommandFuzzFunc = func(command *Command, c fuzz.Continue) {
146142
if command.Exec != nil {
147143
command.Exec.Attributes = nil
148144
}
149-
case 3:
150-
c.Fuzz(&command.VscodeLaunch)
151-
if command.VscodeLaunch != nil {
152-
command.VscodeLaunch.Attributes = nil
153-
}
154-
case 4:
155-
c.Fuzz(&command.VscodeTask)
156-
if command.VscodeTask != nil {
157-
command.VscodeTask.Attributes = nil
158-
}
159145
}
160146
}
161147

pkg/apis/workspaces/v1alpha1/parent_conversion.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ func convertParentCommandFrom_v1alpha2(src *v1alpha2.CommandParentOverride, dest
219219
dest.Composite.Id = srcId
220220
case src.Exec != nil:
221221
dest.Exec.Id = srcId
222-
case src.VscodeLaunch != nil:
223-
dest.VscodeLaunch.Id = srcId
224-
case src.VscodeTask != nil:
225-
dest.VscodeTask.Id = srcId
226222
}
227223
return nil
228224
}

pkg/apis/workspaces/v1alpha1/plugin_conversion.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ func convertPluginComponentCommandFrom_v1alpha2(src *v1alpha2.CommandPluginOverr
138138
dest.Composite.Id = srcId
139139
case src.Exec != nil:
140140
dest.Exec.Id = srcId
141-
case src.VscodeLaunch != nil:
142-
dest.VscodeLaunch.Id = srcId
143-
case src.VscodeTask != nil:
144-
dest.VscodeTask.Id = srcId
145141
}
146142
return nil
147143
}

0 commit comments

Comments
 (0)