Skip to content

Commit

Permalink
chore: pass Labels/project/workspace to TaskSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
CanmingCobble committed Mar 8, 2023
1 parent 7d8b711 commit 0a034fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions master/internal/core_experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@ func (m *Master) parseCreateExperiment(params *CreateExperimentParams, user *mod
dbExp.Username = user.Username
}

taskSpec.Project = *config.RawProject
taskSpec.Workspace = *config.RawWorkspace
for label := range config.RawLabels {
taskSpec.Labels = append(taskSpec.Labels, label)
}

return dbExp, config, project, params.ValidateOnly, &taskSpec, err
}

Expand Down
4 changes: 4 additions & 0 deletions master/pkg/tasks/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ type TaskSpec struct {
PbsConfig expconf.PbsConfig

ExtraProxyPorts expconf.ProxyPortsConfig

Workspace string
Project string
Labels []string
}

// ResolveWorkDir resolves the work dir.
Expand Down

0 comments on commit 0a034fd

Please sign in to comment.