Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Visualize graphs on command line (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumare3 authored Jun 18, 2021
1 parent 2c4e1fe commit 0ea6da6
Show file tree
Hide file tree
Showing 57 changed files with 2,849 additions and 114 deletions.
13 changes: 6 additions & 7 deletions cmd/config/subcommand/workflow/config_flags.go

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

6 changes: 4 additions & 2 deletions cmd/config/subcommand/workflow/workflow_config.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package workflow

import "github.com/flyteorg/flytectl/pkg/filters"
import (
"github.com/flyteorg/flytectl/pkg/filters"
)

//go:generate pflags Config --default-var DefaultConfig
//go:generate pflags Config --default-var DefaultConfig --bind-default-var

var (
DefaultConfig = &Config{
Expand Down
12 changes: 12 additions & 0 deletions cmd/get/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ Retrieves all the workflow within project and domain in json format.
flytectl get workflow -p flytesnacks -d development -o json
Visualize the graph for a workflow within project and domain in dot format.
::
flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o dot
Visualize the graph for a workflow within project and domain in a dot content render.
::
flytectl get workflow -p flytesnacks -d development core.flyte_basics.basic_workflow.my_wf --latest -o doturl
Usage
`
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func newRootCmd() *cobra.Command {
// --root.project, this adds a convenience on top to allow --project to be used
rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Project), "project", "p", "", "Specifies the Flyte project.")
rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Domain), "domain", "d", "", "Specifies the Flyte project's domain.")
rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s", printer.OutputFormats()))
rootCmd.PersistentFlags().StringVarP(&(config.GetConfig().Output), "output", "o", printer.OutputFormatTABLE.String(), fmt.Sprintf("Specifies the output type - supported formats %s. NOTE: dot, doturl are only supported for Workflow", printer.OutputFormats()))
rootCmd.AddCommand(viper.GetConfigCommand())
rootCmd.AddCommand(get.CreateGetCommand())
rootCmd.AddCommand(create.RemoteCreateCommand())
Expand Down
5 changes: 3 additions & 2 deletions docs/source/gen/flytectl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Options
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
-h, --help help for flytectl
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand All @@ -64,6 +64,7 @@ SEE ALSO
* :doc:`flytectl_delete` - Used for terminating/deleting various flyte resources including tasks/workflows/launchplans/executions/project.
* :doc:`flytectl_get` - Used for fetching various flyte resources including tasks/workflows/launchplans/executions/project.
* :doc:`flytectl_register` - Registers tasks/workflows/launchplans from list of generated serialized files.
* :doc:`flytectl_sandbox` - Used for testing flyte sandbox.
* :doc:`flytectl_update` - Used for updating flyte resources eg: project.
* :doc:`flytectl_version` - Used for fetching flyte version

4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_config_discover.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--file stringArray Passes the config file to load.
If empty, it'll first search for the config file path then, if found, will load config from there.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_config_validate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--file stringArray Passes the config file to load.
If empty, it'll first search for the config file path then, if found, will load config from there.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_create_execution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_create_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/gen/flytectl_delete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Options inherited from parent commands
--admin.scopes strings List of scopes to request
--admin.tokenUrl string OPTIONAL: Your IdP's token endpoint. It'll be discovered from flyte admin's OAuth Metadata endpoint if not provided.
--admin.useAuth Deprecated: Auth will be enabled/disabled based on admin's dynamically discovered information.
--config string config file (default is $HOME/.flyte/config.yaml)
-c, --config string config file (default is $HOME/.flyte/config.yaml)
-d, --domain string Specifies the Flyte project's domain.
--logger.formatter.type string Sets logging format type. (default "json")
--logger.level int Sets the minimum logging level. (default 4)
--logger.mute Mutes all logs regardless of severity. Intended for benchmarks/tests only.
--logger.show-source Includes source code location in logs.
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML] (default "TABLE")
-o, --output string Specifies the output type - supported formats [TABLE JSON YAML DOT DOTURL]. NOTE: dot, doturl are only supported for Workflow (default "TABLE")
-p, --project string Specifies the Flyte project.
--root.domain string Specified the domain to work on.
--root.output string Specified the output type.
Expand Down
Loading

0 comments on commit 0ea6da6

Please sign in to comment.