Skip to content

Commit

Permalink
add version to pflags (flyteorg#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckiosidis authored and austin362667 committed May 7, 2024
1 parent 893b7c2 commit 4cd8882
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion flytectl/cmd/create/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ type ExecutionConfig struct {
Relaunch string `json:"relaunch" pflag:",execution id to be relaunched."`
Recover string `json:"recover" pflag:",execution id to be recreated from the last known failure point."`
DryRun bool `json:"dryRun" pflag:",execute command without making any modifications."`
Version string `json:"version" pflag:",specify version of execution workflow/task."`
// Non plfag section is read from the execution config generated by get task/launchplan
Workflow string `json:"workflow,omitempty"`
Task string `json:"task,omitempty"`
Version string `json:"version"`
Inputs map[string]interface{} `json:"inputs" pflag:"-"`
}

Expand Down
1 change: 1 addition & 0 deletions flytectl/cmd/create/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
func createExecutionSetup() {
ctx = testutils.Ctx
mockClient = testutils.MockClient
executionConfig = &ExecutionConfig{}
// TODO: migrate to new command context from testutils
cmdCtx = cmdCore.NewCommandContext(mockClient, testutils.MockOutStream)
sortedListLiteralType := core.Variable{
Expand Down
3 changes: 3 additions & 0 deletions flytectl/cmd/create/execution_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ func resolveOverrides(toBeOverridden *ExecutionConfig, project string, domain st
if executionConfig.TargetDomain != "" {
toBeOverridden.TargetDomain = executionConfig.TargetDomain
}
if executionConfig.Version != "" {
toBeOverridden.Version = executionConfig.Version
}
// Use the root project and domain to launch the task/workflow if target is unspecified
if executionConfig.TargetProject == "" {
toBeOverridden.TargetProject = project
Expand Down
2 changes: 1 addition & 1 deletion flytectl/cmd/create/executionconfig_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions flytectl/cmd/create/executionconfig_flags_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4cd8882

Please sign in to comment.