Skip to content

Commit

Permalink
EVG-15154 remove ExecutionTasksFull fields from task type (evergreen-…
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 committed Nov 18, 2021
1 parent 7c1b78d commit 02c5d87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
1 change: 0 additions & 1 deletion model/task/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ var (
PriorityKey = bsonutil.MustHaveTag(Task{}, "Priority")
ActivatedByKey = bsonutil.MustHaveTag(Task{}, "ActivatedBy")
ExecutionTasksKey = bsonutil.MustHaveTag(Task{}, "ExecutionTasks")
ExecutionTasksFullKey = bsonutil.MustHaveTag(Task{}, "ExecutionTasksFull")
DisplayOnlyKey = bsonutil.MustHaveTag(Task{}, "DisplayOnly")
DisplayTaskIdKey = bsonutil.MustHaveTag(Task{}, "DisplayTaskId")
TaskGroupKey = bsonutil.MustHaveTag(Task{}, "TaskGroup")
Expand Down
9 changes: 4 additions & 5 deletions model/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,10 @@ type Task struct {
LocalTestResults []TestResult `bson:"-" json:"test_results"`

// display task fields
DisplayOnly bool `bson:"display_only,omitempty" json:"display_only,omitempty"`
ExecutionTasks []string `bson:"execution_tasks,omitempty" json:"execution_tasks,omitempty"`
ExecutionTasksFull []Task `bson:"execution_tasks_full" json:"-"` // this is a local pointer from a display task to its execution tasks
ResetWhenFinished bool `bson:"reset_when_finished,omitempty" json:"reset_when_finished,omitempty"`
DisplayTask *Task `bson:"-" json:"-"` // this is a local pointer from an exec to display task
DisplayOnly bool `bson:"display_only,omitempty" json:"display_only,omitempty"`
ExecutionTasks []string `bson:"execution_tasks,omitempty" json:"execution_tasks,omitempty"`
ResetWhenFinished bool `bson:"reset_when_finished,omitempty" json:"reset_when_finished,omitempty"`
DisplayTask *Task `bson:"-" json:"-"` // this is a local pointer from an exec to display task

// DisplayTaskId is set to the display task ID if the task is an execution task, the empty string if it's not an execution task,
// and is nil if we haven't yet checked whether or not this task has a display task.
Expand Down
23 changes: 0 additions & 23 deletions rest/model/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type APITask struct {
DisplayOnly bool `json:"display_only"`
ParentTaskId string `json:"parent_task_id"`
ExecutionTasks []*string `json:"execution_tasks,omitempty"`
ExecutionTasksFull []APITask `json:"execution_tasks_full,omitempty"`
Mainline bool `json:"mainline"`
TaskGroup string `json:"task_group,omitempty"`
TaskGroupMaxHosts int `json:"task_group_max_hosts,omitempty"`
Expand Down Expand Up @@ -294,17 +293,6 @@ func (at *APITask) BuildFromService(t interface{}) error {
}
at.ExecutionTasks = ets
}
if len(v.ExecutionTasksFull) > 0 {
ets := []APITask{}
for _, t := range v.ExecutionTasksFull {
at := APITask{}
if err := at.BuildFromService(t); err != nil {
return err
}
ets = append(ets, at)
}
at.ExecutionTasksFull = ets
}

if len(v.DependsOn) > 0 {
dependsOn := make([]APIDependency, len(v.DependsOn))
Expand Down Expand Up @@ -415,17 +403,6 @@ func (ad *APITask) ToService() (interface{}, error) {
}
st.ExecutionTasks = ets
}
if len(ad.ExecutionTasksFull) > 0 {
ets := []task.Task{}
for _, at := range ad.ExecutionTasksFull {
taskData, err := at.ToService()
if err != nil {
return nil, err
}
ets = append(ets, *taskData.(*task.Task))
}
st.ExecutionTasksFull = ets
}

dependsOn := make([]task.Dependency, len(ad.DependsOn))

Expand Down

0 comments on commit 02c5d87

Please sign in to comment.