diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go new file mode 100644 index 0000000000..47eaf657e5 --- /dev/null +++ b/flytectl/cmd/delete/delete.go @@ -0,0 +1,32 @@ +package delete + +import ( + cmdcore "github.com/lyft/flytectl/cmd/core" + + "github.com/spf13/cobra" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + deleteCmdShort = `Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project.` + deleteCmdLong = ` +Example Delete executions. +:: + + bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks +` +) + +// RemoteDeleteCommand will return delete command +func RemoteDeleteCommand() *cobra.Command { + deleteCmd := &cobra.Command{ + Use: "delete", + Short: deleteCmdShort, + Long: deleteCmdLong, + } + terminateResourcesFuncs := map[string]cmdcore.CommandEntry{ + "execution": {CmdFunc: terminateExecutionFunc, Aliases: []string{"executions"}, Short: execCmdShort, Long: execCmdLong}, + } + cmdcore.AddCommands(deleteCmd, terminateResourcesFuncs) + return deleteCmd +} diff --git a/flytectl/cmd/delete/delete_test.go b/flytectl/cmd/delete/delete_test.go new file mode 100644 index 0000000000..5543c88d28 --- /dev/null +++ b/flytectl/cmd/delete/delete_test.go @@ -0,0 +1,25 @@ +package delete + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDeleteCommand(t *testing.T) { + deleteCommand := RemoteDeleteCommand() + assert.Equal(t, deleteCommand.Use, "delete") + assert.Equal(t, deleteCommand.Short, deleteCmdShort) + assert.Equal(t, deleteCommand.Long, deleteCmdLong) + assert.Equal(t, len(deleteCommand.Commands()), 1) + cmdNouns := deleteCommand.Commands() + // Sort by Use value. + sort.Slice(cmdNouns, func(i, j int) bool { + return cmdNouns[i].Use < cmdNouns[j].Use + }) + assert.Equal(t, cmdNouns[0].Use, "execution") + assert.Equal(t, cmdNouns[0].Aliases, []string{"executions"}) + assert.Equal(t, cmdNouns[0].Short, execCmdShort) + assert.Equal(t, cmdNouns[0].Long, execCmdLong) +} diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go new file mode 100644 index 0000000000..90220e9a50 --- /dev/null +++ b/flytectl/cmd/delete/execution.go @@ -0,0 +1,81 @@ +package delete + +import ( + "context" + + "github.com/lyft/flytectl/cmd/config" + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + "github.com/lyft/flytestdlib/logger" +) + +// Long descriptions are whitespace sensitive when generating docs using sphinx. +const ( + execCmdShort = `Terminate/Delete execution resources.` + execCmdLong = ` +Terminate executions.(execution,executions can be used interchangeably in these commands) + +Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then +calling terminate on them has no effect. + +Terminate a single execution with its name + +:: + + bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + +You can get executions to check its state. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Terminate multiple executions with there names +:: + + bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + +Similarly you can get executions to find the state of previously terminated executions. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Usage +` +) + +func terminateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.CommandContext) error { + for i := 0; i < len(args); i++ { + name := args[i] + logger.Infof(ctx, "Terminating execution of %v execution ", name) + _, err := cmdCtx.AdminClient().TerminateExecution(ctx, &admin.ExecutionTerminateRequest{ + Id: &core.WorkflowExecutionIdentifier{ + Project: config.GetConfig().Project, + Domain: config.GetConfig().Domain, + Name: name, + }, + }) + if err != nil { + logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) + return err + } + logger.Infof(ctx, "Terminated execution of %v execution ", name) + } + return nil +} diff --git a/flytectl/cmd/delete/execution_test.go b/flytectl/cmd/delete/execution_test.go new file mode 100644 index 0000000000..41e5f04085 --- /dev/null +++ b/flytectl/cmd/delete/execution_test.go @@ -0,0 +1,82 @@ +package delete + +import ( + "context" + "errors" + "io" + "testing" + + cmdCore "github.com/lyft/flytectl/cmd/core" + "github.com/lyft/flyteidl/clients/go/admin/mocks" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" + + "github.com/stretchr/testify/assert" +) + +var ( + ctx context.Context + args []string +) + +func setup() { + ctx = context.Background() + args = []string{} +} + +func TestTerminateExecutionFunc(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Nil(t, err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} + +func TestTerminateExecutionFuncWithError(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(nil, errors.New("failed to terminate")) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(terminateExecResponse, nil) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Equal(t, errors.New("failed to terminate"), err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertNotCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} + +func TestTerminateExecutionFuncWithPartialSuccess(t *testing.T) { + setup() + args = append(args, "exec1", "exec2") + mockClient := new(mocks.AdminServiceClient) + mockOutStream := new(io.Writer) + cmdCtx := cmdCore.NewCommandContext(mockClient, *mockOutStream) + terminateExecRequests := []*admin.ExecutionTerminateRequest{ + {Id: &core.WorkflowExecutionIdentifier{Name: "exec1"}}, + {Id: &core.WorkflowExecutionIdentifier{Name: "exec2"}}, + } + terminateExecResponse := &admin.ExecutionTerminateResponse{} + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[0]).Return(terminateExecResponse, nil) + mockClient.OnTerminateExecutionMatch(ctx, terminateExecRequests[1]).Return(nil, errors.New("failed to terminate")) + err := terminateExecutionFunc(ctx, args, cmdCtx) + assert.Equal(t, errors.New("failed to terminate"), err) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[0]) + mockClient.AssertCalled(t, "TerminateExecution", ctx, terminateExecRequests[1]) +} diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index b666b29b90..4ce6159973 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -4,17 +4,18 @@ import ( "context" "fmt" + "github.com/lyft/flytectl/cmd/config" + "github.com/lyft/flytectl/cmd/delete" "github.com/lyft/flytectl/cmd/get" "github.com/lyft/flytectl/cmd/register" "github.com/lyft/flytectl/cmd/update" "github.com/lyft/flytectl/pkg/printer" stdConfig "github.com/lyft/flytestdlib/config" "github.com/lyft/flytestdlib/config/viper" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" - - "github.com/lyft/flytectl/cmd/config" ) var ( @@ -28,6 +29,7 @@ func newRootCmd() *cobra.Command { Long: "flytectl is CLI tool written in go to interact with flyteadmin service", Short: "flyetcl CLI tool", Use: "flytectl", + DisableAutoGenTag: true, } rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", @@ -45,6 +47,7 @@ func newRootCmd() *cobra.Command { rootCmd.AddCommand(get.CreateGetCommand()) rootCmd.AddCommand(update.CreateUpdateCommand()) rootCmd.AddCommand(register.RemoteRegisterCommand()) + rootCmd.AddCommand(delete.RemoteDeleteCommand()) config.GetConfig() return rootCmd diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index f165512740..f88d0ff3aa 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -8,10 +8,8 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - updateUse = "update" - updateShort = ` -Used for updating flyte resources eg: project. -` + updateUse = "update" + updateShort = `Used for updating flyte resources eg: project.` updatecmdLong = ` Currently this command only provides subcommands to update project. Takes input project which need to be archived or unarchived. Name of the project to be updated is mandatory field. diff --git a/flytectl/cmd/update/update_test.go b/flytectl/cmd/update/update_test.go index 816c094875..c54701f40a 100644 --- a/flytectl/cmd/update/update_test.go +++ b/flytectl/cmd/update/update_test.go @@ -9,8 +9,9 @@ import ( func TestUpdateCommand(t *testing.T) { updateCommand := CreateUpdateCommand() - assert.Equal(t, updateCommand.Use, "update") - assert.Equal(t, updateCommand.Short, "\nUsed for updating flyte resources eg: project.\n") + assert.Equal(t, updateCommand.Use, updateUse) + assert.Equal(t, updateCommand.Short, updateShort) + assert.Equal(t, updateCommand.Long, updatecmdLong) assert.Equal(t, len(updateCommand.Commands()), 1) cmdNouns := updateCommand.Commands() // Sort by Use value. @@ -19,4 +20,6 @@ func TestUpdateCommand(t *testing.T) { }) assert.Equal(t, cmdNouns[0].Use, "project") assert.Equal(t, cmdNouns[0].Aliases, []string{"projects"}) + assert.Equal(t, cmdNouns[0].Short, projectShort) + assert.Equal(t, cmdNouns[0].Long, projectLong) } diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index 98c2e98d86..ee262c6ec4 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -60,11 +60,9 @@ SEE ALSO ~~~~~~~~ * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -* :doc:`flytectl_update` - -Used for updating flyte resources eg: project. - +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. * :doc:`flytectl_version` - Displays version information for the client and server. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index a8dcaff897..d3bf35e5bf 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -71,4 +71,3 @@ SEE ALSO * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. * :doc:`flytectl_config_validate` - Validates the loaded config. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_discover.rst b/flytectl/docs/source/gen/flytectl_config_discover.rst index c8d945e1d5..2ce677324c 100644 --- a/flytectl/docs/source/gen/flytectl_config_discover.rst +++ b/flytectl/docs/source/gen/flytectl_config_discover.rst @@ -73,4 +73,3 @@ SEE ALSO * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_config_validate.rst b/flytectl/docs/source/gen/flytectl_config_validate.rst index e7fd55fe82..ac0f848d42 100644 --- a/flytectl/docs/source/gen/flytectl_config_validate.rst +++ b/flytectl/docs/source/gen/flytectl_config_validate.rst @@ -75,4 +75,3 @@ SEE ALSO * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst new file mode 100644 index 0000000000..f9c3e5b589 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -0,0 +1,75 @@ +.. _flytectl_delete: + +flytectl delete +--------------- + +Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + +Synopsis +~~~~~~~~ + + + +Example Delete executions. +:: + + bin/flytectl delete execution kxd1i72850 -d development -p flytesnacks + + +Options +~~~~~~~ + +:: + + -h, --help help for delete + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl` - flyetcl CLI tool +* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. + diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst new file mode 100644 index 0000000000..d606658174 --- /dev/null +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -0,0 +1,117 @@ +.. _flytectl_delete_execution: + +flytectl delete execution +------------------------- + +Terminate/Delete execution resources. + +Synopsis +~~~~~~~~ + + + +Terminate executions.(execution,executions can be used interchangeably in these commands) + +Task executions can be aborted only if they are in non-terminal state i.e if they are FAILED,ABORTED or SUCCEEDED then +calling terminate on them has no effect. + +Terminate a single execution with its name + +:: + + bin/flytectl delete execution c6a51x2l9e -d development -p flytesnacks + +You can get executions to check its state. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Terminate multiple executions with there names +:: + + bin/flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks + +Similarly you can get executions to find the state of previously terminated executions. + +:: + + bin/flytectl get execution -d development -p flytesnacks + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | NAME (7) | WORKFLOW NAME | TYPE | PHASE | STARTED | ELAPSED TIME | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | c6a51x2l9e | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:13:04.680476300Z | 15.540361300s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | eeam9s8sny | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:04.803084100Z | 42.306385500s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + | p4wv4hwgc4 | recipes.core.basic.lp.go_greet | WORKFLOW | ABORTED | 2021-02-17T08:14:27.476307400Z | 19.727504400s | + ------------ ------------------------------------------------------------------------- ---------- ----------- -------------------------------- --------------- + +Usage + + +:: + + flytectl delete execution [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for execution + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + --admin.authorizationHeader string Custom metadata header to pass JWT + --admin.authorizationServerUrl string This is the URL to your IDP's authorization server' + --admin.clientId string Client ID + --admin.clientSecretLocation string File containing the client secret + --admin.endpoint string For admin types, specify where the uri of the service is located. + --admin.insecure Use insecure connection. + --admin.maxBackoffDelay string Max delay for grpc backoff (default "8s") + --admin.maxRetries int Max number of gRPC retries (default 4) + --admin.perRetryTimeout string gRPC per retry timeout (default "15s") + --admin.scopes strings List of scopes to request + --admin.tokenUrl string Your IDPs token endpoint + --admin.useAuth Whether or not to try to authenticate with options below + --adminutils.batchSize int Maximum number of records to retrieve per call. (default 100) + --adminutils.maxRecords int Maximum number of records to retrieve. (default 500) + --config string config file (default is $HOME/config.yaml) + -d, --domain string Specifies the Flyte project's domain. + --logger.formatter.type string Sets logging format type. (default "json") + --logger.level int Sets the minimum logging level. (default 4) + --logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only. + --logger.show-source Includes source code location in logs. + -o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE") + -p, --project string Specifies the Flyte project. + --root.domain string Specified the domain to work on. + --root.output string Specified the output type. + --root.project string Specifies the project to work on. + --storage.cache.max_size_mbs int Maximum size of the cache where the Blob store data is cached in-memory. If not specified or set to 0, cache is not used + --storage.cache.target_gc_percent int Sets the garbage collection target percentage. + --storage.connection.access-key string Access key to use. Only required when authtype is set to accesskey. + --storage.connection.auth-type string Auth Type to use [iam, accesskey]. (default "iam") + --storage.connection.disable-ssl Disables SSL connection. Should only be used for development. + --storage.connection.endpoint string URL for storage client to connect to. + --storage.connection.region string Region to connect to. (default "us-east-1") + --storage.connection.secret-key string Secret to use when accesskey is set. + --storage.container string Initial container to create -if it doesn't exist-.' + --storage.defaultHttpClient.timeout string Sets time out on the http client. (default "0s") + --storage.enable-multicontainer If this is true, then the container argument is overlooked and redundant. This config will automatically open new connections to new containers/buckets as they are encountered + --storage.limits.maxDownloadMBs int Maximum allowed download size (in MBs) per call. (default 2) + --storage.type string Sets the type of storage to configure [s3/minio/local/mem/stow]. (default "s3") + +SEE ALSO +~~~~~~~~ + +* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project. + diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index a1f3bf0958..ae7a6ae65d 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -77,4 +77,3 @@ SEE ALSO * :doc:`flytectl_get_task` - Gets task resources * :doc:`flytectl_get_workflow` - Gets workflow resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index 1d920920ef..c623b62409 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index ec077f41b8..8ad77613a5 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index 5bc2c48e40..17c5d35b3a 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index a5ea0f978c..01587b65ab 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index 82d0b3edd1..e27166be70 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -101,4 +101,3 @@ SEE ALSO * :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 1f031fec23..19179afdfc 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -73,4 +73,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_register_files` - Registers file resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index 23135a982c..01074e4dc8 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -118,4 +118,3 @@ SEE ALSO * :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files. -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index a0dd80e5fc..0424744484 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -3,10 +3,8 @@ flytectl update --------------- - Used for updating flyte resources eg: project. - Synopsis ~~~~~~~~ @@ -77,4 +75,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool * :doc:`flytectl_update_project` - Updates project resources -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 0db111a1ab..5df7744a40 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -114,8 +114,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_update` - -Used for updating flyte resources eg: project. +* :doc:`flytectl_update` - Used for updating flyte resources eg: project. - -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index 11247bb736..cbcf99db64 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -71,4 +71,3 @@ SEE ALSO * :doc:`flytectl` - flyetcl CLI tool -*Auto generated by spf13/cobra on 16-Feb-2021* diff --git a/flytectl/go.mod b/flytectl/go.mod index b2617470b1..5f46438ddc 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -5,6 +5,7 @@ go 1.13 require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/ghodss/yaml v1.0.0 + github.com/golang/mock v1.3.1 github.com/golang/protobuf v1.3.2 github.com/kataras/tablewriter v0.0.0-20180708051242-e063d29b7c23 github.com/landoop/tableprinter v0.0.0-20180806200924-8bd8c2576d27 diff --git a/flytectl/go.sum b/flytectl/go.sum index 8716cb318d..41fc86466b 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -129,6 +129,7 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18h github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=