From 9d1d7bf62008ce95e8e273ebcf9d574b8f06681f Mon Sep 17 00:00:00 2001 From: SmritiSatyanV <94349093+SmritiSatyanV@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:25:26 +0530 Subject: [PATCH] Fix grammar test (#272) * Fix grammar Signed-off-by: SmritiSatyanV * Updated task.go Signed-off-by: SmritiSatyanV * Updated configuration.go Signed-off-by: SmritiSatyanV * Fixed build errors-1 Signed-off-by: SmritiSatyanV * Fixed build errors-2 Signed-off-by: SmritiSatyanV * Fixed errors-3 Signed-off-by: SmritiSatyanV * Updated sandbox_test.go Signed-off-by: SmritiSatyanV * Fixed errors-4 Signed-off-by: SmritiSatyanV * Minor grammar fix Changed FlyteCTL to Flytectl Grammar fixes Signed-off-by: SmritiSatyanV * Fixed errors Signed-off-by: SmritiSatyanV * Fixed unit test errors Signed-off-by: SmritiSatyanV * Updates based on comments Signed-off-by: SmritiSatyanV * Rephrased sentence Signed-off-by: SmritiSatyanV * Fixed errors Error strings shouldn't begin with upper case or end with punctuation or newline. Signed-off-by: SmritiSatyanV * Updated project.go Signed-off-by: SmritiSatyanV * Updated errors.go Signed-off-by: SmritiSatyanV * Updated project_test.go Signed-off-by: SmritiSatyanV * stylistic changes Signed-off-by: Samhita Alla * revert letter case in errors.go Signed-off-by: Samhita Alla * fix lint errors Signed-off-by: Samhita Alla Co-authored-by: Samhita Alla --- flytectl/README.md | 10 +- flytectl/clierrors/errors.go | 28 ++--- flytectl/cmd/completion.go | 70 +++++++----- flytectl/cmd/completion_test.go | 6 +- .../subcommand/sandbox/sandbox_config.go | 10 +- flytectl/cmd/configuration/configuration.go | 19 ++-- flytectl/cmd/create/create.go | 2 +- flytectl/cmd/create/create_test.go | 4 +- flytectl/cmd/create/execution.go | 105 ++++++++---------- flytectl/cmd/create/execution_test.go | 2 +- flytectl/cmd/create/execution_util.go | 2 +- flytectl/cmd/create/project.go | 20 ++-- flytectl/cmd/create/project_test.go | 4 +- flytectl/cmd/delete/delete.go | 2 +- flytectl/cmd/delete/execution.go | 16 +-- .../matchable_cluster_resource_attribute.go | 21 ++-- .../matchable_execution_cluster_label.go | 22 ++-- .../matchable_execution_queue_attribute.go | 20 ++-- .../cmd/delete/matchable_plugin_override.go | 19 ++-- .../matchable_task_resource_attribute.go | 20 ++-- .../matchable_workflow_execution_config.go | 22 ++-- flytectl/cmd/get/execution.go | 26 +++-- flytectl/cmd/get/get.go | 4 +- flytectl/cmd/get/get_test.go | 2 +- flytectl/cmd/get/launch_plan.go | 12 +- .../matchable_cluster_resource_attribute.go | 18 +-- .../get/matchable_execution_cluster_label.go | 18 +-- .../matchable_execution_queue_attribute.go | 18 +-- flytectl/cmd/get/matchable_plugin_override.go | 21 ++-- .../get/matchable_task_resource_attribute.go | 18 +-- .../matchable_workflow_execution_config.go | 20 ++-- flytectl/cmd/get/project.go | 7 +- flytectl/cmd/get/task.go | 8 +- flytectl/cmd/get/workflow.go | 4 +- flytectl/cmd/register/examples.go | 8 +- flytectl/cmd/register/files.go | 34 +++--- flytectl/cmd/register/register.go | 6 +- flytectl/cmd/register/register_test.go | 6 +- flytectl/cmd/root.go | 4 +- flytectl/cmd/sandbox/exec.go | 6 +- flytectl/cmd/sandbox/sandbox.go | 23 ++-- flytectl/cmd/sandbox/sandbox_test.go | 2 +- flytectl/cmd/sandbox/start.go | 18 +-- flytectl/cmd/sandbox/status.go | 4 +- flytectl/cmd/sandbox/teardown.go | 4 +- flytectl/cmd/update/execution.go | 6 +- flytectl/cmd/update/launch_plan.go | 6 +- flytectl/cmd/update/launch_plan_meta.go | 2 +- .../matchable_cluster_resource_attribute.go | 6 +- ...tchable_cluster_resource_attribute_test.go | 8 +- .../matchable_execution_cluster_label.go | 6 +- .../matchable_execution_queue_attribute.go | 8 +- .../cmd/update/matchable_plugin_override.go | 8 +- .../matchable_task_resource_attribute.go | 8 +- .../matchable_workflow_execution_config.go | 8 +- flytectl/cmd/update/project.go | 2 +- flytectl/cmd/update/project_test.go | 4 +- flytectl/cmd/update/task_meta.go | 2 +- flytectl/cmd/update/update.go | 4 +- flytectl/cmd/update/workflow_meta.go | 2 +- flytectl/cmd/upgrade/upgrade.go | 14 ++- flytectl/cmd/upgrade/upgrade_test.go | 4 +- flytectl/cmd/version/version.go | 12 +- flytectl/cmd/version/version_test.go | 4 +- flytectl/docs/source/conf.py | 1 + flytectl/docs/source/config.rst | 2 - flytectl/docs/source/contribute.rst | 45 ++++---- flytectl/docs/source/examples.rst | 4 +- .../docs/source/execution-cluster-label.rst | 2 +- .../docs/source/execution-queue-attribute.rst | 7 +- flytectl/docs/source/execution.rst | 2 +- flytectl/docs/source/files.rst | 4 +- flytectl/docs/source/gen/flytectl.rst | 20 ++-- .../docs/source/gen/flytectl_completion.rst | 72 +++++++----- flytectl/docs/source/gen/flytectl_config.rst | 4 +- .../docs/source/gen/flytectl_config_init.rst | 19 ++-- flytectl/docs/source/gen/flytectl_create.rst | 8 +- .../source/gen/flytectl_create_execution.rst | 105 ++++++++---------- .../source/gen/flytectl_create_project.rst | 20 ++-- flytectl/docs/source/gen/flytectl_delete.rst | 18 +-- ...ectl_delete_cluster-resource-attribute.rst | 23 ++-- ...lytectl_delete_execution-cluster-label.rst | 18 +-- ...tectl_delete_execution-queue-attribute.rst | 18 +-- .../source/gen/flytectl_delete_execution.rst | 16 +-- .../gen/flytectl_delete_plugin-override.rst | 18 +-- ...lytectl_delete_task-resource-attribute.rst | 16 +-- ...tectl_delete_workflow-execution-config.rst | 14 +-- flytectl/docs/source/gen/flytectl_get.rst | 28 ++--- ...lytectl_get_cluster-resource-attribute.rst | 20 ++-- .../flytectl_get_execution-cluster-label.rst | 20 ++-- ...flytectl_get_execution-queue-attribute.rst | 20 ++-- .../source/gen/flytectl_get_execution.rst | 28 ++--- .../source/gen/flytectl_get_launchplan.rst | 14 ++- .../gen/flytectl_get_plugin-override.rst | 23 ++-- .../docs/source/gen/flytectl_get_project.rst | 9 +- .../flytectl_get_task-resource-attribute.rst | 20 ++-- .../docs/source/gen/flytectl_get_task.rst | 10 +- ...flytectl_get_workflow-execution-config.rst | 22 ++-- .../docs/source/gen/flytectl_get_workflow.rst | 6 +- .../docs/source/gen/flytectl_register.rst | 12 +- .../source/gen/flytectl_register_examples.rst | 10 +- .../source/gen/flytectl_register_files.rst | 14 ++- flytectl/docs/source/gen/flytectl_sandbox.rst | 22 ++-- .../docs/source/gen/flytectl_sandbox_exec.rst | 7 +- .../source/gen/flytectl_sandbox_start.rst | 19 ++-- .../source/gen/flytectl_sandbox_status.rst | 6 +- .../source/gen/flytectl_sandbox_teardown.rst | 6 +- flytectl/docs/source/gen/flytectl_update.rst | 14 +-- ...ectl_update_cluster-resource-attribute.rst | 6 +- ...lytectl_update_execution-cluster-label.rst | 6 +- ...tectl_update_execution-queue-attribute.rst | 8 +- .../source/gen/flytectl_update_execution.rst | 6 +- .../gen/flytectl_update_launchplan-meta.rst | 2 +- .../source/gen/flytectl_update_launchplan.rst | 6 +- .../gen/flytectl_update_plugin-override.rst | 8 +- .../source/gen/flytectl_update_project.rst | 2 +- .../source/gen/flytectl_update_task-meta.rst | 2 +- ...lytectl_update_task-resource-attribute.rst | 8 +- ...tectl_update_workflow-execution-config.rst | 8 +- .../gen/flytectl_update_workflow-meta.rst | 2 +- flytectl/docs/source/gen/flytectl_upgrade.rst | 14 ++- flytectl/docs/source/gen/flytectl_version.rst | 6 +- flytectl/docs/source/index.rst | 25 +++-- flytectl/docs/source/launchplan.rst | 4 +- flytectl/docs/source/nouns.rst | 4 +- flytectl/docs/source/plugin-override.rst | 2 +- flytectl/docs/source/project.rst | 4 +- flytectl/docs/source/sandbox.rst | 2 +- .../docs/source/task-resource-attribute.rst | 2 +- flytectl/docs/source/task.rst | 2 +- flytectl/docs/source/verbs.rst | 2 +- .../docs/source/workflow-execution-config.rst | 5 +- flytectl/docs/source/workflow.rst | 2 +- flytectl/proposal/README.md | 32 +++--- 134 files changed, 932 insertions(+), 853 deletions(-) diff --git a/flytectl/README.md b/flytectl/README.md index 4c64202e23..938d915550 100644 --- a/flytectl/README.md +++ b/flytectl/README.md @@ -31,7 +31,7 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control ## 🚀 Quick Start -1. Install FlyteCTL with bash or shell script +1. Install Flytectl with bash or shell script. * Bash ```bash @@ -41,14 +41,14 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control ```bash $ curl -sL https://ctl.flyte.org/install | bash ``` -2. (Optional) `flytectl upgrade` provides a general interface to upgrading FlyteCTL; run the command in the output +2. (Optional) `flytectl upgrade` provides a general interface to upgrading Flytectl; run the command in the output. -3. Start sandbox using FlyteCTL +3. Start Sandbox using Flytectl. ```bash $ flytectl sandbox start ``` -4. Register examples +4. Register examples. ```bash # Register core workflows $ flytectl register examples -d development -p flytesnacks @@ -56,7 +56,7 @@ and accesses [FlyteAdmin](https://github.com/flyteorg/flyteadmin/), the control

- 📖 How to Contribute to FlyteCTL + 📖 How to Contribute to Flytectl

diff --git a/flytectl/clierrors/errors.go b/flytectl/clierrors/errors.go index c3515bf212..a8ff701cb3 100644 --- a/flytectl/clierrors/errors.go +++ b/flytectl/clierrors/errors.go @@ -1,24 +1,24 @@ package clierrors var ( - ErrInvalidStateUpdate = "Invalid state passed. Specify either activate or archive\n" + ErrInvalidStateUpdate = "invalid state passed. Specify either activate or archive\n" - ErrProjectNotPassed = "Project id not passed\n" // #nosec - ErrProjectNameNotPassed = "project name is required flag" - ErrFailedProjectUpdate = "Project %v failed to get updated due to %v\n" + ErrProjectNotPassed = "project id wasn't passed\n" // #nosec + ErrProjectNameNotPassed = "project name is a required flag" + ErrFailedProjectUpdate = "Project %v failed to update due to %v\n" - ErrLPNotPassed = "Launch plan name not passed\n" - ErrLPVersionNotPassed = "Launch plan version not passed\n" //nolint - ErrFailedLPUpdate = "Launch plan %v failed to get updated due to %v\n" + ErrLPNotPassed = "launch plan name wasn't passed\n" + ErrLPVersionNotPassed = "launch plan version wasn't passed\n" //nolint + ErrFailedLPUpdate = "launch plan %v failed to update due to %v\n" - ErrExecutionNotPassed = "Execution name not passed\n" - ErrFailedExecutionUpdate = "Execution %v failed to get updated due to %v\n" + ErrExecutionNotPassed = "execution name wasn't passed\n" + ErrFailedExecutionUpdate = "execution %v failed to update due to %v\n" - ErrWorkflowNotPassed = "Workflow name not passed\n" - ErrFailedWorkflowUpdate = "Workflow %v failed to get updated to due to %v\n" + ErrWorkflowNotPassed = "workflow name wasn't passed\n" + ErrFailedWorkflowUpdate = "workflow %v failed to update to due to %v\n" - ErrTaskNotPassed = "Task name not passed\n" // #nosec - ErrFailedTaskUpdate = "Task %v failed to get updated to due to %v\n" + ErrTaskNotPassed = "task name wasn't passed\n" // #nosec + ErrFailedTaskUpdate = "task %v failed to update to due to %v\n" - ErrSandboxExists = "Sandbox Exist\n" + ErrSandboxExists = "sandbox already exists!\n" ) diff --git a/flytectl/cmd/completion.go b/flytectl/cmd/completion.go index ceeb07643a..34b3c17104 100644 --- a/flytectl/cmd/completion.go +++ b/flytectl/cmd/completion.go @@ -24,45 +24,65 @@ import ( // completionCmd represents the completion command var completionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", - Short: "Generate completion script", - Long: `To load completions: + Short: "Generates completion script.", + Long: `To load completion, run the following commands in accordance with the shell you are using: -Bash: +- Bash + :: - $ source <(flytectl completion bash) + $ source <(flytectl completion bash) - # To load completions for each session, execute once: - # Linux: - $ flytectl completion bash > /etc/bash_completion.d/flytectl - # macOS: - $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + To load completions for each session: -Zsh: + - Linux + :: - # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + $ flytectl completion bash > /etc/bash_completion.d/flytectl - $ echo "autoload -U compinit; compinit" >> ~/.zshrc + - macOS + :: - # To load completions for each session, execute once: - $ flytectl completion zsh > "${fpath[1]}/_flytectl" + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl - # You will need to start a new shell for this setup to take effect. +- Zsh + If shell completion is not already enabled in your environment, enable it: -fish: + :: - $ flytectl completion fish | source + $ echo "autoload -U compinit; compinit" >> ~/.zshrc - # To load completions for each session, execute once: - $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + Once enabled, execute once: -PowerShell: + :: - PS> flytectl completion powershell | Out-String | Invoke-Expression + $ flytectl completion zsh > "${fpath[1]}/_flytectl" - # To load completions for every new session, run: - PS> flytectl completion powershell > flytectl.ps1 - # and source this file from your PowerShell profile. + .. note:: + Start a new shell for this setup to take effect. + +- fish + :: + + $ flytectl completion fish | source + + To load completions for each session, run: + + :: + + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +- PowerShell + :: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + To load completions for each session, run: + + :: + + PS> flytectl completion powershell > flytectl.ps1 + + and source this file from your PowerShell profile. `, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, diff --git a/flytectl/cmd/completion_test.go b/flytectl/cmd/completion_test.go index 71eab97dc9..99aa21a851 100644 --- a/flytectl/cmd/completion_test.go +++ b/flytectl/cmd/completion_test.go @@ -9,9 +9,9 @@ import ( func TestCompletionCmdIntegration(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", - Use: "FlyteCTL", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service", + Short: "Flytectl CLI tool", + Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go index be553a4efc..a2fd3d1521 100644 --- a/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go +++ b/flytectl/cmd/config/subcommand/sandbox/sandbox_config.go @@ -34,9 +34,9 @@ var ( type Config struct { Source string `json:"source" pflag:",Path of your source code"` - // Flytectl sandbox only supports flyte version available in Github release https://github.com/flyteorg/flyte/tags - // Flytectl sandbox will only work for v0.10.0+ - // Default value dind represents the latest release + // Flytectl sandbox only supports Flyte version available in Github release https://github.com/flyteorg/flyte/tags. + // Flytectl sandbox will only work for v0.10.0+. + // Default value dind represents the latest release. Version string `json:"version" pflag:",Version of flyte. Only supports flyte releases greater than v0.10.0"` // Optionally it is possible to specify a specific fqn for the docker image with the tag. This should be @@ -44,13 +44,13 @@ type Config struct { // from there. Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."` - // Default value false represents that flytectl will not use latest pre release if exist + // Default value false represents that Flytectl will not use the latest pre-release if it exists. Prerelease bool `json:"pre" pflag:",Optional. Pre release Version of flyte will be used for sandbox."` // Optionally it is possible to pass in environment variables to sandbox container. Env []string `json:"env" pflag:",Optional. Provide Env variable in key=value format which can be passed to sandbox container."` // Optionally it is possible to use local sandbox image - // If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry + // Flytectl will not pull the image from the registry if the local flag passes. It is usually useful while testing your local images without pushing them to a registry. ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"` } diff --git a/flytectl/cmd/configuration/configuration.go b/flytectl/cmd/configuration/configuration.go index be8421a640..30e506c2f1 100644 --- a/flytectl/cmd/configuration/configuration.go +++ b/flytectl/cmd/configuration/configuration.go @@ -25,28 +25,33 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - initCmdShort = `Generates FlyteCTL config file in the user's home directory.` - initCmdLong = `Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte + initCmdShort = `Generates a Flytectl config file in the user's home directory.` + initCmdLong = `Creates a Flytectl config file in Flyte directory i.e ~/.flyte. -Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html - +Generate Sandbox config: :: flytectl config init -Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +Read more about the Sandbox deployment :ref:` + "`here `" + `. + +Generate remote cluster config: :: flytectl config init --host=flyte.myexample.com -Generates remote cluster config with insecure connection +By default, the connection is secure. +Read more about remote deployment :ref:` + "`here `" + `. + +Generate remote cluster config with insecure connection: :: flytectl config init --host=flyte.myexample.com --insecure -Generates FlyteCTL config with a storage provider +Generate Flytectl config with a storage provider: :: flytectl config init --host=flyte.myexample.com --storage diff --git a/flytectl/cmd/create/create.go b/flytectl/cmd/create/create.go index 20cbefb54e..81b029c5bf 100644 --- a/flytectl/cmd/create/create.go +++ b/flytectl/cmd/create/create.go @@ -9,7 +9,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - createCmdShort = `Create various Flyte resources including tasks/workflows/launchplans/executions/project.` + createCmdShort = `Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` createCmdLong = ` Create Flyte resource; if a project: :: diff --git a/flytectl/cmd/create/create_test.go b/flytectl/cmd/create/create_test.go index a33201cf12..40b8d5d861 100644 --- a/flytectl/cmd/create/create_test.go +++ b/flytectl/cmd/create/create_test.go @@ -27,7 +27,7 @@ var tearDownAndVerify = testutils.TearDownAndVerify func TestCreateCommand(t *testing.T) { createCommand := RemoteCreateCommand() assert.Equal(t, createCommand.Use, "create") - assert.Equal(t, createCommand.Short, "Create various Flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, createCommand.Short, "Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects.") assert.Equal(t, len(createCommand.Commands()), 2) cmdNouns := createCommand.Commands() // Sort by Use value. @@ -39,5 +39,5 @@ func TestCreateCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Short, executionShort) assert.Equal(t, cmdNouns[1].Use, "project") assert.Equal(t, cmdNouns[1].Aliases, []string{"projects"}) - assert.Equal(t, cmdNouns[1].Short, "Create project resources") + assert.Equal(t, cmdNouns[1].Short, "Creates project resources.") } diff --git a/flytectl/cmd/create/execution.go b/flytectl/cmd/create/execution.go index 263046389e..3693c97424 100644 --- a/flytectl/cmd/create/execution.go +++ b/flytectl/cmd/create/execution.go @@ -11,90 +11,83 @@ import ( ) const ( - executionShort = "Create execution resources" + executionShort = "Creates execution resources." executionLong = ` -Creates executions for a given workflow/task in a project and domain. +Create execution resources for a given workflow or task in a project and domain. -There are three steps in generating an execution: - -- Generate the execution spec file using the get command. -- Update the inputs for the execution if needed. -- Run the execution by passing in the generated yaml file. - -The spec file should be generated first and then, the execution should be run using the spec file. -You can reference the FlyteCTL get task for more details. +There are three steps to generate an execution, as outlined below: +1. Generate the execution spec file using the :ref:` + "`get task `" + ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this: +The generated file would look similar to the following: .. code-block:: yaml - iamRoleARN: "" - inputs: - sorted_list1: - - 0 - sorted_list2: - - 0 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - - -The generated file can be modified to change the input values. + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +2. [Optional] Update the inputs for the execution, if needed. +The generated spec file can be modified to change the input values, as shown below: .. code-block:: yaml - iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' - inputs: - sorted_list1: - - 2 - - 4 - - 6 - sorted_list2: - - 1 - - 3 - - 5 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - -It can then be passed through the command line. -Notice that the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to the task/launch plans project/domain. - + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +3. Run the execution by passing the generated YAML file. +The file can then be passed through the command line. +It is worth noting that the source's and target's project and domain can be different. :: - flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -Also, an execution can be relaunched by passing in the current execution id. +To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. -See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. +To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. -The spec file should be generated first and then, the execution should be run using the spec file. +See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details. + +Generic data types are supported for execution in a similar manner. +The following is an example of how generic data can be specified while creating the execution. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. - +The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: iamRoleARN: "" @@ -107,7 +100,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add +Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -149,7 +142,7 @@ type ExecutionConfig struct { 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 + // Non plfag section is read from the execution config generated by get task/launch plan Workflow string `json:"workflow,omitempty"` Task string `json:"task,omitempty"` Inputs map[string]interface{} `json:"inputs" pflag:"-"` diff --git a/flytectl/cmd/create/execution_test.go b/flytectl/cmd/create/execution_test.go index 49ff720f6a..d671e0f5b0 100644 --- a/flytectl/cmd/create/execution_test.go +++ b/flytectl/cmd/create/execution_test.go @@ -253,5 +253,5 @@ func TestCreateExecutionFuncInvalid(t *testing.T) { executionConfig.ExecFile = testDataFolder + "invalid_execution_spec.yaml" err = createExecutionCommand(ctx, args, cmdCtx) assert.NotNil(t, err) - assert.Equal(t, fmt.Errorf("either one of task or workflow name should be specified to launch an execution"), err) + assert.Equal(t, fmt.Errorf("either task or workflow name should be specified to launch an execution"), err) } diff --git a/flytectl/cmd/create/execution_util.go b/flytectl/cmd/create/execution_util.go index f2f7bdd60f..82adaf6110 100644 --- a/flytectl/cmd/create/execution_util.go +++ b/flytectl/cmd/create/execution_util.go @@ -216,7 +216,7 @@ func readConfigAndValidate(project string, domain string) (ExecutionParams, erro isTask := readExecutionConfig.Task != "" isWorkflow := readExecutionConfig.Workflow != "" if isTask == isWorkflow { - return executionParams, fmt.Errorf("either one of task or workflow name should be specified" + + return executionParams, fmt.Errorf("either task or workflow name should be specified" + " to launch an execution") } name := readExecutionConfig.Task diff --git a/flytectl/cmd/create/project.go b/flytectl/cmd/create/project.go index 95c4909c59..b0bb4eba73 100644 --- a/flytectl/cmd/create/project.go +++ b/flytectl/cmd/create/project.go @@ -13,18 +13,22 @@ import ( ) const ( - projectShort = "Create project resources" + projectShort = "Creates project resources." projectLong = ` -Create projects.(project/projects can be used interchangeably in these commands) +Create a project given its name and id. :: - flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +.. note:: + The terms project/projects are interchangeable in these commands. + +Create a project by definition file. -Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml @@ -33,8 +37,10 @@ Create a project by definition file. Note: The name shouldn't contain any whites labels: values: app: flyte - description: "Some description for the project" + description: "Some description for the project." +.. note:: + The project name shouldn't contain any whitespace characters. ` ) @@ -65,6 +71,6 @@ func createProjectsCommand(ctx context.Context, args []string, cmdCtx cmdCore.Co return err } } - fmt.Println("project Created successfully") + fmt.Println("project created successfully.") return nil } diff --git a/flytectl/cmd/create/project_test.go b/flytectl/cmd/create/project_test.go index 867894c4b7..538fd70f62 100644 --- a/flytectl/cmd/create/project_test.go +++ b/flytectl/cmd/create/project_test.go @@ -44,7 +44,7 @@ func createProjectSetup() { func TestCreateProjectFunc(t *testing.T) { setup() createProjectSetup() - defer tearDownAndVerify(t, "project Created successfully") + defer tearDownAndVerify(t, "project created successfully.") project.DefaultProjectConfig.ID = projectValue project.DefaultProjectConfig.Name = projectValue project.DefaultProjectConfig.Labels = map[string]string{} @@ -75,6 +75,6 @@ func TestEmptyProjectName(t *testing.T) { project.DefaultProjectConfig.Description = "" mockClient.OnRegisterProjectMatch(ctx, projectRegisterRequest).Return(nil, nil) err := createProjectsCommand(ctx, args, cmdCtx) - assert.Equal(t, fmt.Errorf("project name is required flag"), err) + assert.Equal(t, fmt.Errorf("project name is a required flag"), err) mockClient.AssertNotCalled(t, "RegisterProject", ctx, mock.Anything) } diff --git a/flytectl/cmd/delete/delete.go b/flytectl/cmd/delete/delete.go index 14969e9aeb..fa51fd2fbb 100644 --- a/flytectl/cmd/delete/delete.go +++ b/flytectl/cmd/delete/delete.go @@ -15,7 +15,7 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - deleteCmdShort = `Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project.` + deleteCmdShort = `Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` deleteCmdLong = ` Delete a resource; if an execution: :: diff --git a/flytectl/cmd/delete/execution.go b/flytectl/cmd/delete/execution.go index 12a0e268fc..fab4cbe5d0 100644 --- a/flytectl/cmd/delete/execution.go +++ b/flytectl/cmd/delete/execution.go @@ -13,19 +13,19 @@ import ( // Long descriptions are whitespace sensitive when generating docs using Sphinx. const ( - execCmdShort = `Terminate/Delete execution resources.` + execCmdShort = `Terminates/deletes 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. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. - +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED, or SUCCEEDED, calling terminate on them has no effect. Terminate a single execution with its name: :: flytectl delete execution c6a51x2l9e -d development -p flytesnacks -Get executions to check its state: +.. note:: + The terms execution/executions are interchangeable in these commands. + +Get an execution to check its state: :: @@ -41,7 +41,7 @@ Terminate multiple executions with their names: flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Get executions to find the state of previously terminated executions: +Get an execution to find the state of previously terminated executions: :: @@ -75,7 +75,7 @@ func terminateExecutionFunc(ctx context.Context, args []string, cmdCtx cmdCore.C }, }) if err != nil { - logger.Errorf(ctx, "Failed in terminating execution of %v execution due to %v ", name, err) + logger.Errorf(ctx, "Failed to terminate execution of %v execution due to %v ", name, err) return err } } diff --git a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go index 8b4b6fb4dc..d94a71741a 100644 --- a/flytectl/cmd/delete/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_cluster_resource_attribute.go @@ -11,36 +11,35 @@ import ( ) const ( - clusterResourceAttributesShort = "Delete matchable resources of cluster attributes" + clusterResourceAttributesShort = "Deletes matchable resources of cluster attributes." clusterResourceAttributesLong = ` -Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. +Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used to create it. -Here, the config file is written to cra.yaml. -Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of cra.yaml: +To delete cluster resource attribute using the config file that was used to create it, run: :: flytectl delete cluster-resource-attribute --attrFile cra.yaml +For example, here's the config file cra.yaml: .. code-block:: yaml - + domain: development project: flytectldemo attributes: foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: diff --git a/flytectl/cmd/delete/matchable_execution_cluster_label.go b/flytectl/cmd/delete/matchable_execution_cluster_label.go index e8ed9c04ae..ff88f7a788 100644 --- a/flytectl/cmd/delete/matchable_execution_cluster_label.go +++ b/flytectl/cmd/delete/matchable_execution_cluster_label.go @@ -11,34 +11,32 @@ import ( ) const ( - executionClusterLabelShort = "Delete matchable resources of execution cluster label" + executionClusterLabelShort = "Deletes matchable resources of execution cluster label." executionClusterLabelLong = ` -Deletes execution cluster label for given project and domain combination or additionally with workflow name. +Delete execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete execution-cluster-label -p flytectldemo -d development + flytectl delete execution-cluster-label -p flytectldemo -d development - -Deletes execution cluster label using config file which was used for creating it. -Here, the config file is written to ecl.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of ecl.yaml: +To delete execution cluster label using the config file that was used to create it, run: :: flytectl delete execution-cluster-label --attrFile ecl.yaml +For example, here's the config file ecl.yaml: .. code-block:: yaml - + domain: development project: flytectldemo value: foo -Deletes execution cluster label for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete the execution cluster label of the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following: :: diff --git a/flytectl/cmd/delete/matchable_execution_queue_attribute.go b/flytectl/cmd/delete/matchable_execution_queue_attribute.go index d3b77a62c5..0c222065ac 100644 --- a/flytectl/cmd/delete/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/delete/matchable_execution_queue_attribute.go @@ -11,25 +11,22 @@ import ( ) const ( - executionQueueAttributesShort = "Delete matchable resources of execution queue attributes" + executionQueueAttributesShort = "Deletes matchable resources of execution queue attributes." executionQueueAttributesLong = ` -Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. +Delete execution queue attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete execution-queue-attribute -p flytectldemo -d development + flytectl delete execution-queue-attribute -p flytectldemo -d development - -Deletes execution queue attribute using config file which was used for creating it. -Here, the config file is written to era.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of era.yaml: +Delete execution queue attribute using the config file which was used to create it. :: flytectl delete execution-queue-attribute --attrFile era.yaml +For example, here's the config file era.yaml: .. code-block:: yaml @@ -41,8 +38,9 @@ e.g., content of era.yaml: - buzz - lightyear -Deletes execution queue attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update and delete commands. + +To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_plugin_override.go b/flytectl/cmd/delete/matchable_plugin_override.go index 80b46b35db..c96493cd91 100644 --- a/flytectl/cmd/delete/matchable_plugin_override.go +++ b/flytectl/cmd/delete/matchable_plugin_override.go @@ -11,24 +11,22 @@ import ( ) const ( - pluginOverrideShort = "Delete matchable resources of plugin overrides" + pluginOverrideShort = "Deletes matchable resources of plugin overrides." pluginOverrideLong = ` -Deletes plugin override for the given project and domain combination or additionally with workflow name. +Delete plugin override for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete plugin-override -p flytectldemo -d development + flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used to create it. -Here, the config file is written to po.yaml. -Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of po.yaml: +To delete plugin override using the config file which was used to create it, run: :: flytectl delete plugin-override --attrFile po.yaml +For example, here's the config file po.yaml: .. code-block:: yaml @@ -41,8 +39,9 @@ e.g., content of po.yaml: - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_task_resource_attribute.go b/flytectl/cmd/delete/matchable_task_resource_attribute.go index 90cd11e48f..903c1f7dc8 100644 --- a/flytectl/cmd/delete/matchable_task_resource_attribute.go +++ b/flytectl/cmd/delete/matchable_task_resource_attribute.go @@ -11,25 +11,22 @@ import ( ) const ( - taskResourceAttributesShort = "Delete matchable resources of task attributes" + taskResourceAttributesShort = "Deletes matchable resources of task attributes." taskResourceAttributesLong = ` -Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. +Delete task resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete task-resource-attribute -p flytectldemo -d development + flytectl delete task-resource-attribute -p flytectldemo -d development - -Deletes task resource attribute using config file which was used to create it. -Here, the config file is written to tra.yaml. -The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of tra.yaml: +To delete task resource attribute using the config file which was used to create it, run: :: flytectl delete task-resource-attribute --attrFile tra.yaml +For example, here's the config file tra.yaml: .. code-block:: yaml @@ -42,8 +39,9 @@ e.g., content of tra.yaml: cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command: :: diff --git a/flytectl/cmd/delete/matchable_workflow_execution_config.go b/flytectl/cmd/delete/matchable_workflow_execution_config.go index ee9b612712..4aa47acc23 100644 --- a/flytectl/cmd/delete/matchable_workflow_execution_config.go +++ b/flytectl/cmd/delete/matchable_workflow_execution_config.go @@ -12,34 +12,32 @@ import ( ) const ( - workflowExecutionConfigShort = "Delete matchable resources of workflow execution config" + workflowExecutionConfigShort = "Deletes matchable resources of workflow execution config." workflowExecutionConfigLong = ` -Deletes workflow execution config for the given project and domain combination or additionally with workflow name. +Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete workflow-execution-config -p flytectldemo -d development + flytectl delete workflow-execution-config -p flytectldemo -d development - -Deletes workflow execution config using config file which was used to create it. -Here, the config file is written to wec.yaml. -Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of wec.yaml: +To delete workflow execution config using the config file which was used to create it, run: :: flytectl delete workflow-execution-config --attrFile wec.yaml +For example, here's the config file wec.yaml: .. code-block:: yaml - + domain: development project: flytectldemo max_parallelism: 5 -Deletes workflow execution config for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update and delete commands. + +To delete workflow execution config for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: diff --git a/flytectl/cmd/get/execution.go b/flytectl/cmd/get/execution.go index 3c53b714b2..657d283499 100644 --- a/flytectl/cmd/get/execution.go +++ b/flytectl/cmd/get/execution.go @@ -15,57 +15,59 @@ import ( ) const ( - executionShort = "Get execution resources" + executionShort = "Gets execution resources." executionLong = ` -Retrieve all executions within the project and domain (execution, executions can be used interchangeably): +Retrieve all executions within the project and domain. :: flytectl get execution -p flytesnacks -d development -Retrieve executions by name within the project and domain: +.. note:: + The terms execution/executions are interchangeable in these commands. +Retrieve executions by name within the project and domain. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieve all the executions with filters: +Retrieve all the executions with filters. :: flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters: +Retrieve executions as per the specified limit and sorting parameters. :: flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions present in other pages by specifying the limit and page number: +Retrieve executions present in other pages by specifying the limit and page number. :: flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 -Retrieve executions within the project and domain in YAML format: +Retrieve executions within the project and domain in YAML format. :: flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format: +Retrieve executions within the project and domain in JSON format. :: flytectl get execution -p flytesnacks -d development -o json -Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. +Get more details of the execution using the --details flag, which shows node and task executions. +The default view is a tree view, and the TABLE view format is not supported on this view. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. - +Fetch execution details in YAML format. In this view, only node details are available. For task, pass the --nodeID flag. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml @@ -76,7 +78,7 @@ Fetch task executions on a specific node using the --nodeID flag. Use the nodeID flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. +Task execution view is available in YAML/JSON format too. The following example showcases YAML, where the output contains input and output data of each node. :: diff --git a/flytectl/cmd/get/get.go b/flytectl/cmd/get/get.go index 181444afec..2e0792166d 100644 --- a/flytectl/cmd/get/get.go +++ b/flytectl/cmd/get/get.go @@ -19,9 +19,9 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - getCmdShort = `Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.` + getCmdShort = `Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects.` getCmdLong = ` -For project, it is: +To fetch a project, use the following command: :: flytectl get project diff --git a/flytectl/cmd/get/get_test.go b/flytectl/cmd/get/get_test.go index bf22c762f1..e92d7c1261 100644 --- a/flytectl/cmd/get/get_test.go +++ b/flytectl/cmd/get/get_test.go @@ -40,7 +40,7 @@ const ( func TestCreateGetCommand(t *testing.T) { getCommand := CreateGetCommand() assert.Equal(t, getCommand.Use, "get") - assert.Equal(t, getCommand.Short, "Fetch various Flyte resources including tasks/workflows/launchplans/executions/project.") + assert.Equal(t, getCommand.Short, "Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects.") fmt.Println(getCommand.Commands()) assert.Equal(t, len(getCommand.Commands()), 11) cmdNouns := getCommand.Commands() diff --git a/flytectl/cmd/get/launch_plan.go b/flytectl/cmd/get/launch_plan.go index 047965ebf4..65071c2f7c 100644 --- a/flytectl/cmd/get/launch_plan.go +++ b/flytectl/cmd/get/launch_plan.go @@ -15,13 +15,16 @@ import ( ) const ( - launchPlanShort = "Get launch plan resources" + launchPlanShort = "Gets the launch plan resources." launchPlanLong = ` -Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): +Retrieve all launch plans within the project and domain: :: flytectl get launchplan -p flytesnacks -d development +.. note:: + The terms launchplan/launchplans are interchangeable in these commands. + Retrieve a launch plan by name within the project and domain: :: @@ -80,7 +83,7 @@ Retrieve all launch plans the within the project and domain in JSON format: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: +Retrieve a launch plan within the project and domain as per a version and generates the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: @@ -102,8 +105,7 @@ The generated file would look similar to this: version: v3 workflow: core.advanced.run_merge_sort.merge_sort -Check the create execution section on how to launch one using the generated file. - +Check the :ref:` + "`create execution section`" + ` on how to launch one using the generated file. Usage ` ) diff --git a/flytectl/cmd/get/matchable_cluster_resource_attribute.go b/flytectl/cmd/get/matchable_cluster_resource_attribute.go index 9682ec271d..89830dfec8 100644 --- a/flytectl/cmd/get/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/get/matchable_cluster_resource_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - clusterResourceAttributesShort = "Get matchable resources of cluster resource attributes." + clusterResourceAttributesShort = "Gets matchable resources of cluster resource attributes." clusterResourceAttributesLong = ` -Retrieves cluster resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve cluster resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attributes for the given project, domain, and workflow. +Retrieve cluster resource attributes for the given project, domain, and workflow. For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. -Here, the config file is written to cra.yaml file: -e.g., content of cra.yaml +Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +The config file is written to cra.yaml file. +Example: content of cra.yaml: :: diff --git a/flytectl/cmd/get/matchable_execution_cluster_label.go b/flytectl/cmd/get/matchable_execution_cluster_label.go index a8ebb50514..c665a48db0 100644 --- a/flytectl/cmd/get/matchable_execution_cluster_label.go +++ b/flytectl/cmd/get/matchable_execution_cluster_label.go @@ -11,36 +11,36 @@ import ( ) const ( - executionClusterLabelShort = "Get matchable resources of execution cluster label." + executionClusterLabelShort = "Gets matchable resources of execution cluster label." executionClusterLabelLong = ` -Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieve the execution cluster label for a given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g., output from the command +The output would look like: .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieve the execution cluster label for the given project, domain and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution cluster label for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. -Here, the config file is written to ecl.yaml, -e.g., content of ecl.yaml: +The config file is written to ecl.yaml file. +Example: content of ecl.yaml: :: diff --git a/flytectl/cmd/get/matchable_execution_queue_attribute.go b/flytectl/cmd/get/matchable_execution_queue_attribute.go index 34b73c139e..796b405d0d 100644 --- a/flytectl/cmd/get/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/get/matchable_execution_queue_attribute.go @@ -11,35 +11,35 @@ import ( ) const ( - executionQueueAttributesShort = "Get matchable resources of execution queue attributes" + executionQueueAttributesShort = "Gets matchable resources of execution queue attributes." executionQueueAttributesLong = ` -Retrieves the execution queue attribute for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the execution queue attribute for the given project and domain. +For project flytectldemo and development domain: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the config file is written to era.yaml, -e.g., content of era.yaml: +The config file is written to era.yaml file. +Example: content of era.yaml: :: diff --git a/flytectl/cmd/get/matchable_plugin_override.go b/flytectl/cmd/get/matchable_plugin_override.go index eb8e0fdd0c..eaac3d0dee 100644 --- a/flytectl/cmd/get/matchable_plugin_override.go +++ b/flytectl/cmd/get/matchable_plugin_override.go @@ -11,16 +11,16 @@ import ( ) const ( - pluginOverrideShort = "Get matchable resources of plugin override" + pluginOverrideShort = "Gets matchable resources of plugin override." pluginOverrideLong = ` -Retrieves the plugin override for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the plugin override for the given project and domain. +For project flytectldemo and development domain: :: flytectl get plugin-override -p flytectldemo -d development -e.g., output from the command +Example: output from the command .. code-block:: json @@ -34,14 +34,13 @@ e.g., output from the command }] } -Retrieves the plugin override for the given project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: - +Retrieve the plugin override for the given project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -56,9 +55,9 @@ e.g., output from the command: }] } -Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. -Here, the config file is written to po.yaml, -e.g., content of po.yaml: +Write plugin overrides to a file. If there are no plugin overrides, the command throws an error. +The config file is written to po.yaml file. +Example: content of po.yaml: :: diff --git a/flytectl/cmd/get/matchable_task_resource_attribute.go b/flytectl/cmd/get/matchable_task_resource_attribute.go index 6636976350..63ef50da19 100644 --- a/flytectl/cmd/get/matchable_task_resource_attribute.go +++ b/flytectl/cmd/get/matchable_task_resource_attribute.go @@ -11,27 +11,27 @@ import ( ) const ( - taskResourceAttributesShort = "Get matchable resources of task attributes" + taskResourceAttributesShort = "Gets matchable resources of task attributes." taskResourceAttributesLong = ` -Retrieves task resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve task resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g., output from the command: +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -39,8 +39,8 @@ e.g., output from the command: Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here, the config file is written to tra.yaml, -e.g., content of tra.yaml: +The config file is written to tra.yaml file. +Example: content of tra.yaml: :: diff --git a/flytectl/cmd/get/matchable_workflow_execution_config.go b/flytectl/cmd/get/matchable_workflow_execution_config.go index afb1d3b0f8..6adfd5ebca 100644 --- a/flytectl/cmd/get/matchable_workflow_execution_config.go +++ b/flytectl/cmd/get/matchable_workflow_execution_config.go @@ -12,17 +12,17 @@ import ( ) const ( - workflowExecutionConfigShort = "Get matchable resources of workflow execution config" + workflowExecutionConfigShort = "Gets matchable resources of workflow execution config." workflowExecutionConfigLong = ` -Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. +Retrieve workflow execution config for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get workflow-execution-config -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -32,14 +32,14 @@ e.g., output from the command "max_parallelism": 5 } -Retrieves workflow execution config for the project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve workflow execution config for the project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -50,9 +50,9 @@ e.g., output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. -Here, the config file is written to wec.yaml, -e.g., content of wec.yaml: +Write the workflow execution config to a file. If there are no workflow execution config, the command throws an error. +The config file is written to wec.yaml file. +Example: content of wec.yaml: :: diff --git a/flytectl/cmd/get/project.go b/flytectl/cmd/get/project.go index 03f1826059..092935c59c 100644 --- a/flytectl/cmd/get/project.go +++ b/flytectl/cmd/get/project.go @@ -15,13 +15,16 @@ import ( ) const ( - projectShort = "Get project resources" + projectShort = "Gets project resources" projectLong = ` -Retrieve all the projects. (project,projects can be used interchangeably in these commands): +Retrieve all the projects: :: flytectl get project +.. note:: + The terms project/projects are interchangeable in these commands. + Retrieve project by name: :: diff --git a/flytectl/cmd/get/task.go b/flytectl/cmd/get/task.go index dfb03c337c..d4226d86dd 100644 --- a/flytectl/cmd/get/task.go +++ b/flytectl/cmd/get/task.go @@ -14,13 +14,17 @@ import ( ) const ( - taskShort = "Get task resources" + taskShort = "Gets task resources" taskLong = ` -Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): + +Retrieve all the tasks within project and domain: :: flytectl get task -p flytesnacks -d development +.. note:: + The terms task/tasks are interchangeable in these commands. + Retrieve task by name within project and domain: :: diff --git a/flytectl/cmd/get/workflow.go b/flytectl/cmd/get/workflow.go index 1a51974b75..f2b3650250 100644 --- a/flytectl/cmd/get/workflow.go +++ b/flytectl/cmd/get/workflow.go @@ -16,9 +16,9 @@ import ( ) const ( - workflowShort = "Get workflow resources" + workflowShort = "Gets workflow resources" workflowLong = ` -Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): +Retrieve all the workflows within project and domain (workflow/workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development diff --git a/flytectl/cmd/register/examples.go b/flytectl/cmd/register/examples.go index 845dcc417c..8d1434294e 100644 --- a/flytectl/cmd/register/examples.go +++ b/flytectl/cmd/register/examples.go @@ -13,9 +13,9 @@ import ( ) const ( - registerExampleShort = "Register Flytesnacks example" + registerExampleShort = "Registers Flytesnacks example." registerExampleLong = ` -Register all latest Flytesnacks examples: +Register all the latest Flytesnacks examples: :: flytectl register examples -d development -p flytesnacks @@ -25,7 +25,9 @@ Register specific release of Flytesnacks examples: flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: The register command automatically override the version with release version +.. note:: + The register command automatically override the version with release version. + Usage ` ) diff --git a/flytectl/cmd/register/files.go b/flytectl/cmd/register/files.go index b6ac2c980a..c66ceddf7a 100644 --- a/flytectl/cmd/register/files.go +++ b/flytectl/cmd/register/files.go @@ -14,31 +14,39 @@ import ( ) const ( - registerFilesShort = "Register file resources" + registerFilesShort = "Registers file resources." registerFilesLong = ` -Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +Registers all the serialized protobuf files including tasks, workflows and launch plans with default v1 version. + If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: flytectl register file _pb_output/* -d development -p flytesnacks - -There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. + +As per Flytectl, registration and fast registration mean the same! + +In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. +When the user runs pyflyte with --fast flag, then pyflyte creates serialized proto and the source code archive file in the same directory. +Flytectl finds the input file by searching for an archive file whose name starts with "fast" and has .tar.gz extension. +If Flytectl finds any source code in users' input, it considers the registration as fast registration. + +SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. +If s3, Flytectl will upload the code base to s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 - -In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 + +In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. +Instead, it will override the destination path on the registration. :: - flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" - -Using archive file. Currently supported extensions are .tgz and .tar. They can be local or remote files served through http/https. -Use --archive flag: + flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" + +To register a .tgz or .tar file, use the --archive flag. They can be local or remote files served through http/https. :: - flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive + flytectl register files http://localhost:8080/_pb_output.tar -d development -p flytesnacks --archive Using local tgz file: diff --git a/flytectl/cmd/register/register.go b/flytectl/cmd/register/register.go index 469a3811a9..a04c99bd19 100644 --- a/flytectl/cmd/register/register.go +++ b/flytectl/cmd/register/register.go @@ -9,11 +9,11 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - registerCmdShort = "Register tasks/workflows/launchplans from a list of generated serialized files." + registerCmdShort = "Registers tasks, workflows, and launch plans from a list of generated serialized files." registercmdLong = ` -Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Take input files as serialized versions of the tasks/workflows/launchplans and register them with FlyteAdmin. Currently, these input files are protobuf files generated as output from Flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +Project and Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. If the entities are already registered with Flyte for the same version, the registration would fail. ` ) diff --git a/flytectl/cmd/register/register_test.go b/flytectl/cmd/register/register_test.go index cf3b725fcd..871fc2523b 100644 --- a/flytectl/cmd/register/register_test.go +++ b/flytectl/cmd/register/register_test.go @@ -27,7 +27,7 @@ var setup = u.Setup func TestRegisterCommand(t *testing.T) { registerCommand := RemoteRegisterCommand() assert.Equal(t, registerCommand.Use, "register") - assert.Equal(t, registerCommand.Short, "Register tasks/workflows/launchplans from a list of generated serialized files.") + assert.Equal(t, registerCommand.Short, "Registers tasks, workflows, and launch plans from a list of generated serialized files.") fmt.Println(registerCommand.Commands()) assert.Equal(t, len(registerCommand.Commands()), 2) cmdNouns := registerCommand.Commands() @@ -38,9 +38,9 @@ func TestRegisterCommand(t *testing.T) { assert.Equal(t, cmdNouns[0].Use, "examples") assert.Equal(t, cmdNouns[0].Aliases, []string{"example", "flytesnack", "flytesnacks"}) - assert.Equal(t, cmdNouns[0].Short, "Register Flytesnacks example") + assert.Equal(t, cmdNouns[0].Short, "Registers Flytesnacks example.") assert.Equal(t, cmdNouns[1].Use, "files") assert.Equal(t, cmdNouns[1].Aliases, []string{"file"}) - assert.Equal(t, cmdNouns[1].Short, "Register file resources") + assert.Equal(t, cmdNouns[1].Short, "Registers file resources.") } diff --git a/flytectl/cmd/root.go b/flytectl/cmd/root.go index f9286950b7..dba5b8f85a 100644 --- a/flytectl/cmd/root.go +++ b/flytectl/cmd/root.go @@ -42,8 +42,8 @@ const ( func newRootCmd() *cobra.Command { rootCmd := &cobra.Command{ PersistentPreRunE: initConfig, - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/sandbox/exec.go b/flytectl/cmd/sandbox/exec.go index 98f584aa64..327d2e4f23 100644 --- a/flytectl/cmd/sandbox/exec.go +++ b/flytectl/cmd/sandbox/exec.go @@ -9,11 +9,13 @@ import ( ) const ( - execShort = "Execute non-interactive command inside the sandbox container" + execShort = "Executes non-interactive command inside the sandbox container" execLong = ` -Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. +Run non-interactive commands inside the sandbox container and immediately return the output. +By default, "flytectl exec" is present in the /root directory inside the sandbox container. :: + flytectl sandbox exec -- ls -al Usage` diff --git a/flytectl/cmd/sandbox/sandbox.go b/flytectl/cmd/sandbox/sandbox.go index ea639fa4a4..26e9453f7e 100644 --- a/flytectl/cmd/sandbox/sandbox.go +++ b/flytectl/cmd/sandbox/sandbox.go @@ -8,28 +8,27 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - sandboxShort = `Used for sandbox interactions like start/teardown/status/exec.` + sandboxShort = `Helps with sandbox interactions like start, teardown, status, and exec.` sandboxLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Create sandbox cluster: +To create a sandbox cluster, run: :: flytectl sandbox start - - -Remove sandbox cluster: + +To remove a sandbox cluster, run: :: - flytectl sandbox teardown - + flytectl sandbox teardown -Check status of sandbox container: +To check the status of the sandbox container, run: :: - flytectl sandbox status - -Execute command inside sandbox container: + flytectl sandbox status + +To execute commands inside the sandbox container, use exec: :: flytectl sandbox exec -- pwd diff --git a/flytectl/cmd/sandbox/sandbox_test.go b/flytectl/cmd/sandbox/sandbox_test.go index ee615c08ce..0692a08930 100644 --- a/flytectl/cmd/sandbox/sandbox_test.go +++ b/flytectl/cmd/sandbox/sandbox_test.go @@ -11,7 +11,7 @@ import ( func TestCreateSandboxCommand(t *testing.T) { sandboxCommand := CreateSandboxCommand() assert.Equal(t, sandboxCommand.Use, "sandbox") - assert.Equal(t, sandboxCommand.Short, "Used for sandbox interactions like start/teardown/status/exec.") + assert.Equal(t, sandboxCommand.Short, "Helps with sandbox interactions like start, teardown, status, and exec.") fmt.Println(sandboxCommand.Commands()) assert.Equal(t, len(sandboxCommand.Commands()), 4) cmdNouns := sandboxCommand.Commands() diff --git a/flytectl/cmd/sandbox/start.go b/flytectl/cmd/sandbox/start.go index ece842beb8..979e666788 100644 --- a/flytectl/cmd/sandbox/start.go +++ b/flytectl/cmd/sandbox/start.go @@ -31,33 +31,35 @@ import ( ) const ( - startShort = "Start the Flyte Sandbox cluster" + startShort = "Starts the Flyte sandbox cluster." startLong = ` -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte sandbox is a fully standalone minimal environment for running Flyte. +It provides a simplified way of running Flyte sandbox as a single Docker container locally. -Start sandbox cluster without any source code: +Starts the sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox: +Mounts your source code repository inside the sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +Runs a specific version of Flyte. Flytectl sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +.. note:: + Flytectl Sandbox is only supported for Flyte versions > v0.10.0. -Run latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl sandbox start --pre -Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: diff --git a/flytectl/cmd/sandbox/status.go b/flytectl/cmd/sandbox/status.go index bff5230c11..49e5fb77b7 100644 --- a/flytectl/cmd/sandbox/status.go +++ b/flytectl/cmd/sandbox/status.go @@ -10,9 +10,9 @@ import ( ) const ( - statusShort = "Get status of the sandbox environment." + statusShort = "Gets the status of the sandbox environment." statusLong = ` -Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. +Retrieves the status of the sandbox environment. Currently, Flyte sandbox runs as a local Docker container. Usage :: diff --git a/flytectl/cmd/sandbox/teardown.go b/flytectl/cmd/sandbox/teardown.go index bce078b788..bbdfa303c6 100644 --- a/flytectl/cmd/sandbox/teardown.go +++ b/flytectl/cmd/sandbox/teardown.go @@ -17,9 +17,9 @@ import ( ) const ( - teardownShort = "Teardown cleans up the sandbox environment" + teardownShort = "Cleans up the sandbox environment" teardownLong = ` -Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: +Removes the Sandbox cluster and all the Flyte config created by 'sandbox start': :: flytectl sandbox teardown diff --git a/flytectl/cmd/update/execution.go b/flytectl/cmd/update/execution.go index cd8a7ad209..a32d4cddc4 100644 --- a/flytectl/cmd/update/execution.go +++ b/flytectl/cmd/update/execution.go @@ -14,14 +14,14 @@ import ( ) const ( - updateExecutionShort = "Update execution status" + updateExecutionShort = "Updates the execution status" updateExecutionLong = ` -Activating an execution shows it in the cli and UI: +Activate an execution; and it shows up in the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate -Archiving execution hides it from cli and UI: +Archive an execution; and it is hidden from the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive diff --git a/flytectl/cmd/update/launch_plan.go b/flytectl/cmd/update/launch_plan.go index 0c2a3267dd..51552fbf8a 100644 --- a/flytectl/cmd/update/launch_plan.go +++ b/flytectl/cmd/update/launch_plan.go @@ -14,14 +14,14 @@ import ( ) const ( - updateLPShort = "Update launch plan status" + updateLPShort = "Updates launch plan status" updateLPLong = ` -Activating launch plan activates the scheduled job associated with it: +Activates a launch plan which activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launch plan deschedules any scheduled job associated with it: +Archives a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive diff --git a/flytectl/cmd/update/launch_plan_meta.go b/flytectl/cmd/update/launch_plan_meta.go index d2a9678667..c3efa3b254 100644 --- a/flytectl/cmd/update/launch_plan_meta.go +++ b/flytectl/cmd/update/launch_plan_meta.go @@ -11,7 +11,7 @@ import ( ) const ( - updateLPMetaShort = "Update launch plan metadata" + updateLPMetaShort = "Updates the launch plan metadata" updateLPMetaLong = ` Update the description on the launch plan: :: diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute.go b/flytectl/cmd/update/matchable_cluster_resource_attribute.go index 2e8f2a2077..7da3bc3c1c 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute.go @@ -12,11 +12,11 @@ import ( const ( clusterResourceAttributesShort = "Update matchable resources of cluster attributes" clusterResourceAttributesLong = ` -Updates cluster resource attributes for given project and domain combination or additionally with workflow name. +Update cluster resource attributes for given project and domain combination or additionally with workflow name. Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. It takes input for cluster resource attributes from the config file cra.yaml, -e.g., content of cra.yaml: +Example: content of cra.yaml: .. code-block:: yaml @@ -30,7 +30,7 @@ e.g., content of cra.yaml: flytectl update cluster-resource-attribute --attrFile cra.yaml -Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Update cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. diff --git a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go index 8cb13ee340..e354541d26 100644 --- a/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go +++ b/flytectl/cmd/update/matchable_cluster_resource_attribute_test.go @@ -27,7 +27,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("attrFile is mandatory while calling update for cluster resource attribute"), err) tearDownAndVerify(t, ``) }) - t.Run("successful update project domain attribute", func(t *testing.T) { + t.Run("successfully updated project domain attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" @@ -38,7 +38,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) tearDownAndVerify(t, ``) }) - t.Run("failed update project domain attribute", func(t *testing.T) { + t.Run("failed to update project domain attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_project_domain_cluster_attribute.yaml" @@ -50,7 +50,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Equal(t, fmt.Errorf("failed to update attributes"), err) tearDownAndVerify(t, ``) }) - t.Run("successful update workflow attribute", func(t *testing.T) { + t.Run("successfully updated workflow attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" @@ -61,7 +61,7 @@ func TestUpdateClusterResourceAttributes(t *testing.T) { assert.Nil(t, err) tearDownAndVerify(t, ``) }) - t.Run("failed update workflow attribute", func(t *testing.T) { + t.Run("failed to update workflow attribute", func(t *testing.T) { setup() updateClusterResourceAttributeSetup() clusterresourceattribute.DefaultUpdateConfig.AttrFile = "testdata/valid_workflow_cluster_attribute.yaml" diff --git a/flytectl/cmd/update/matchable_execution_cluster_label.go b/flytectl/cmd/update/matchable_execution_cluster_label.go index 2c03815468..223001cdfb 100644 --- a/flytectl/cmd/update/matchable_execution_cluster_label.go +++ b/flytectl/cmd/update/matchable_execution_cluster_label.go @@ -12,11 +12,11 @@ import ( const ( executionClusterLabelShort = "Update matchable resources of execution cluster label" executionClusterLabelLong = ` -Updates execution cluster label for the given project and domain combination or additionally with workflow name. +Update execution cluster label for the given project and domain combination or additionally with workflow name. Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. It takes input for execution cluster label from the config file ecl.yaml -e.g., content of ecl.yaml: +Example: content of ecl.yaml: .. code-block:: yaml @@ -28,7 +28,7 @@ e.g., content of ecl.yaml: flytectl update execution-cluster-label --attrFile ecl.yaml -Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other +Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_execution_queue_attribute.go b/flytectl/cmd/update/matchable_execution_queue_attribute.go index 4d85146680..e324fee2e0 100644 --- a/flytectl/cmd/update/matchable_execution_queue_attribute.go +++ b/flytectl/cmd/update/matchable_execution_queue_attribute.go @@ -12,14 +12,14 @@ import ( const ( executionQueueAttributesShort = "Update matchable resources of execution queue attributes" executionQueueAttributesLong = ` -Updates execution queue attributes for the given project and domain combination or additionally with workflow name. +Update execution queue attributes for the given project and domain combination or additionally with workflow name. Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file It takes input for execution queue attributes from the config file era.yaml, -e.g., content of era.yaml: +Example: content of era.yaml: .. code-block:: yaml @@ -35,7 +35,7 @@ e.g., content of era.yaml: flytectl update execution-queue-attribute --attrFile era.yaml -Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other +Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_plugin_override.go b/flytectl/cmd/update/matchable_plugin_override.go index 2dfca66113..52a2837ab8 100644 --- a/flytectl/cmd/update/matchable_plugin_override.go +++ b/flytectl/cmd/update/matchable_plugin_override.go @@ -12,14 +12,14 @@ import ( const ( pluginOverrideShort = "Update matchable resources of plugin overrides" pluginOverrideLong = ` -Updates plugin overrides for given project and domain combination or additionally with workflow name. +Update plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +This will completely overwrite any existing plugins overrides on custom project, domain, and workflow combination. It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file It takes input for plugin overrides from the config file po.yaml, -e.g., content of po.yaml: +Example: content of po.yaml: .. code-block:: yaml @@ -36,7 +36,7 @@ e.g., content of po.yaml: flytectl update plugin-override --attrFile po.yaml -Updates plugin override for project, domain and workflow combination. This will take precedence over any other +Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_task_resource_attribute.go b/flytectl/cmd/update/matchable_task_resource_attribute.go index f7bb45ce67..7b3e72cfda 100644 --- a/flytectl/cmd/update/matchable_task_resource_attribute.go +++ b/flytectl/cmd/update/matchable_task_resource_attribute.go @@ -12,14 +12,14 @@ import ( const ( taskResourceAttributesShort = "Update matchable resources of task attributes" taskResourceAttributesLong = ` -Updates task resource attributes for the given project and domain combination or additionally with workflow name. +Updates the task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. Refer to get task-resource-attribute section on how to generate this file. It takes input for task resource attributes from the config file tra.yaml, -e.g., content of tra.yaml: +Example: content of tra.yaml: .. code-block:: yaml @@ -36,7 +36,7 @@ e.g., content of tra.yaml: flytectl update task-resource-attribute --attrFile tra.yaml -Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other +Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/matchable_workflow_execution_config.go b/flytectl/cmd/update/matchable_workflow_execution_config.go index 740685ef2b..57e20c065d 100644 --- a/flytectl/cmd/update/matchable_workflow_execution_config.go +++ b/flytectl/cmd/update/matchable_workflow_execution_config.go @@ -11,16 +11,16 @@ import ( ) const ( - workflowExecutionConfigShort = "Update matchable resources of workflow execution config" + workflowExecutionConfigShort = "Updates matchable resources of workflow execution config" workflowExecutionConfigLong = ` -Updates workflow execution config for given project and domain combination or additionally with workflow name. +Updates the workflow execution config for the given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. This will completely overwrite any existing custom project and domain and workflow combination execution config. It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. Refer to get workflow-execution-config section on how to generate this file. It takes input for workflow execution config from the config file wec.yaml, -e.g., content of wec.yaml: +Example: content of wec.yaml: .. code-block:: yaml @@ -32,7 +32,7 @@ e.g., content of wec.yaml: flytectl update workflow-execution-config --attrFile wec.yaml -Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other +Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/cmd/update/project.go b/flytectl/cmd/update/project.go index d63bcb80d3..0da542b763 100644 --- a/flytectl/cmd/update/project.go +++ b/flytectl/cmd/update/project.go @@ -15,7 +15,7 @@ import ( const ( projectShort = "Update project resources" projectLong = ` -Updates the project according to the flags passed. Allows you to archive or activate a project. +Update the project according to the flags passed. Allows you to archive or activate a project. Activate project flytesnacks: :: diff --git a/flytectl/cmd/update/project_test.go b/flytectl/cmd/update/project_test.go index b6b16702b6..db1f52c7cd 100644 --- a/flytectl/cmd/update/project_test.go +++ b/flytectl/cmd/update/project_test.go @@ -75,7 +75,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated due to Error Updating Project\n") + tearDownAndVerify(t, "Project dummyProject failed to update due to Error Updating Project\n") } func TestArchiveProjectFunc(t *testing.T) { @@ -118,7 +118,7 @@ func TestArchiveProjectFuncWithError(t *testing.T) { err = updateProjectsFunc(ctx, args, cmdCtx) assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) - tearDownAndVerify(t, "Project dummyProject failed to get updated"+ + tearDownAndVerify(t, "Project dummyProject failed to update"+ " due to Error Updating Project\n") } diff --git a/flytectl/cmd/update/task_meta.go b/flytectl/cmd/update/task_meta.go index 8c599710b2..80f2b6c7b0 100644 --- a/flytectl/cmd/update/task_meta.go +++ b/flytectl/cmd/update/task_meta.go @@ -13,7 +13,7 @@ import ( const ( updateTaskShort = "Update task metadata" updateTaskLong = ` -Updates the description on the task: +Update the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" diff --git a/flytectl/cmd/update/update.go b/flytectl/cmd/update/update.go index ef1c2b66a8..7f48226b0c 100644 --- a/flytectl/cmd/update/update.go +++ b/flytectl/cmd/update/update.go @@ -21,8 +21,8 @@ const ( updateShort = `Update Flyte resources e.g., project.` updatecmdLong = ` Currently, this command only provides subcommands to update project. -Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -To update a project: +Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +Update Flyte resources; if a project: :: flytectl update project -p flytesnacks --activateProject diff --git a/flytectl/cmd/update/workflow_meta.go b/flytectl/cmd/update/workflow_meta.go index af4cb3fe7d..f84c1e87e4 100644 --- a/flytectl/cmd/update/workflow_meta.go +++ b/flytectl/cmd/update/workflow_meta.go @@ -13,7 +13,7 @@ import ( const ( updateWorkflowShort = "Update workflow metadata" updateWorkflowLong = ` -Updates the description on the workflow: +Update the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" diff --git a/flytectl/cmd/upgrade/upgrade.go b/flytectl/cmd/upgrade/upgrade.go index 89963b3b71..eb1dde2b3e 100644 --- a/flytectl/cmd/upgrade/upgrade.go +++ b/flytectl/cmd/upgrade/upgrade.go @@ -26,21 +26,23 @@ type Goos string // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - upgradeCmdShort = `Upgrade/rollback to a Flyte version` + upgradeCmdShort = `Upgrades/rollbacks to a Flyte version.` upgradeCmdLong = ` -For FlyteCTL, it is: +For Flytectl, it is: :: flytectl upgrade -Note: Please use upgrade with sudo. Without sudo it will cause permission issue. +.. note:: + Please upgrade with sudo. Failing to do so may result in a permission issues. -Rollback flytectl binary: +Rollback Flytectl binary: :: flytectl upgrade rollback -Note: Upgrade is not available on windows. +.. note:: + Upgrade is not available on Windows. ` rollBackSubCommand = "rollback" ) @@ -115,7 +117,7 @@ func isUpgradeSupported(goos platformutil.Platform) (bool, error) { if isGreater, err := util.IsVersionGreaterThan(latest, stdlibversion.Version); err != nil { return false, err } else if !isGreater { - fmt.Println("You already have the latest version of flytectl") + fmt.Println("You already have the latest version of Flytectl") return false, nil } diff --git a/flytectl/cmd/upgrade/upgrade_test.go b/flytectl/cmd/upgrade/upgrade_test.go index d89f93aecf..473621bb9e 100644 --- a/flytectl/cmd/upgrade/upgrade_test.go +++ b/flytectl/cmd/upgrade/upgrade_test.go @@ -27,8 +27,8 @@ var ( func TestUpgradeCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/cmd/version/version.go b/flytectl/cmd/version/version.go index 2f5d9f3f62..927ca755f5 100644 --- a/flytectl/cmd/version/version.go +++ b/flytectl/cmd/version/version.go @@ -19,9 +19,9 @@ import ( // Long descriptions are whitespace sensitive when generating docs using sphinx. const ( - versionCmdShort = `Fetch Flyte version` + versionCmdShort = `Fetches Flyte version` versionCmdLong = ` -For FlyteCTL version, it is: +Fetch Flytectl version. :: flytectl version @@ -55,11 +55,11 @@ func getVersion(ctx context.Context, args []string, cmdCtx cmdCore.CommandContex goos := platformutil.Platform(runtime.GOOS) version, err := githubutil.FlytectlReleaseConfig.GetLatestVersion() if err != nil { - logger.Error(ctx, "Not able to get latest version because %v", err) + logger.Error(ctx, "Unable to get the latest version because %v", err) } else { message, err := githubutil.GetUpgradeMessage(version, goos) if err != nil { - logger.Error(ctx, "Not able to detect new version because %v", err) + logger.Error(ctx, "Unable to detect a new version because %v", err) } if len(message) > 0 { fmt.Println(message) @@ -97,14 +97,14 @@ func getControlPlaneVersion(ctx context.Context, cmdCtx cmdCore.CommandContext) logger.Debugf(ctx, "Failed to get version of control plane %v: \n", err) return err } - // Print Flyteadmin + // Print FlyteAdmin if err := printVersion(versionOutput{ Build: v.ControlPlaneVersion.Build, BuildTime: v.ControlPlaneVersion.BuildTime, Version: v.ControlPlaneVersion.Version, App: controlPlanAppName, }); err != nil { - return fmt.Errorf("not able to get control plane version..Please try again: %v", err) + return fmt.Errorf("Unable to get the control plane version. Please try again: %v", err) } return nil } diff --git a/flytectl/cmd/version/version_test.go b/flytectl/cmd/version/version_test.go index 8bc2511a3a..0be22c97c2 100644 --- a/flytectl/cmd/version/version_test.go +++ b/flytectl/cmd/version/version_test.go @@ -31,8 +31,8 @@ var ( func TestVersionCommand(t *testing.T) { rootCmd := &cobra.Command{ - Long: "FlyteCTL is CLI tool written in go to interact with Flyteadmin service", - Short: "FlyteCTL CLI tool", + Long: "Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service.", + Short: "Flytectl CLI tool", Use: "flytectl", DisableAutoGenTag: true, } diff --git a/flytectl/docs/source/conf.py b/flytectl/docs/source/conf.py index aeaa2ae410..419e02fd71 100644 --- a/flytectl/docs/source/conf.py +++ b/flytectl/docs/source/conf.py @@ -190,4 +190,5 @@ # intersphinx configuration intersphinx_mapping = { "flyteidl": ("https://docs.flyte.org/projects/flyteidl/en/latest", None), + "flyte": ("https://docs.flyte.org/en/latest", None), } diff --git a/flytectl/docs/source/config.rst b/flytectl/docs/source/config.rst index dd558c988c..1bf12d6016 100644 --- a/flytectl/docs/source/config.rst +++ b/flytectl/docs/source/config.rst @@ -6,8 +6,6 @@ It specifies the actions to be performed on the resource 'config'. :maxdepth: 1 :caption: Config - gen/flytectl_config_validate - gen/flytectl_config_init gen/flytectl_config_validate gen/flytectl_config_init gen/flytectl_config_discover diff --git a/flytectl/docs/source/contribute.rst b/flytectl/docs/source/contribute.rst index 864fda4e61..9859618635 100644 --- a/flytectl/docs/source/contribute.rst +++ b/flytectl/docs/source/contribute.rst @@ -3,7 +3,7 @@ Contributing Guide ########################### First off, thank you for thinking about contributing! -Below you’ll find instructions that will hopefully guide you through how to contribute to, fix, and improve FlyteCTL. +Here are the instructions that will guide you through contributing, fixing, and improving Flytectl. 📝 Contribute to Documentation ============================== @@ -12,25 +12,25 @@ Docs are generated using Sphinx and are available at [flytectl.rtfd.io](https:// To update the documentation, follow these steps: -1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder -2. Make modifications in the `cmd `__ folder -3. Run ``make gendocs`` from within the `docs `__ folder -4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder) +1. Install the requirements by running ``pip install -r doc-requirements.txt`` in the root folder. +2. Make modifications in the `cmd `__ folder. +3. Run ``make gendocs`` from within the `docs `__ folder. +4. Open html files produced by Sphinx in your browser to verify if the changes look as expected (html files can be found in the ``docs/build/html`` folder). 💻 Contribute Code ================== -1. Run ``make compile`` in the root directory to compile the code -2. Set up a local cluster by running ``./bin/flytectl sandbox start`` in the root directory -3. Run ``flytectl get project`` to see if things are working -4. Run the command you want to test in the terminal +1. Run ``make compile`` in the root directory to compile the code. +2. Set up a local cluster by running ``./bin/flytectl sandbox start`` in the root directory. +3. Run ``flytectl get project`` to see if things are working. +4. Run the command you want to test in the terminal. 5. If you want to update the command (add additional options, change existing options, etc.): * Navigate to `cmd `__ directory - * Each sub-directory points to a command, for example, ``create`` points to ``flytectl create ...`` + * Each sub-directory points to a command, e.g., ``create`` points to ``flytectl create ...`` * Here are the directories you can navigate to: - .. list-table:: FlyteCTL cmd directories + .. list-table:: Flytectl cmd directories :widths: 25 25 50 :header-rows: 1 @@ -42,32 +42,31 @@ To update the documentation, follow these steps: - Common package for all commands; has root flags * - ``configuration`` - ``flytectl configuration ...`` - - Command to validate/generate flytectl config + - Validates/generates Flytectl config * - ``create`` - ``flytectl create ...`` - - Command to create a project/execution + - Creates a project/execution * - ``delete`` - ``flytectl delete ...`` - - Command to abort an execution and delete resource attributes + - Aborts an execution and deletes the resource attributes * - ``get`` - ``flytectl get ...`` - - Command to get a task/workflow/launchplan/execution/project/resource's-attributes + - Gets a task/workflow/launchplan/execution/project/resource attribute * - ``register`` - ``flytectl register ...`` - - Command to register a task/workflow/launchplan + - Registers a task/workflow/launchplan * - ``sandbox`` - ``flytectl sandbox ...`` - - Command to interact with sandbox + - Interacts with sandbox * - ``update`` - ``flytectl update ...`` - - Command to update a project/launchplan/resource's-attributes + - Updates a project/launchplan/resource attribute * - ``upgrade`` - ``flytectl upgrade ...`` - - Command to upgrade/rollback FlyteCTL version + - Upgrades/rollbacks Flytectl version * - ``version`` - ``flytectl version ...`` - - Command to fetch FlyteCTL version + - Fetches Flytectl version + Find all the Flytectl commands :ref:`here `. + * Run appropriate tests to view the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` in the root directory. - Find all FlyteCTL commands on the `Nouns `__ page. - * Run appropriate tests to test the changes by running ``go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v`` - in the root directory \ No newline at end of file diff --git a/flytectl/docs/source/examples.rst b/flytectl/docs/source/examples.rst index b57b7e5965..35993115b4 100644 --- a/flytectl/docs/source/examples.rst +++ b/flytectl/docs/source/examples.rst @@ -1,6 +1,6 @@ Examples ------- -It specifies the actions to be performed on the resource 'examples'. +--------- +It specifies the actions to be performed on the 'examples' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/execution-cluster-label.rst b/flytectl/docs/source/execution-cluster-label.rst index 2a27e87e52..9daa792840 100644 --- a/flytectl/docs/source/execution-cluster-label.rst +++ b/flytectl/docs/source/execution-cluster-label.rst @@ -1,6 +1,6 @@ Execution cluster label ----------------------- -It specifies the actions to be performed on the resource 'execution-cluster-label'. +It specifies the actions to be performed on the 'execution-cluster-label' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/execution-queue-attribute.rst b/flytectl/docs/source/execution-queue-attribute.rst index 207118cdb9..cbffa7537b 100644 --- a/flytectl/docs/source/execution-queue-attribute.rst +++ b/flytectl/docs/source/execution-queue-attribute.rst @@ -1,6 +1,6 @@ Execution queue attribute ------- -It specifies the actions to be performed on the resource 'execution-queue-attribute'. +-------------------------- +It specifies the actions to be performed on the 'execution-queue-attribute' resource. .. toctree:: :maxdepth: 1 @@ -9,6 +9,3 @@ It specifies the actions to be performed on the resource 'execution-queue-attrib gen/flytectl_get_execution-queue-attribute gen/flytectl_delete_execution-queue-attribute gen/flytectl_update_execution-queue-attribute - gen/flytectl_get_execution-queue-attribute - gen/flytectl_delete_execution-queue-attribute - gen/flytectl_update_execution-queue-attribute diff --git a/flytectl/docs/source/execution.rst b/flytectl/docs/source/execution.rst index 4e3d1cbff3..2669831019 100644 --- a/flytectl/docs/source/execution.rst +++ b/flytectl/docs/source/execution.rst @@ -1,6 +1,6 @@ Execution --------- -It specifies the actions to be performed on the resource 'execution'. +It specifies the actions to be performed on the 'execution' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/files.rst b/flytectl/docs/source/files.rst index 96f2b861d9..f02fb03950 100644 --- a/flytectl/docs/source/files.rst +++ b/flytectl/docs/source/files.rst @@ -1,6 +1,6 @@ Files ------ -It specifies the actions to be performed on the resource 'files'. +It specifies the actions to be performed on the 'file' resource. .. toctree:: :maxdepth: 1 @@ -8,4 +8,4 @@ It specifies the actions to be performed on the resource 'files'. gen/flytectl_register_files -Note: It allows the user to register local files. +Note: It allows the user to register local files. diff --git a/flytectl/docs/source/gen/flytectl.rst b/flytectl/docs/source/gen/flytectl.rst index f3cf8c06f6..6d7693e09a 100644 --- a/flytectl/docs/source/gen/flytectl.rst +++ b/flytectl/docs/source/gen/flytectl.rst @@ -3,13 +3,13 @@ flytectl -------- -FlyteCTL CLI tool +Flytectl CLI tool Synopsis ~~~~~~~~ -FlyteCTL is CLI tool written in go to interact with Flyteadmin service +Flytectl is a CLI tool written in Go to interact with the FlyteAdmin service. Options ~~~~~~~ @@ -61,14 +61,14 @@ Options SEE ALSO ~~~~~~~~ -* :doc:`flytectl_completion` - Generate completion script +* :doc:`flytectl_completion` - Generates completion script. * :doc:`flytectl_config` - Runs various config commands, look at the help of this command to get a list of available commands.. -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. * :doc:`flytectl_update` - Update Flyte resources e.g., project. -* :doc:`flytectl_upgrade` - Upgrade/rollback to a Flyte version -* :doc:`flytectl_version` - Fetch Flyte version +* :doc:`flytectl_upgrade` - Upgrades/rollbacks to a Flyte version. +* :doc:`flytectl_version` - Fetches Flyte version diff --git a/flytectl/docs/source/gen/flytectl_completion.rst b/flytectl/docs/source/gen/flytectl_completion.rst index 33dea6e177..e9a33b0ae6 100644 --- a/flytectl/docs/source/gen/flytectl_completion.rst +++ b/flytectl/docs/source/gen/flytectl_completion.rst @@ -3,50 +3,70 @@ flytectl completion ------------------- -Generate completion script +Generates completion script. Synopsis ~~~~~~~~ -To load completions: +To load completion, run the following commands in accordance with the shell you are using: -Bash: +- Bash + :: - $ source <(flytectl completion bash) + $ source <(flytectl completion bash) - # To load completions for each session, execute once: - # Linux: - $ flytectl completion bash > /etc/bash_completion.d/flytectl - # macOS: - $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl + To load completions for each session: -Zsh: + - Linux + :: - # If shell completion is not already enabled in your environment, - # you will need to enable it. You can execute the following once: + $ flytectl completion bash > /etc/bash_completion.d/flytectl - $ echo "autoload -U compinit; compinit" >> ~/.zshrc + - macOS + :: - # To load completions for each session, execute once: - $ flytectl completion zsh > "${fpath[1]}/_flytectl" + $ flytectl completion bash > /usr/local/etc/bash_completion.d/flytectl - # You will need to start a new shell for this setup to take effect. +- Zsh + If shell completion is not already enabled in your environment, enable it: -fish: + :: - $ flytectl completion fish | source + $ echo "autoload -U compinit; compinit" >> ~/.zshrc - # To load completions for each session, execute once: - $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + Once enabled, execute once: -PowerShell: + :: - PS> flytectl completion powershell | Out-String | Invoke-Expression + $ flytectl completion zsh > "${fpath[1]}/_flytectl" - # To load completions for every new session, run: - PS> flytectl completion powershell > flytectl.ps1 - # and source this file from your PowerShell profile. + .. note:: + Start a new shell for this setup to take effect. + +- fish + :: + + $ flytectl completion fish | source + + To load completions for each session, run: + + :: + + $ flytectl completion fish > ~/.config/fish/completions/flytectl.fish + +- PowerShell + :: + + PS> flytectl completion powershell | Out-String | Invoke-Expression + + To load completions for each session, run: + + :: + + PS> flytectl completion powershell > flytectl.ps1 + + and source this file from your PowerShell profile. :: @@ -109,5 +129,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/gen/flytectl_config.rst b/flytectl/docs/source/gen/flytectl_config.rst index 56b8782bb7..86138b2491 100644 --- a/flytectl/docs/source/gen/flytectl_config.rst +++ b/flytectl/docs/source/gen/flytectl_config.rst @@ -69,9 +69,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_config_discover` - Searches for a config in one of the default search paths. * :doc:`flytectl_config_docs` - Generate configuration documetation in rst format -* :doc:`flytectl_config_init` - Generates FlyteCTL config file in the user's home directory. +* :doc:`flytectl_config_init` - Generates a Flytectl config file in the user's home directory. * :doc:`flytectl_config_validate` - Validates the loaded config. diff --git a/flytectl/docs/source/gen/flytectl_config_init.rst b/flytectl/docs/source/gen/flytectl_config_init.rst index a7274917da..26c1eae2ac 100644 --- a/flytectl/docs/source/gen/flytectl_config_init.rst +++ b/flytectl/docs/source/gen/flytectl_config_init.rst @@ -3,33 +3,38 @@ flytectl config init -------------------- -Generates FlyteCTL config file in the user's home directory. +Generates a Flytectl config file in the user's home directory. Synopsis ~~~~~~~~ -Creates a FlyteCTL config file in Flyte directory i.e ~/.flyte +Creates a Flytectl config file in Flyte directory i.e ~/.flyte. -Generates sandbox config. Flyte Sandbox is a fully standalone minimal environment for running Flyte. Read more about sandbox https://docs.flyte.org/en/latest/deployment/sandbox.html - +Generate Sandbox config: :: flytectl config init -Generates remote cluster config, By default connection is secure. Read more about the remote deployment https://docs.flyte.org/en/latest/deployment/index.html +Flyte Sandbox is a fully standalone minimal environment for running Flyte. +Read more about the Sandbox deployment :ref:`here `. + +Generate remote cluster config: :: flytectl config init --host=flyte.myexample.com -Generates remote cluster config with insecure connection +By default, the connection is secure. +Read more about remote deployment :ref:`here `. + +Generate remote cluster config with insecure connection: :: flytectl config init --host=flyte.myexample.com --insecure -Generates FlyteCTL config with a storage provider +Generate Flytectl config with a storage provider: :: flytectl config init --host=flyte.myexample.com --storage diff --git a/flytectl/docs/source/gen/flytectl_create.rst b/flytectl/docs/source/gen/flytectl_create.rst index 1fcc9387db..3839af1a4a 100644 --- a/flytectl/docs/source/gen/flytectl_create.rst +++ b/flytectl/docs/source/gen/flytectl_create.rst @@ -3,7 +3,7 @@ flytectl create --------------- -Create various Flyte resources including tasks/workflows/launchplans/executions/project. +Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ @@ -72,7 +72,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_create_execution` - Create execution resources -* :doc:`flytectl_create_project` - Create project resources +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_create_execution` - Creates execution resources. +* :doc:`flytectl_create_project` - Creates project resources. diff --git a/flytectl/docs/source/gen/flytectl_create_execution.rst b/flytectl/docs/source/gen/flytectl_create_execution.rst index 9e0d33530e..c7cfc199ba 100644 --- a/flytectl/docs/source/gen/flytectl_create_execution.rst +++ b/flytectl/docs/source/gen/flytectl_create_execution.rst @@ -3,95 +3,88 @@ flytectl create execution ------------------------- -Create execution resources +Creates execution resources. Synopsis ~~~~~~~~ -Creates executions for a given workflow/task in a project and domain. +Create execution resources for a given workflow or task in a project and domain. -There are three steps in generating an execution: - -- Generate the execution spec file using the get command. -- Update the inputs for the execution if needed. -- Run the execution by passing in the generated yaml file. - -The spec file should be generated first and then, the execution should be run using the spec file. -You can reference the FlyteCTL get task for more details. +There are three steps to generate an execution, as outlined below: +1. Generate the execution spec file using the :ref:`get task ` command. :: - flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml + flytectl get tasks -d development -p flytectldemo core.advanced.run_merge_sort.merge --version v2 --execFile execution_spec.yaml -The generated file would look similar to this: +The generated file would look similar to the following: .. code-block:: yaml - iamRoleARN: "" - inputs: - sorted_list1: - - 0 - sorted_list2: - - 0 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - - -The generated file can be modified to change the input values. + iamRoleARN: "" + inputs: + sorted_list1: + - 0 + sorted_list2: + - 0 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +2. [Optional] Update the inputs for the execution, if needed. +The generated spec file can be modified to change the input values, as shown below: .. code-block:: yaml - iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' - inputs: - sorted_list1: - - 2 - - 4 - - 6 - sorted_list2: - - 1 - - 3 - - 5 - kubeServiceAcct: "" - targetDomain: "" - targetProject: "" - task: core.advanced.run_merge_sort.merge - version: "v2" - -It can then be passed through the command line. -Notice that the source and target domain/projects can be different. -The root project and domain flags of -p and -d should point to the task/launch plans project/domain. - + iamRoleARN: 'arn:aws:iam::12345678:role/defaultrole' + inputs: + sorted_list1: + - 2 + - 4 + - 6 + sorted_list2: + - 1 + - 3 + - 5 + kubeServiceAcct: "" + targetDomain: "" + targetProject: "" + task: core.advanced.run_merge_sort.merge + version: "v2" + +3. Run the execution by passing the generated YAML file. +The file can then be passed through the command line. +It is worth noting that the source's and target's project and domain can be different. :: - flytectl create execution --execFile execution_spec.yaml -p flytectldemo -d development --targetProject flytesnacks + flytectl create execution --execFile execution_spec.yaml -p flytesnacks -d staging --targetProject flytesnacks -Also, an execution can be relaunched by passing in the current execution id. +To relaunch an execution, pass the current execution ID as follows: :: flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development -An execution can be recovered, i.e., recreated from the last known failure point for previously-run workflow execution. -See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. +To recover an execution, i.e., recreate it from the last known failure point for previously-run workflow execution, run: :: flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytectldemo -d development -Generic data types are also supported for execution in a similar manner. Following is a sample of how the inputs need to be specified while creating the execution. -The spec file should be generated first and then, the execution should be run using the spec file. +See :ref:`ref_flyteidl.admin.ExecutionRecoverRequest` for more details. + +Generic data types are supported for execution in a similar manner. +The following is an example of how generic data can be specified while creating the execution. :: flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml -The generated file would look similar to this. Here, empty values have been dumped for generic data type x and y. - +The generated file would look similar to this. Here, empty values have been dumped for generic data types 'x' and 'y'. :: iamRoleARN: "" @@ -104,7 +97,7 @@ The generated file would look similar to this. Here, empty values have been dump task: core.type_system.custom_objects.add version: v3 -Modified file with struct data populated for x and y parameters for the task core.type_system.custom_objects.add +Modified file with struct data populated for 'x' and 'y' parameters for the task "core.type_system.custom_objects.add": :: @@ -202,5 +195,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_create_project.rst b/flytectl/docs/source/gen/flytectl_create_project.rst index ba6b813e40..6cf6174288 100644 --- a/flytectl/docs/source/gen/flytectl_create_project.rst +++ b/flytectl/docs/source/gen/flytectl_create_project.rst @@ -3,23 +3,27 @@ flytectl create project ----------------------- -Create project resources +Creates project resources. Synopsis ~~~~~~~~ -Create projects.(project/projects can be used interchangeably in these commands) +Create a project given its name and id. :: - flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + flytectl create project --name flytesnacks --id flytesnacks --description "flytesnacks description" --labels app=flyte + +.. note:: + The terms project/projects are interchangeable in these commands. + +Create a project by definition file. -Create a project by definition file. Note: The name shouldn't contain any whitespace characters. :: - flytectl create project --file project.yaml + flytectl create project --file project.yaml .. code-block:: yaml @@ -28,8 +32,10 @@ Create a project by definition file. Note: The name shouldn't contain any whites labels: values: app: flyte - description: "Some description for the project" + description: "Some description for the project." +.. note:: + The project name shouldn't contain any whitespace characters. :: @@ -102,5 +108,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_create` - Create various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_create` - Creates various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete.rst b/flytectl/docs/source/gen/flytectl_delete.rst index 4bf0a412a6..c5a5d389fc 100644 --- a/flytectl/docs/source/gen/flytectl_delete.rst +++ b/flytectl/docs/source/gen/flytectl_delete.rst @@ -3,7 +3,7 @@ flytectl delete --------------- -Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ @@ -72,12 +72,12 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_delete_cluster-resource-attribute` - Delete matchable resources of cluster attributes -* :doc:`flytectl_delete_execution` - Terminate/Delete execution resources. -* :doc:`flytectl_delete_execution-cluster-label` - Delete matchable resources of execution cluster label -* :doc:`flytectl_delete_execution-queue-attribute` - Delete matchable resources of execution queue attributes -* :doc:`flytectl_delete_plugin-override` - Delete matchable resources of plugin overrides -* :doc:`flytectl_delete_task-resource-attribute` - Delete matchable resources of task attributes -* :doc:`flytectl_delete_workflow-execution-config` - Delete matchable resources of workflow execution config +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_delete_cluster-resource-attribute` - Deletes matchable resources of cluster attributes. +* :doc:`flytectl_delete_execution` - Terminates/deletes execution resources. +* :doc:`flytectl_delete_execution-cluster-label` - Deletes matchable resources of execution cluster label. +* :doc:`flytectl_delete_execution-queue-attribute` - Deletes matchable resources of execution queue attributes. +* :doc:`flytectl_delete_plugin-override` - Deletes matchable resources of plugin overrides. +* :doc:`flytectl_delete_task-resource-attribute` - Deletes matchable resources of task attributes. +* :doc:`flytectl_delete_workflow-execution-config` - Deletes matchable resources of workflow execution config. diff --git a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst index e606a9fd2e..0fdfa84c68 100644 --- a/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_cluster-resource-attribute.rst @@ -3,41 +3,40 @@ flytectl delete cluster-resource-attribute ------------------------------------------ -Delete matchable resources of cluster attributes +Deletes matchable resources of cluster attributes. Synopsis ~~~~~~~~ -Deletes cluster resource attributes for the given project and domain combination or additionally with workflow name. +Delete cluster resource attributes for the given project and domain, in combination with the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain, run: :: - flytectl delete cluster-resource-attribute -p flytectldemo -d development + flytectl delete cluster-resource-attribute -p flytectldemo -d development -Deletes cluster resource attribute using config file which was used to create it. -Here, the config file is written to cra.yaml. -Attributes are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of cra.yaml: +To delete cluster resource attribute using the config file that was used to create it, run: :: flytectl delete cluster-resource-attribute --attrFile cra.yaml +For example, here's the config file cra.yaml: .. code-block:: yaml - + domain: development project: flytectldemo attributes: foo: "bar" buzz: "lightyear" -Deletes cluster resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Attributes are optional in the file, which are unread during the 'delete' command but can be retained since the same file can be used for 'get', 'update' and 'delete' commands. + +To delete cluster resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run: :: @@ -108,5 +107,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst index de963af2ce..889e09a6fa 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-cluster-label.rst @@ -3,25 +3,25 @@ flytectl delete execution-cluster-label --------------------------------------- -Delete matchable resources of execution cluster label +Deletes matchable resources of execution cluster label. Synopsis ~~~~~~~~ -Deletes execution cluster label for given project and domain combination or additionally with workflow name. +Deletes execution cluster label for a given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete execution-cluster-label -p flytectldemo -d development -Deletes execution cluster label using config file which was used for creating it. +Delete execution cluster label using the config file that was used to create it. Here, the config file is written to ecl.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of ecl.yaml: +Value is optional in the file as it is unread during the delete command, but it can be retained since the same file can be used for 'get', 'update' or 'delete' commands. +Example: content of ecl.yaml: :: @@ -34,8 +34,8 @@ e.g., content of ecl.yaml: project: flytectldemo value: foo -Deletes execution cluster label for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete execution cluster label for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -106,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst index 30849c67d8..9909792dbe 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution-queue-attribute.rst @@ -3,25 +3,25 @@ flytectl delete execution-queue-attribute ----------------------------------------- -Delete matchable resources of execution queue attributes +Deletes matchable resources of execution queue attributes. Synopsis ~~~~~~~~ -Deletes execution queue attributes for the given project and domain combination or additionally with workflow name. +Delete execution queue attributes for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete execution-queue-attribute -p flytectldemo -d development -Deletes execution queue attribute using config file which was used for creating it. +Delete execution queue attribute using the config file which was used to create it. Here, the config file is written to era.yaml. -Value is optional in the file as it is unread during the delete command but it can be kept since the same file can be used for get, update or delete commands. -e.g., content of era.yaml: +Value is optional in the file as it is unread during the delete command but it can be retained since the same file can be used for get, update or delete commands. +Example: content of era.yaml: :: @@ -38,8 +38,8 @@ e.g., content of era.yaml: - buzz - lightyear -Deletes execution queue attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete execution queue attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -110,5 +110,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_execution.rst b/flytectl/docs/source/gen/flytectl_delete_execution.rst index 9831831e98..711b2a3ffd 100644 --- a/flytectl/docs/source/gen/flytectl_delete_execution.rst +++ b/flytectl/docs/source/gen/flytectl_delete_execution.rst @@ -3,24 +3,24 @@ flytectl delete execution ------------------------- -Terminate/Delete execution resources. +Terminates/deletes 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. If they are FAILED, ABORTED or SUCCEEDED, calling terminate on them has no effect. - +Task executions can be aborted only if they are in non-terminal state. If they are FAILED, ABORTED, or SUCCEEDED, calling terminate on them has no effect. Terminate a single execution with its name: :: flytectl delete execution c6a51x2l9e -d development -p flytesnacks -Get executions to check its state: +.. note:: + The terms execution/executions are interchangeable in these commands. + +Get an execution to check its state: :: @@ -36,7 +36,7 @@ Terminate multiple executions with their names: flytectl delete execution eeam9s8sny p4wv4hwgc4 -d development -p flytesnacks -Get executions to find the state of previously terminated executions: +Get an execution to find the state of previously terminated executions: :: @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst index e54b428707..9933f2c072 100644 --- a/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_delete_plugin-override.rst @@ -3,25 +3,25 @@ flytectl delete plugin-override ------------------------------- -Delete matchable resources of plugin overrides +Deletes matchable resources of plugin overrides. Synopsis ~~~~~~~~ -Deletes plugin override for the given project and domain combination or additionally with workflow name. +Delete plugin override for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete plugin-override -p flytectldemo -d development -Deletes plugin override using config file which was used to create it. +Delete plugin override using the config file which was used to create it. Here, the config file is written to po.yaml. -Overrides are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of po.yaml: +Overrides are optional in the file as they are unread during the delete command but can be retained since the same file can be used for get, update or delete commands. +Example: content of po.yaml: :: flytectl delete plugin-override --attrFile po.yaml @@ -38,8 +38,8 @@ e.g., content of po.yaml: - plugin_override2 missing_plugin_behavior: 1 # Behavior when no specified plugin_id has an associated handler. 0 : FAIL , 1: DEFAULT -Deletes plugin override for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete plugin override for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -110,5 +110,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst index 96f726900a..8664c34035 100644 --- a/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_delete_task-resource-attribute.rst @@ -3,16 +3,16 @@ flytectl delete task-resource-attribute --------------------------------------- -Delete matchable resources of task attributes +Deletes matchable resources of task attributes. Synopsis ~~~~~~~~ -Deletes task resource attributes for the given project and domain combination, or additionally with workflow name. +Deletes task resource attributes for the given project and domain combination, or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete task-resource-attribute -p flytectldemo -d development @@ -20,8 +20,8 @@ For project flytectldemo and development domain, it is: Deletes task resource attribute using config file which was used to create it. Here, the config file is written to tra.yaml. -The defaults/limits are optional in the file as they are unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of tra.yaml: +The defaults/limits are optional in the file as they are unread during the delete command, but can be retained since the same file can be used for 'get', 'update' or 'delete' commands. +Example: content of tra.yaml: :: @@ -39,8 +39,8 @@ e.g., content of tra.yaml: cpu: "2" memory: "450Mi" -Deletes task resource attribute for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Delete task resource attribute for a workflow. +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -111,5 +111,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst index fc586192f5..b584343e6f 100644 --- a/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_delete_workflow-execution-config.rst @@ -3,16 +3,16 @@ flytectl delete workflow-execution-config ----------------------------------------- -Delete matchable resources of workflow execution config +Deletes matchable resources of workflow execution config. Synopsis ~~~~~~~~ -Deletes workflow execution config for the given project and domain combination or additionally with workflow name. +Delete workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl delete workflow-execution-config -p flytectldemo -d development @@ -20,8 +20,8 @@ For project flytectldemo and development domain, it is: Deletes workflow execution config using config file which was used to create it. Here, the config file is written to wec.yaml. -Max_parallelism is optional in the file as it is unread during the delete command but can be kept since the same file can be used for get, update or delete commands. -e.g., content of wec.yaml: +Max_parallelism is optional in the file as it is unread during the delete command but can be retained since the same file can be used for get, update or delete commands. +Example: content of wec.yaml: :: @@ -35,7 +35,7 @@ e.g., content of wec.yaml: max_parallelism: 5 Deletes workflow execution config for a workflow. -For the workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +For the workflow 'core.control_flow.run_merge_sort.merge_sort': :: @@ -106,5 +106,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_delete` - Terminate/delete various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_delete` - Terminates/deletes various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get.rst b/flytectl/docs/source/gen/flytectl_get.rst index b129cecbb2..a61c75323c 100644 --- a/flytectl/docs/source/gen/flytectl_get.rst +++ b/flytectl/docs/source/gen/flytectl_get.rst @@ -3,14 +3,14 @@ flytectl get ------------ -Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. Synopsis ~~~~~~~~ -For project, it is: +Fetch Flyte resource; if a project: :: flytectl get project @@ -72,16 +72,16 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_get_cluster-resource-attribute` - Get matchable resources of cluster resource attributes. -* :doc:`flytectl_get_execution` - Get execution resources -* :doc:`flytectl_get_execution-cluster-label` - Get matchable resources of execution cluster label. -* :doc:`flytectl_get_execution-queue-attribute` - Get matchable resources of execution queue attributes -* :doc:`flytectl_get_launchplan` - Get launch plan resources -* :doc:`flytectl_get_plugin-override` - Get matchable resources of plugin override -* :doc:`flytectl_get_project` - Get project resources -* :doc:`flytectl_get_task` - Get task resources -* :doc:`flytectl_get_task-resource-attribute` - Get matchable resources of task attributes -* :doc:`flytectl_get_workflow` - Get workflow resources -* :doc:`flytectl_get_workflow-execution-config` - Get matchable resources of workflow execution config +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_get_cluster-resource-attribute` - Gets matchable resources of cluster resource attributes. +* :doc:`flytectl_get_execution` - Gets execution resources. +* :doc:`flytectl_get_execution-cluster-label` - Gets matchable resources of execution cluster label. +* :doc:`flytectl_get_execution-queue-attribute` - Gets matchable resources of execution queue attributes. +* :doc:`flytectl_get_launchplan` - Gets the launch plan resources. +* :doc:`flytectl_get_plugin-override` - Gets matchable resources of plugin override. +* :doc:`flytectl_get_project` - Gets project resources +* :doc:`flytectl_get_task` - Gets task resources +* :doc:`flytectl_get_task-resource-attribute` - Gets matchable resources of task attributes. +* :doc:`flytectl_get_workflow` - Gets workflow resources +* :doc:`flytectl_get_workflow-execution-config` - Gets matchable resources of workflow execution config. diff --git a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst index de78a8ceac..6ea320d7cf 100644 --- a/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_cluster-resource-attribute.rst @@ -3,40 +3,40 @@ flytectl get cluster-resource-attribute --------------------------------------- -Get matchable resources of cluster resource attributes. +Gets matchable resources of cluster resource attributes. Synopsis ~~~~~~~~ -Retrieves cluster resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve cluster resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get cluster-resource-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","attributes":{"buzz":"lightyear","foo":"bar"}} -Retrieves cluster resource attributes for the given project, domain, and workflow. +Retrieve cluster resource attributes for the given project, domain, and workflow. For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","attributes":{"buzz":"lightyear","foo":"bar"}} -Writes the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. -Here, the config file is written to cra.yaml file: -e.g., content of cra.yaml +Write the cluster resource attributes to a file. If there are no cluster resource attributes, the command throws an error. +The config file is written to cra.yaml file. +Example: content of cra.yaml: :: @@ -115,5 +115,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst index 84109db997..47309bf44f 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-cluster-label.rst @@ -3,41 +3,41 @@ flytectl get execution-cluster-label ------------------------------------ -Get matchable resources of execution cluster label. +Gets matchable resources of execution cluster label. Synopsis ~~~~~~~~ -Retrieves the execution cluster label for a given project and domain, combination or additionally with workflow name. +Retrieve the execution cluster label for a given project and domain, combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get execution-cluster-label -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","value":"foo"} -Retrieve the execution cluster label for the given project, domain and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution cluster label for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","value":"foo"} Write the execution cluster label to a file. If there is no execution cluster label, the command throws an error. -Here, the config file is written to ecl.yaml, -e.g., content of ecl.yaml: +The config file is written to ecl.yaml file. +Example: content of ecl.yaml: :: @@ -114,5 +114,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst index ecb63556bc..719ac51458 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution-queue-attribute.rst @@ -3,40 +3,40 @@ flytectl get execution-queue-attribute -------------------------------------- -Get matchable resources of execution queue attributes +Gets matchable resources of execution queue attributes. Synopsis ~~~~~~~~ -Retrieves the execution queue attribute for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the execution queue attribute for the given project and domain. +For project flytectldemo and development domain: :: flytectl get execution-queue-attribute -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","tags":["foo", "bar"]} -Retrieves the execution queue attribute for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve the execution queue attribute for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"core.control_flow.run_merge_sort.merge_sort","tags":["foo", "bar"]} Write the execution queue attribute to a file. If there are no execution queue attributes, the command throws an error. -Here, the config file is written to era.yaml, -e.g., content of era.yaml: +The config file is written to era.yaml file. +Example: content of era.yaml: :: @@ -117,5 +117,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_execution.rst b/flytectl/docs/source/gen/flytectl_get_execution.rst index e77bcb8dc0..ba5c4a0801 100644 --- a/flytectl/docs/source/gen/flytectl_get_execution.rst +++ b/flytectl/docs/source/gen/flytectl_get_execution.rst @@ -3,62 +3,64 @@ flytectl get execution ---------------------- -Get execution resources +Gets execution resources. Synopsis ~~~~~~~~ -Retrieve all executions within the project and domain (execution, executions can be used interchangeably): +Retrieve all executions within the project and domain. :: flytectl get execution -p flytesnacks -d development -Retrieve executions by name within the project and domain: +.. note:: + The terms execution/executions are interchangeable in these commands. +Retrieve executions by name within the project and domain. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r -Retrieve all the executions with filters: +Retrieve all the executions with filters. :: flytectl get execution -p flytesnacks -d development --filter.fieldSelector="execution.phase in (FAILED;SUCCEEDED),execution.duration<200" -Retrieve executions as per the specified limit and sorting parameters: +Retrieve executions as per the specified limit and sorting parameters. :: flytectl get execution -p flytesnacks -d development --filter.sortBy=created_at --filter.limit=1 --filter.asc -Retrieve executions present in other pages by specifying the limit and page number: +Retrieve executions present in other pages by specifying the limit and page number. :: flytectl get -p flytesnacks -d development execution --filter.limit=10 --filter.page=2 -Retrieve executions within the project and domain in YAML format: +Retrieve executions within the project and domain in YAML format. :: flytectl get execution -p flytesnacks -d development -o yaml -Retrieve executions within the project and domain in JSON format: +Retrieve executions within the project and domain in JSON format. :: flytectl get execution -p flytesnacks -d development -o json -Get more details of the execution using the --details flag, which shows node and task executions. The default view is a tree view, and the TABLE view format is not supported on this view. +Get more details of the execution using the --details flag, which shows node and task executions. +The default view is a tree view, and the TABLE view format is not supported on this view. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -Fetch execution details in YAML format. In this view, only node details are available. For task, send the --nodeID flag. - +Fetch execution details in YAML format. In this view, only node details are available. For task, pass the --nodeID flag. :: flytectl get execution -p flytesnacks -d development oeh94k9r2r --details -o yaml @@ -69,7 +71,7 @@ Fetch task executions on a specific node using the --nodeID flag. Use the nodeID flytectl get execution -p flytesnacks -d development oeh94k9r2r --nodeID n0 -Task execution view is also available in YAML/JSON format. The following example showcases YAML, where the output also contains input and output data of each node. +Task execution view is available in YAML/JSON format too. The following example showcases YAML, where the output contains input and output data of each node. :: @@ -145,5 +147,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_launchplan.rst b/flytectl/docs/source/gen/flytectl_get_launchplan.rst index 4a2e13a751..53c95cff78 100644 --- a/flytectl/docs/source/gen/flytectl_get_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_get_launchplan.rst @@ -3,18 +3,21 @@ flytectl get launchplan ----------------------- -Get launch plan resources +Gets the launch plan resources. Synopsis ~~~~~~~~ -Retrieve all launch plans within the project and domain (launch plan, launch plans can be used interchangeably): +Retrieve all launch plans within the project and domain: :: flytectl get launchplan -p flytesnacks -d development +.. note:: + The terms launch plan/launch plans are interchangeable in these commands. + Retrieve a launch plan by name within the project and domain: :: @@ -73,7 +76,7 @@ Retrieve all launch plans the within the project and domain in JSON format: flytectl get launchplan -p flytesnacks -d development -o json -Retrieve a launch plan within the project and domain as per a version and generate the execution spec file; the file can be used to launch the execution using the 'create execution' command: +Retrieve a launch plan within the project and domain as per a version and generates the execution spec file; the file can be used to launch the execution using the 'create execution' command: :: @@ -95,8 +98,7 @@ The generated file would look similar to this: version: v3 workflow: core.advanced.run_merge_sort.merge_sort -Check the create execution section on how to launch one using the generated file. - +Check the :ref:`create execution section` on how to launch one using the generated file. Usage @@ -169,5 +171,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst index eafa654f20..aa1ed4f7a1 100644 --- a/flytectl/docs/source/gen/flytectl_get_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_get_plugin-override.rst @@ -3,21 +3,21 @@ flytectl get plugin-override ---------------------------- -Get matchable resources of plugin override +Gets matchable resources of plugin override. Synopsis ~~~~~~~~ -Retrieves the plugin override for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve the plugin override for the given project and domain. +For project flytectldemo and development domain: :: flytectl get plugin-override -p flytectldemo -d development -e.g., output from the command +Example: output from the command .. code-block:: json @@ -31,14 +31,13 @@ e.g., output from the command }] } -Retrieves the plugin override for the given project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: - +Retrieve the plugin override for the given project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -53,9 +52,9 @@ e.g., output from the command: }] } -Write plugin overrides to a file. If there are no plugin overrides, the command returns an error. -Here, the config file is written to po.yaml, -e.g., content of po.yaml: +Write plugin overrides to a file. If there are no plugin overrides, the command throws an error. +The config file is written to po.yaml file. +Example: content of po.yaml: :: @@ -137,5 +136,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_project.rst b/flytectl/docs/source/gen/flytectl_get_project.rst index c1e67c5ce3..f917911908 100644 --- a/flytectl/docs/source/gen/flytectl_get_project.rst +++ b/flytectl/docs/source/gen/flytectl_get_project.rst @@ -3,18 +3,21 @@ flytectl get project -------------------- -Get project resources +Gets project resources Synopsis ~~~~~~~~ -Retrieve all the projects. (project,projects can be used interchangeably in these commands): +Retrieve all the projects: :: flytectl get project +.. note:: + The terms project/projects are interchangeable in these commands. + Retrieve project by name: :: @@ -116,5 +119,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst index 2bc62dd00a..7cdb8bc5ae 100644 --- a/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_get_task-resource-attribute.rst @@ -3,32 +3,32 @@ flytectl get task-resource-attribute ------------------------------------ -Get matchable resources of task attributes +Gets matchable resources of task attributes. Synopsis ~~~~~~~~ -Retrieves task resource attributes for the given project and domain. -For project flytectldemo and development domain, it is: +Retrieve task resource attributes for the given project and domain. +For project flytectldemo and development domain: :: flytectl get task-resource-attribute -p flytectldemo -d development -e.g., output from the command: +Example: output from the command: .. code-block:: json {"project":"flytectldemo","domain":"development","workflow":"","defaults":{"cpu":"1","memory":"150Mi"},"limits":{"cpu":"2","memory":"450Mi"}} -Retrieves task resource attributes for the given project, domain, and workflow. -For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve task resource attributes for the given project, domain, and workflow. +For project flytectldemo, development domain, and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command: +Example: output from the command: .. code-block:: json @@ -36,8 +36,8 @@ e.g., output from the command: Write the task resource attributes to a file. If there are no task resource attributes, a file would be populated with the basic data. -Here, the config file is written to tra.yaml, -e.g., content of tra.yaml: +The config file is written to tra.yaml file. +Example: content of tra.yaml: :: @@ -119,5 +119,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_task.rst b/flytectl/docs/source/gen/flytectl_get_task.rst index 473030b128..0ce16463f4 100644 --- a/flytectl/docs/source/gen/flytectl_get_task.rst +++ b/flytectl/docs/source/gen/flytectl_get_task.rst @@ -3,18 +3,22 @@ flytectl get task ----------------- -Get task resources +Gets task resources Synopsis ~~~~~~~~ -Retrieve all the tasks within project and domain(task,tasks can be used interchangeably in these commands): + +Retrieve all the tasks within project and domain: :: flytectl get task -p flytesnacks -d development +.. note:: + The terms task/tasks are interchangeable in these commands. + Retrieve task by name within project and domain: :: @@ -159,5 +163,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst index eaa12eef0d..85ce34f3b9 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow-execution-config.rst @@ -3,22 +3,22 @@ flytectl get workflow-execution-config -------------------------------------- -Get matchable resources of workflow execution config +Gets matchable resources of workflow execution config. Synopsis ~~~~~~~~ -Retrieves workflow execution config for the given project and domain combination or additionally with workflow name. +Retrieve workflow execution config for the given project and domain combination or additionally the workflow name. -For project flytectldemo and development domain, it is: +For project flytectldemo and development domain: :: flytectl get workflow-execution-config -p flytectldemo -d development -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -28,14 +28,14 @@ e.g., output from the command "max_parallelism": 5 } -Retrieves workflow execution config for the project, domain and workflow. -For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort', it is: +Retrieve workflow execution config for the project, domain, and workflow. +For project flytectldemo, development domain and workflow 'core.control_flow.run_merge_sort.merge_sort': :: flytectl get workflow-execution-config -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort -e.g., output from the command +Example: output from the command: .. code-block:: json @@ -46,9 +46,9 @@ e.g., output from the command "max_parallelism": 5 } -Writing the workflow execution config to a file. If there are no workflow execution config, the command would return an error. -Here, the config file is written to wec.yaml, -e.g., content of wec.yaml: +Write the workflow execution config to a file. If there are no workflow execution config, the command throws an error. +The config file is written to wec.yaml file. +Example: content of wec.yaml: :: @@ -125,5 +125,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_get_workflow.rst b/flytectl/docs/source/gen/flytectl_get_workflow.rst index b3e8fc5738..92960d0ddb 100644 --- a/flytectl/docs/source/gen/flytectl_get_workflow.rst +++ b/flytectl/docs/source/gen/flytectl_get_workflow.rst @@ -3,14 +3,14 @@ flytectl get workflow --------------------- -Get workflow resources +Gets workflow resources Synopsis ~~~~~~~~ -Retrieve all the workflows within project and domain (workflow,workflows can be used interchangeably in these commands): +Retrieve all the workflows within project and domain (workflow/workflows can be used interchangeably in these commands): :: flytectl get workflow -p flytesnacks -d development @@ -147,5 +147,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_get` - Fetch various Flyte resources including tasks/workflows/launchplans/executions/project. +* :doc:`flytectl_get` - Fetches various Flyte resources such as tasks, workflows, launch plans, executions, and projects. diff --git a/flytectl/docs/source/gen/flytectl_register.rst b/flytectl/docs/source/gen/flytectl_register.rst index 56c795d3c3..aeea164696 100644 --- a/flytectl/docs/source/gen/flytectl_register.rst +++ b/flytectl/docs/source/gen/flytectl_register.rst @@ -3,16 +3,16 @@ flytectl register ----------------- -Register tasks/workflows/launchplans from a list of generated serialized files. +Registers tasks, workflows, and launch plans from a list of generated serialized files. Synopsis ~~~~~~~~ -Takes input files as serialized versions of the tasks/workflows/launchplans and registers them with flyteadmin. +Take input files as serialized versions of the tasks/workflows/launchplans and register them with FlyteAdmin. Currently, these input files are protobuf files generated as output from Flytekit serialize. -Project & Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. +Project and Domain are mandatory fields to be passed for registration and an optional version which defaults to v1. If the entities are already registered with Flyte for the same version, the registration would fail. @@ -72,7 +72,7 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_register_examples` - Register Flytesnacks example -* :doc:`flytectl_register_files` - Register file resources +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_register_examples` - Registers Flytesnacks example. +* :doc:`flytectl_register_files` - Registers file resources. diff --git a/flytectl/docs/source/gen/flytectl_register_examples.rst b/flytectl/docs/source/gen/flytectl_register_examples.rst index a53c63669f..75d25ea88e 100644 --- a/flytectl/docs/source/gen/flytectl_register_examples.rst +++ b/flytectl/docs/source/gen/flytectl_register_examples.rst @@ -3,14 +3,14 @@ flytectl register examples -------------------------- -Register Flytesnacks example +Registers Flytesnacks example. Synopsis ~~~~~~~~ -Register all latest Flytesnacks examples: +Register all the latest Flytesnacks examples: :: flytectl register examples -d development -p flytesnacks @@ -20,7 +20,9 @@ Register specific release of Flytesnacks examples: flytectl register examples -d development -p flytesnacks --version v0.2.176 -Note: The register command automatically override the version with release version +.. note:: + The register command automatically override the version with release version. + Usage @@ -95,5 +97,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_register_files.rst b/flytectl/docs/source/gen/flytectl_register_files.rst index cc62e457db..e052e181be 100644 --- a/flytectl/docs/source/gen/flytectl_register_files.rst +++ b/flytectl/docs/source/gen/flytectl_register_files.rst @@ -3,26 +3,28 @@ flytectl register files ----------------------- -Register file resources +Registers file resources. Synopsis ~~~~~~~~ -Registers all the serialized protobuf files including tasks, workflows and launchplans with default v1 version. +Registers all the serialized protobuf files including tasks, workflows and launch plans with default v1 version. If previously registered entities with v1 version are present, the command will fail immediately on the first such encounter. :: flytectl register file _pb_output/* -d development -p flytesnacks -There is no difference between registration and fast registration. In fast registration, the input provided by the user is fast serialized proto that is generated by pyflyte. If FlyteCTL finds any source code in users' input, it considers the registration as fast registration. FlyteCTL finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. -SourceUploadPath is an optional flag. By default, FlyteCTL will create SourceUploadPath from your storage config. In case of s3 FlyteCTL will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. +Registration and fast registration mean the same. In fast registration, the input provided by the user is fast serialized proto generated by pyflyte. +If Flytectl finds any source code in users' input, it considers the registration as fast registration. +Flytectl finds input file by searching an archive file whose name starts with fast and has .tar.gz extension. When the user runs pyflyte with --fast flag then pyflyte creates serialize proto and it also creates source code archive file in the same directory. +SourceUploadPath is an optional flag. By default, Flytectl will create SourceUploadPath from your storage config. In case of s3 Flytectl will upload code base in s3://{{DEFINE_BUCKET_IN_STORAGE_CONFIG}}/fast/{{VERSION}}-fast{{MD5_CREATED_BY_PYFLYTE}.tar.gz}. :: flytectl register file _pb_output/* -d development -p flytesnacks --version v2 -In case of fast registration, if the SourceUploadPath flag is defined, FlyteCTL will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. +In case of fast registration, if the SourceUploadPath flag is defined, Flytectl will not use the default directory to upload the source code. Instead, it will override the destination path on the registration. :: flytectl register file _pb_output/* -d development -p flytesnacks --version v2 --SourceUploadPath="s3://dummy/fast" @@ -160,5 +162,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_register` - Register tasks/workflows/launchplans from a list of generated serialized files. +* :doc:`flytectl_register` - Registers tasks, workflows, and launch plans from a list of generated serialized files. diff --git a/flytectl/docs/source/gen/flytectl_sandbox.rst b/flytectl/docs/source/gen/flytectl_sandbox.rst index e9ff4c3a02..43e7816f51 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox.rst @@ -3,33 +3,33 @@ flytectl sandbox ---------------- -Used for sandbox interactions like start/teardown/status/exec. +Helps with Sandbox interactions like start, teardown, status, and exec. Synopsis ~~~~~~~~ -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. -Create sandbox cluster: +Creates Sandbox cluster: :: flytectl sandbox start -Remove sandbox cluster: +Removes Sandbox cluster: :: flytectl sandbox teardown -Check status of sandbox container: +Checks the status of the Sandbox container: :: flytectl sandbox status -Execute command inside sandbox container: +Executes commands inside the Sandbox container: :: flytectl sandbox exec -- pwd @@ -91,9 +91,9 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool -* :doc:`flytectl_sandbox_exec` - Execute non-interactive command inside the sandbox container -* :doc:`flytectl_sandbox_start` - Start the Flyte Sandbox cluster -* :doc:`flytectl_sandbox_status` - Get status of the sandbox environment. -* :doc:`flytectl_sandbox_teardown` - Teardown cleans up the sandbox environment +* :doc:`flytectl` - Flytectl CLI tool +* :doc:`flytectl_sandbox_exec` - Executes non-interactive command inside the Sandbox container +* :doc:`flytectl_sandbox_start` - Starts the Flyte Sandbox cluster. +* :doc:`flytectl_sandbox_status` - Gets the status of the Sandbox environment. +* :doc:`flytectl_sandbox_teardown` - Cleans up the sandbox environment diff --git a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst index d377d26950..e030242b1d 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_exec.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_exec.rst @@ -3,16 +3,17 @@ flytectl sandbox exec --------------------- -Execute non-interactive command inside the sandbox container +Executes non-interactive command inside the Sandbox container Synopsis ~~~~~~~~ -Runs non-interactive command inside the Sandbox container and immediately returns the output. By default, flytectl exec is present in /root directory inside the Sandbox container. +Runs non-interactive commands inside the Sandbox container and immediately returns the output. By default, "flytectl exec" is present in the /root directory inside the Sandbox container. :: + flytectl sandbox exec -- ls -al Usage @@ -77,5 +78,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_start.rst b/flytectl/docs/source/gen/flytectl_sandbox_start.rst index 941cb57926..c7a87d2ed1 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_start.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_start.rst @@ -3,38 +3,39 @@ flytectl sandbox start ---------------------- -Start the Flyte Sandbox cluster +Starts the Flyte Sandbox cluster. Synopsis ~~~~~~~~ -The Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte sandbox as a single Docker container locally. +Flyte Sandbox is a fully standalone minimal environment for running Flyte. It provides a simplified way of running Flyte Sandbox as a single Docker container locally. -Start sandbox cluster without any source code: +Starts the Sandbox cluster without any source code: :: flytectl sandbox start -Mount your source code repository inside sandbox: +Mounts your source code repository inside the Sandbox: :: flytectl sandbox start --source=$HOME/flyteorg/flytesnacks -Run specific version of Flyte. FlyteCTL sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. +Runs a specific version of Flyte. Flytectl Sandbox only supports Flyte version available in the Github release, https://github.com/flyteorg/flyte/tags. :: flytectl sandbox start --version=v0.14.0 -Note: FlyteCTL sandbox is only supported for Flyte versions > v0.10.0 +.. note:: + Flytectl Sandbox is only supported for Flyte versions > v0.10.0. -Run latest pre release of Flyte. +Runs the latest pre release of Flyte. :: flytectl sandbox start --pre -Note: pre release flag will be ignore if user pass version flag, In that case Flytectl will use specific version. +Note: The pre release flag will be ignored if the user passes the version flag. In that case, Flytectl will use a specific version. Specify a Flyte Sandbox compliant image with the registry. This is useful in case you want to use an image from your registry. :: @@ -138,5 +139,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_status.rst b/flytectl/docs/source/gen/flytectl_sandbox_status.rst index 6b7637cb3b..a7a8e1e372 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_status.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_status.rst @@ -3,14 +3,14 @@ flytectl sandbox status ----------------------- -Get status of the sandbox environment. +Gets the status of the Sandbox environment. Synopsis ~~~~~~~~ -Retrieve the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. +Retrieves the status of the Sandbox environment. Currently, Flyte Sandbox runs as a local Docker container. Usage :: @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst index 5958285fae..31280b2511 100644 --- a/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst +++ b/flytectl/docs/source/gen/flytectl_sandbox_teardown.rst @@ -3,14 +3,14 @@ flytectl sandbox teardown ------------------------- -Teardown cleans up the sandbox environment +Cleans up the sandbox environment Synopsis ~~~~~~~~ -Teardown removes Sandbox cluster and all the Flyte config created by sandbox start: +Removes the Sandbox cluster and all the Flyte config created by 'sandbox start': :: flytectl sandbox teardown @@ -79,5 +79,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl_sandbox` - Used for sandbox interactions like start/teardown/status/exec. +* :doc:`flytectl_sandbox` - Helps with Sandbox interactions like start, teardown, status, and exec. diff --git a/flytectl/docs/source/gen/flytectl_update.rst b/flytectl/docs/source/gen/flytectl_update.rst index e0ed691ea5..f4c8ae3e06 100644 --- a/flytectl/docs/source/gen/flytectl_update.rst +++ b/flytectl/docs/source/gen/flytectl_update.rst @@ -11,8 +11,8 @@ Synopsis Currently, this command only provides subcommands to update project. -Takes input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. -To update a project: +Take input project that needs to be archived or unarchived. Name of the project to be updated is a mandatory field. +Update Flyte resources; if a project: :: flytectl update project -p flytesnacks --activateProject @@ -74,17 +74,17 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool * :doc:`flytectl_update_cluster-resource-attribute` - Update matchable resources of cluster attributes -* :doc:`flytectl_update_execution` - Update execution status +* :doc:`flytectl_update_execution` - Updates the execution status * :doc:`flytectl_update_execution-cluster-label` - Update matchable resources of execution cluster label * :doc:`flytectl_update_execution-queue-attribute` - Update matchable resources of execution queue attributes -* :doc:`flytectl_update_launchplan` - Update launch plan status -* :doc:`flytectl_update_launchplan-meta` - Update launch plan metadata +* :doc:`flytectl_update_launchplan` - Updates launch plan status +* :doc:`flytectl_update_launchplan-meta` - Updates the launch plan metadata * :doc:`flytectl_update_plugin-override` - Update matchable resources of plugin overrides * :doc:`flytectl_update_project` - Update project resources * :doc:`flytectl_update_task-meta` - Update task metadata * :doc:`flytectl_update_task-resource-attribute` - Update matchable resources of task attributes -* :doc:`flytectl_update_workflow-execution-config` - Update matchable resources of workflow execution config +* :doc:`flytectl_update_workflow-execution-config` - Updates matchable resources of workflow execution config * :doc:`flytectl_update_workflow-meta` - Update workflow metadata diff --git a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst index b976c3486a..43f4f034bc 100644 --- a/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_cluster-resource-attribute.rst @@ -10,11 +10,11 @@ Synopsis -Updates cluster resource attributes for given project and domain combination or additionally with workflow name. +Update cluster resource attributes for given project and domain combination or additionally with workflow name. Updating to the cluster resource attribute is only available from a generated file. See the get section to generate this file. It takes input for cluster resource attributes from the config file cra.yaml, -e.g., content of cra.yaml: +Example: content of cra.yaml: .. code-block:: yaml @@ -28,7 +28,7 @@ e.g., content of cra.yaml: flytectl update cluster-resource-attribute --attrFile cra.yaml -Updates cluster resource attribute for project and domain and workflow combination. This will take precedence over any other +Update cluster resource attribute for project and domain and workflow combination. This will take precedence over any other resource attribute defined at project domain level. This will completely overwrite any existing custom project, domain and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. diff --git a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst index 265a274589..e809f7c70a 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-cluster-label.rst @@ -10,11 +10,11 @@ Synopsis -Updates execution cluster label for the given project and domain combination or additionally with workflow name. +Update execution cluster label for the given project and domain combination or additionally with workflow name. Updating to the execution cluster label is only available from a generated file. See the get section to generate this file. It takes input for execution cluster label from the config file ecl.yaml -e.g., content of ecl.yaml: +Example: content of ecl.yaml: .. code-block:: yaml @@ -26,7 +26,7 @@ e.g., content of ecl.yaml: flytectl update execution-cluster-label --attrFile ecl.yaml -Updates execution cluster label for project, domain and workflow combination. This will take precedence over any other +Update execution cluster label for project, domain, and workflow combination. This will take precedence over any other execution cluster label defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst index e12e6ff614..53122c5a8f 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution-queue-attribute.rst @@ -10,14 +10,14 @@ Synopsis -Updates execution queue attributes for the given project and domain combination or additionally with workflow name. +Update execution queue attributes for the given project and domain combination or additionally with workflow name. Updating the execution queue attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute that is already set and then update it to have new values. Refer to get execution-queue-attribute section on how to generate this file It takes input for execution queue attributes from the config file era.yaml, -e.g., content of era.yaml: +Example: content of era.yaml: .. code-block:: yaml @@ -33,7 +33,7 @@ e.g., content of era.yaml: flytectl update execution-queue-attribute --attrFile era.yaml -Updates execution queue attribute for project, domain and workflow combination. This will take precedence over any other +Update execution queue attribute for project, domain, and workflow combination. This will take precedence over any other execution queue attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_execution.rst b/flytectl/docs/source/gen/flytectl_update_execution.rst index 7bb7ebee56..4ad95da247 100644 --- a/flytectl/docs/source/gen/flytectl_update_execution.rst +++ b/flytectl/docs/source/gen/flytectl_update_execution.rst @@ -3,19 +3,19 @@ flytectl update execution ------------------------- -Update execution status +Updates the execution status Synopsis ~~~~~~~~ -Activating an execution shows it in the cli and UI: +Activate an execution; and it shows up in the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --activate -Archiving execution hides it from cli and UI: +Archive an execution; and it is hidden from the CLI and UI: :: flytectl update execution -p flytectldemo -d development oeh94k9r2r --archive diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst index 2ac0f7c1ff..b08cd29e4b 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan-meta.rst @@ -3,7 +3,7 @@ flytectl update launchplan-meta ------------------------------- -Update launch plan metadata +Updates the launch plan metadata Synopsis ~~~~~~~~ diff --git a/flytectl/docs/source/gen/flytectl_update_launchplan.rst b/flytectl/docs/source/gen/flytectl_update_launchplan.rst index fd64182bd3..ca27b38679 100644 --- a/flytectl/docs/source/gen/flytectl_update_launchplan.rst +++ b/flytectl/docs/source/gen/flytectl_update_launchplan.rst @@ -3,19 +3,19 @@ flytectl update launchplan -------------------------- -Update launch plan status +Updates launch plan status Synopsis ~~~~~~~~ -Activating launch plan activates the scheduled job associated with it: +Activates a launch plan which activates the scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --activate -Archiving launch plan deschedules any scheduled job associated with it: +Archives a launch plan which deschedules any scheduled job associated with it: :: flytectl update launchplan -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --version v1 --archive diff --git a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst index 41c04f73ce..3460f9498b 100644 --- a/flytectl/docs/source/gen/flytectl_update_plugin-override.rst +++ b/flytectl/docs/source/gen/flytectl_update_plugin-override.rst @@ -10,14 +10,14 @@ Synopsis -Updates plugin overrides for given project and domain combination or additionally with workflow name. +Update plugin overrides for given project and domain combination or additionally with workflow name. Updating to the plugin override is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing plugins overrides on custom project, domain and workflow combination. +This will completely overwrite any existing plugins overrides on custom project, domain, and workflow combination. It is preferable to do get and generate a plugin override file if there is an existing override already set and then update it to have new values. Refer to get plugin-override section on how to generate this file It takes input for plugin overrides from the config file po.yaml, -e.g., content of po.yaml: +Example: content of po.yaml: .. code-block:: yaml @@ -34,7 +34,7 @@ e.g., content of po.yaml: flytectl update plugin-override --attrFile po.yaml -Updates plugin override for project, domain and workflow combination. This will take precedence over any other +Update plugin override for project, domain, and workflow combination. This will take precedence over any other plugin overrides defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst index 1c05bdbbc9..9277927bae 100644 --- a/flytectl/docs/source/gen/flytectl_update_project.rst +++ b/flytectl/docs/source/gen/flytectl_update_project.rst @@ -10,7 +10,7 @@ Synopsis -Updates the project according to the flags passed. Allows you to archive or activate a project. +Update the project according to the flags passed. Allows you to archive or activate a project. Activate project flytesnacks: :: diff --git a/flytectl/docs/source/gen/flytectl_update_task-meta.rst b/flytectl/docs/source/gen/flytectl_update_task-meta.rst index 06ad150dc1..b6fec0258c 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-meta.rst @@ -10,7 +10,7 @@ Synopsis -Updates the description on the task: +Update the description on the task: :: flytectl update task -d development -p flytectldemo core.advanced.run_merge_sort.merge --description "Merge sort example" diff --git a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst index c788249f3b..0c9f31dc50 100644 --- a/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst +++ b/flytectl/docs/source/gen/flytectl_update_task-resource-attribute.rst @@ -10,14 +10,14 @@ Synopsis -Updates task resource attributes for the given project and domain combination or additionally with workflow name. +Updates the task resource attributes for the given project and domain combination or additionally with workflow name. Updating the task resource attribute is only available from a generated file. See the get section for generating this file. -This will completely overwrite any existing custom project, domain and workflow combination attributes. +This will completely overwrite any existing custom project, domain, and workflow combination attributes. It is preferable to do get and generate an attribute file if there is an existing attribute already set and then update it to have new values. Refer to get task-resource-attribute section on how to generate this file. It takes input for task resource attributes from the config file tra.yaml, -e.g., content of tra.yaml: +Example: content of tra.yaml: .. code-block:: yaml @@ -34,7 +34,7 @@ e.g., content of tra.yaml: flytectl update task-resource-attribute --attrFile tra.yaml -Updates task resource attribute for project, domain and workflow combination. This will take precedence over any other +Update task resource attribute for project, domain, and workflow combination. This will take precedence over any other resource attribute defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst index 90f3815857..ae43ff1982 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-execution-config.rst @@ -3,21 +3,21 @@ flytectl update workflow-execution-config ----------------------------------------- -Update matchable resources of workflow execution config +Updates matchable resources of workflow execution config Synopsis ~~~~~~~~ -Updates workflow execution config for given project and domain combination or additionally with workflow name. +Updates the workflow execution config for the given project and domain combination or additionally with workflow name. Updating the workflow execution config is only available from a generated file. See the get section for generating this file. This will completely overwrite any existing custom project and domain and workflow combination execution config. It is preferable to do get and generate a config file if there is an existing execution config already set and then update it to have new values. Refer to get workflow-execution-config section on how to generate this file. It takes input for workflow execution config from the config file wec.yaml, -e.g., content of wec.yaml: +Example: content of wec.yaml: .. code-block:: yaml @@ -29,7 +29,7 @@ e.g., content of wec.yaml: flytectl update workflow-execution-config --attrFile wec.yaml -Updates workflow execution config for project, domain and workflow combination. This will take precedence over any other +Update workflow execution config for project, domain, and workflow combination. This will take precedence over any other execution config defined at project domain level. For workflow 'core.control_flow.run_merge_sort.merge_sort' in flytectldemo project, development domain, it is: diff --git a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst index 07a7340fbd..6e220472c6 100644 --- a/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst +++ b/flytectl/docs/source/gen/flytectl_update_workflow-meta.rst @@ -10,7 +10,7 @@ Synopsis -Updates the description on the workflow: +Update the description on the workflow: :: flytectl update workflow -p flytectldemo -d development core.advanced.run_merge_sort.merge_sort --description "Mergesort workflow example" diff --git a/flytectl/docs/source/gen/flytectl_upgrade.rst b/flytectl/docs/source/gen/flytectl_upgrade.rst index bea19096ad..d1a1e34ee3 100644 --- a/flytectl/docs/source/gen/flytectl_upgrade.rst +++ b/flytectl/docs/source/gen/flytectl_upgrade.rst @@ -3,26 +3,28 @@ flytectl upgrade ---------------- -Upgrade/rollback to a Flyte version +Upgrades/rollbacks to a Flyte version. Synopsis ~~~~~~~~ -For FlyteCTL, it is: +For Flytectl, it is: :: flytectl upgrade -Note: Please use upgrade with sudo. Without sudo it will cause permission issue. +.. note:: + Please upgrade with sudo. Failing to do so may result in a permission issues. -Rollback flytectl binary: +Rollback Flytectl binary: :: flytectl upgrade rollback -Note: Upgrade is not available on windows. +.. note:: + Upgrade is not available on Windows. :: @@ -85,5 +87,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/gen/flytectl_version.rst b/flytectl/docs/source/gen/flytectl_version.rst index de9d2d6d6c..41ad6f8030 100644 --- a/flytectl/docs/source/gen/flytectl_version.rst +++ b/flytectl/docs/source/gen/flytectl_version.rst @@ -3,14 +3,14 @@ flytectl version ---------------- -Fetch Flyte version +Fetches Flyte version Synopsis ~~~~~~~~ -For FlyteCTL version, it is: +Fetch Flytectl version. :: flytectl version @@ -76,5 +76,5 @@ Options inherited from parent commands SEE ALSO ~~~~~~~~ -* :doc:`flytectl` - FlyteCTL CLI tool +* :doc:`flytectl` - Flytectl CLI tool diff --git a/flytectl/docs/source/index.rst b/flytectl/docs/source/index.rst index 3f73b6b834..7288d80a7e 100644 --- a/flytectl/docs/source/index.rst +++ b/flytectl/docs/source/index.rst @@ -11,10 +11,10 @@ This video will take you on a tour of Flytectl - how to install and configure it .. youtube:: cV8ezYnBANE -Install -======= -Flytectl is a Golang binary and can be installed on any platform supported by -golang +Installation +============ + +Flytectl is a Golang binary that can be installed on any platform supported by Golang. .. tabbed:: OSX @@ -40,19 +40,20 @@ golang flytectl version -Configure -========= -Flytectl allows configuring using a YAML file or pass every configuration value -on command-line. The following configuration is useful to setup. +Configuration +============= + +Flytectl allows you to communicate with FlyteAdmin using a YAML file or by passing every configuration value +on the command-line. The following configuration can be used for the setup: Basic Configuration -------------------- -The full list of available configurable options can be found by running ``flytectl --help``, or alternately `here `__ +The full list of available configurable options can be found by running ``flytectl --help``, or `here `__. .. NOTE:: - Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in config file + Currently, the Project ``-p``, Domain ``-d``, and Output ``-o`` flags cannot be used in the config file. .. tabbed:: Local Flyte Sandbox @@ -63,7 +64,7 @@ The full list of available configurable options can be found by running ``flytec admin: # For GRPC endpoints you might want to use dns:///flyte.myexample.com endpoint: dns:///localhost:30081 - insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment) + insecure: true # Set to false to enable TLS/SSL connection (not recommended except on local sandbox deployment). authType: Pkce # authType: Pkce # if using authentication or just drop this. storage: connection: @@ -124,7 +125,7 @@ The full list of available configurable options can be found by running ``flytec * currDir from where you run flytectl * ``/etc/flyte/config`` - You can pass the file name in the commandline using ``--config `` as well! + You can also pass the file name in the command line using ``--config ``. .. toctree:: diff --git a/flytectl/docs/source/launchplan.rst b/flytectl/docs/source/launchplan.rst index 7755b8eaba..ad29e5229a 100644 --- a/flytectl/docs/source/launchplan.rst +++ b/flytectl/docs/source/launchplan.rst @@ -1,6 +1,6 @@ Launchplan ----------- -It specifies the actions to be performed on the resource 'launchplan'. +----------- +It specifies the actions to be performed on the 'launchplan' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/nouns.rst b/flytectl/docs/source/nouns.rst index c61cfbf640..197ce67a02 100644 --- a/flytectl/docs/source/nouns.rst +++ b/flytectl/docs/source/nouns.rst @@ -1,6 +1,8 @@ +.. _nouns: + Nouns ------ -FlyteCTL nouns specify the resource on which the action needs to be performed. Example of resources include project, workflow, task, execution. +Flytectl nouns specify the resource on which the action needs to be performed. Examples of resources include project, workflow, task, and execution. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/plugin-override.rst b/flytectl/docs/source/plugin-override.rst index ed016543c5..7b1010ff1a 100644 --- a/flytectl/docs/source/plugin-override.rst +++ b/flytectl/docs/source/plugin-override.rst @@ -1,6 +1,6 @@ Plugin override --------------- -It specifies the actions to be performed on the resource 'plugin-override'. +It specifies the actions to be performed on the 'plugin-override' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/project.rst b/flytectl/docs/source/project.rst index b98d7909c2..05e1cc1113 100644 --- a/flytectl/docs/source/project.rst +++ b/flytectl/docs/source/project.rst @@ -1,6 +1,6 @@ Project ------- -It specifies the actions to be performed on the resource 'project'. +-------- +It specifies the actions to be performed on the 'project' resource. .. toctree:: diff --git a/flytectl/docs/source/sandbox.rst b/flytectl/docs/source/sandbox.rst index e6de8cafa5..f7d7bbc4bd 100644 --- a/flytectl/docs/source/sandbox.rst +++ b/flytectl/docs/source/sandbox.rst @@ -1,6 +1,6 @@ Sandbox ------- -It specifies the actions to be performed on the resource 'sandbox'. +It specifies the actions to be performed on the 'sandbox' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/task-resource-attribute.rst b/flytectl/docs/source/task-resource-attribute.rst index 3a4c0d5e8d..edc168355a 100644 --- a/flytectl/docs/source/task-resource-attribute.rst +++ b/flytectl/docs/source/task-resource-attribute.rst @@ -1,6 +1,6 @@ Task resource attribute ----------------------- -It specifies the actions to be performed on the resource 'task-resource-attribute'. +It specifies the actions to be performed on the 'task-resource-attribute' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/task.rst b/flytectl/docs/source/task.rst index 14f1c58f41..8792ea31d4 100644 --- a/flytectl/docs/source/task.rst +++ b/flytectl/docs/source/task.rst @@ -1,6 +1,6 @@ Task ------ -It specifies the actions to be performed on the resource 'task'. +It specifies the actions to be performed on the 'task' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/verbs.rst b/flytectl/docs/source/verbs.rst index a286d313e6..a1763a35b2 100644 --- a/flytectl/docs/source/verbs.rst +++ b/flytectl/docs/source/verbs.rst @@ -1,6 +1,6 @@ Verbs ------ -FlyteCTL verbs specify the actions to be performed on the resources. Ex: create, get, update, and delete. +Flytectl verbs specify the actions to be performed on the resources. Example: create, get, update, and delete. .. toctree:: diff --git a/flytectl/docs/source/workflow-execution-config.rst b/flytectl/docs/source/workflow-execution-config.rst index 0ae96cbb87..d4f94e76a9 100644 --- a/flytectl/docs/source/workflow-execution-config.rst +++ b/flytectl/docs/source/workflow-execution-config.rst @@ -1,6 +1,7 @@ Workflow execution config ------- -It specifies the actions to be performed on the resource 'workflow-execution-config'. +------------------------- + +It specifies the actions to be performed on the 'workflow-execution-config' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/docs/source/workflow.rst b/flytectl/docs/source/workflow.rst index 91332dc281..32c08574a3 100644 --- a/flytectl/docs/source/workflow.rst +++ b/flytectl/docs/source/workflow.rst @@ -1,6 +1,6 @@ Workflow -------- -It specifies the actions to be performed on the resource 'workflow'. +It specifies the actions to be performed on the 'workflow' resource. .. toctree:: :maxdepth: 1 diff --git a/flytectl/proposal/README.md b/flytectl/proposal/README.md index f561707b4d..362e60a9ba 100644 --- a/flytectl/proposal/README.md +++ b/flytectl/proposal/README.md @@ -1,30 +1,30 @@ # Introduction -This document proposes, **flytectl** as one singular CLI that interacts with flyteadmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of -FlyteAdmin. We will start with gRPC endpoint as the client is easily generated and in future we should investigate generation of a Swagger based REST client from the gRPC specification. As we build -more SDK's in different languages we should support a common way of interacting with the API. This does no mean that some SDK's may provide native ways of interacting with the Admin API (for e.g. -flytekit), but the intention is that we will eventually replace **flytekit/flyte-cli** with flytectl exclusively. +This document proposes, **Flytectl** as a single CLI that interacts with FlyteAdmin service. It is proposed to write the CLI in **Golang** and would support both gRPC and REST endpoints of +FlyteAdmin. We will start with gRPC endpoint since the client can be easily generated. In the future, we will work on generating a Swagger-based REST client from the gRPC specification. As we build +more SDKs in different languages we will support a common way of interacting with the API. This doesn't mean that some SDKs may provide native ways of interacting with the Admin API (for e.g. +Flytekit), but the intention is to eventually replace **Flytekit/Flytecli** with Flytectl exclusively. -We also recommend that the design of FlyteCTL is careful and it could helps us with delivering user features faster without having to rely on the UI. FlyteCTL with follow standard oauth2 for -authentication already supported by flyteAdmin. Moreover, FlyteCTL should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. +Flytectl has been designed to deliver user features without having to rely on the UI. Flytectl will follow the standard oauth2 for +authentication, supported by FlyteAdmin. Moreover, Flytectl should be readily available on almost any platform - OSX, Linux and Windows. We will strive to keep it relatively lean and fast. # Why One CLI? -As we build multiple SDK's they need a native way of interacting with the API. Having multiple CLI's makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. +As we build multiple SDKs, we need a native way of interacting with the API. Having multiple CLIs makes it hard to keep all of them in sync as we rapidly evolve the API and add more features. *Diagram here* # Why Golang? -- Most of Flytebackend is written in golang -- Golang offers great CLI tooling support with viper and cobra -- Golang toolchain to create cross-compiled small, light weight binary is really efficient and easy to use -- We already generate golang proto and clients for all our IDL -- we have multiple common libraries available to ease the development of this tool -- kubectl is a stellar example of a cli done well +- Most of Flyte backend is written in Golang. +- Golang offers great CLI tooling support with viper and cobra. +- Golang toolchain helps create cross-compiled small, light weight binary, which is efficient and easy to use. +- We already generate Golang proto and clients for all our IDL. +- We have multiple common libraries available to ease the development of this tool. +- Kubectl is a stellar example of a CLI done well. ## Generating Swagger code -We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. We also got approached by the swagger code gen maintainer to see if they can help. +We started exploring this (Flytetools)[https://github.com/lyft/flytetools#tools] has some work. The Swagger code-gen maintainer also approached us to see if they could help. # API @@ -51,7 +51,7 @@ $ flytectl [options] returns the version of the CLI, version of Admin service and version of the Platform that is deployed ### configure -Allows configuring FlyteCTL for your own usage (low pri). Needed for especially storing Auth tokens. +Allows configuring Flytectl for your own usage (low pri). Needed for especially storing Auth tokens. ### get/delete Get retrieves a list of resources that is qualified by a further sub-command. for example @@ -72,7 +72,7 @@ Create may need more information than can be easily passed in command line and w Eventually we may want to simplify the json and yaml representations but that is not required in first pass. We may also want to create just a separate option for that. The create for Task and Workflow is essential what is encompassed in the pyflyte as the registration process. We will decouple the registration process such that pyflyte, jflyte (other native cli's or -code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **flytectl**. Thus flytectl is essential in every flow for the user. +code methods) can dump a serialized representations of the workflows and tasks that are directly consumed by **Flytectl**. Thus Flytectl is essential in every flow for the user. #### Create Templatization