Skip to content

Commit

Permalink
Fixes the project name and workflow name in the flytectl documentatio…
Browse files Browse the repository at this point in the history
…n. (#339)

It seems that flytectl no longer register examples to a `flytectldemo`
project, rather, the project name should be `flytesnacks`.

And, the workflow name `core.advanced.run_merge_sort.merge_sort` and
`core.control_flow.run_merge_sort.merge_sort` should be
`core.control_flow.merge_sort.merge_sort`.

Signed-off-by: Tao He <[email protected]>
  • Loading branch information
sighingnow authored Aug 9, 2022
1 parent 3989ec8 commit 9af534f
Show file tree
Hide file tree
Showing 95 changed files with 327 additions and 327 deletions.
12 changes: 6 additions & 6 deletions flytectl/cmd/create/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ There are three steps to generate an execution, as outlined below:
1. Generate the execution spec file using the :ref:` + "`get task <flytectl_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 flytesnacks core.control_flow.merge_sort.merge --version v2 --execFile execution_spec.yaml
The generated file would look similar to the following:
Expand All @@ -35,7 +35,7 @@ The generated file would look similar to the following:
kubeServiceAcct: ""
targetDomain: ""
targetProject: ""
task: core.advanced.run_merge_sort.merge
task: core.control_flow.merge_sort.merge
version: "v2"
2. [Optional] Update the inputs for the execution, if needed.
Expand All @@ -56,7 +56,7 @@ The generated spec file can be modified to change the input values, as shown bel
kubeServiceAcct: ""
targetDomain: ""
targetProject: ""
task: core.advanced.run_merge_sort.merge
task: core.control_flow.merge_sort.merge
version: "v2"
3. Run the execution by passing the generated YAML file.
Expand All @@ -70,13 +70,13 @@ To relaunch an execution, pass the current execution ID as follows:
::
flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytectldemo -d development
flytectl create execution --relaunch ffb31066a0f8b4d52b77 -p flytesnacks -d development
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
flytectl create execution --recover ffb31066a0f8b4d52b77 -p flytesnacks -d development
See :ref:` + "`ref_flyteidl.admin.ExecutionRecoverRequest`" + ` for more details.
Expand All @@ -85,7 +85,7 @@ The following is an example of how generic data can be specified while creating
::
flytectl get task -d development -p flytectldemo core.type_system.custom_objects.add --execFile adddatanum.yaml
flytectl get task -d development -p flytesnacks 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 types 'x' and 'y'.
::
Expand Down
4 changes: 2 additions & 2 deletions flytectl/cmd/create/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) {
}
launchPlan1 := &admin.LaunchPlan{
Id: &core.Identifier{
Name: "core.advanced.run_merge_sort.merge_sort",
Name: "core.control_flow.merge_sort.merge_sort",
Version: "v3",
},
Spec: &admin.LaunchPlanSpec{
Expand All @@ -131,7 +131,7 @@ func createExecutionSetup(s *testutils.TestStruct) (t TestStruct) {
ResourceType: core.ResourceType_LAUNCH_PLAN,
Project: config.GetConfig().Project,
Domain: config.GetConfig().Domain,
Name: "core.advanced.run_merge_sort.merge_sort",
Name: "core.control_flow.merge_sort.merge_sort",
Version: "v2",
},
}
Expand Down
10 changes: 5 additions & 5 deletions flytectl/cmd/delete/matchable_cluster_resource_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const (
clusterResourceAttributesLong = `
Delete cluster resource attributes for the given project and domain, in combination with the workflow name.
For project flytectldemo and development domain, run:
For project flytesnacks and development domain, run:
::
flytectl delete cluster-resource-attribute -p flytectldemo -d development
flytectl delete cluster-resource-attribute -p flytesnacks -d development
To delete cluster resource attribute using the config file that was used to create it, run:
Expand All @@ -32,18 +32,18 @@ For example, here's the config file cra.yaml:
.. code-block:: yaml
domain: development
project: flytectldemo
project: flytesnacks
attributes:
foo: "bar"
buzz: "lightyear"
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:
To delete cluster resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run:
::
flytectl delete cluster-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort
flytectl delete cluster-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort
Usage
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) {
err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_CLUSTER_RESOURCE)
})
t.Run("successful workflow attribute deletion", func(t *testing.T) {
s := setup()
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) {
err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_CLUSTER_RESOURCE)
})
t.Run("workflow attribute deletion non existent file", func(t *testing.T) {
Expand All @@ -110,7 +110,7 @@ func TestDeleteClusterResourceAttributes(t *testing.T) {
err := deleteClusterResourceAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.NotNil(t, err)
s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_CLUSTER_RESOURCE)
})
t.Run("attribute deletion invalid file", func(t *testing.T) {
Expand All @@ -125,6 +125,6 @@ func TestDeleteClusterResourceAttributes(t *testing.T) {
fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""),
err)
s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_CLUSTER_RESOURCE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_CLUSTER_RESOURCE)
})
}
10 changes: 5 additions & 5 deletions flytectl/cmd/delete/matchable_execution_cluster_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const (
executionClusterLabelLong = `
Delete execution cluster label for a given project and domain, in combination with the workflow name.
For project flytectldemo and development domain, run:
For project flytesnacks and development domain, run:
::
flytectl delete execution-cluster-label -p flytectldemo -d development
flytectl delete execution-cluster-label -p flytesnacks -d development
To delete execution cluster label using the config file that was used to create it, run:
Expand All @@ -31,16 +31,16 @@ For example, here's the config file ecl.yaml:
.. code-block:: yaml
domain: development
project: flytectldemo
project: flytesnacks
value: foo
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:
To delete the execution cluster label of the workflow 'core.control_flow.merge_sort.merge_sort', run the following:
::
flytectl delete execution-cluster-label -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort
flytectl delete execution-cluster-label -p flytesnacks -d development core.control_flow.merge_sort.merge_sort
Usage
`
Expand Down
8 changes: 4 additions & 4 deletions flytectl/cmd/delete/matchable_execution_cluster_label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) {
err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
})
t.Run("successful workflow attribute deletion", func(t *testing.T) {
s := setup()
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) {
err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
})
t.Run("workflow attribute deletion non existent file", func(t *testing.T) {
Expand All @@ -110,7 +110,7 @@ func TestDeleteExecutionClusterLabels(t *testing.T) {
err := deleteExecutionClusterLabel(s.Ctx, []string{}, s.CmdCtx)
assert.NotNil(t, err)
s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
})
t.Run("attribute deletion invalid file", func(t *testing.T) {
Expand All @@ -125,6 +125,6 @@ func TestDeleteExecutionClusterLabels(t *testing.T) {
fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""),
err)
s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_CLUSTER_LABEL)
})
}
10 changes: 5 additions & 5 deletions flytectl/cmd/delete/matchable_execution_queue_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const (
executionQueueAttributesLong = `
Delete execution queue attributes for the given project and domain, in combination with the workflow name.
For project flytectldemo and development domain, run:
For project flytesnacks and development domain, run:
::
flytectl delete execution-queue-attribute -p flytectldemo -d development
flytectl delete execution-queue-attribute -p flytesnacks -d development
Delete execution queue attribute using the config file which was used to create it.
Expand All @@ -31,7 +31,7 @@ For example, here's the config file era.yaml:
.. code-block:: yaml
domain: development
project: flytectldemo
project: flytesnacks
tags:
- foo
- bar
Expand All @@ -40,11 +40,11 @@ For example, here's the config file 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 and delete commands.
To delete the execution queue attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command:
To delete the execution queue attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command:
::
flytectl delete execution-queue-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort
flytectl delete execution-queue-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort
Usage
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) {
err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_QUEUE)
})
t.Run("successful workflow attribute deletion", func(t *testing.T) {
s := setup()
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) {
err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_EXECUTION_QUEUE)
})
t.Run("workflow attribute deletion non existent file", func(t *testing.T) {
Expand All @@ -110,7 +110,7 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) {
err := deleteExecutionQueueAttributes(s.Ctx, []string{}, s.CmdCtx)
assert.NotNil(t, err)
s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_EXECUTION_QUEUE)
})
t.Run("attribute deletion invalid file", func(t *testing.T) {
Expand All @@ -125,6 +125,6 @@ func TestDeleteExecutionQueueAttributes(t *testing.T) {
fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""),
err)
s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_EXECUTION_QUEUE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_EXECUTION_QUEUE)
})
}
10 changes: 5 additions & 5 deletions flytectl/cmd/delete/matchable_plugin_override.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const (
pluginOverrideLong = `
Delete plugin override for the given project and domain, in combination with the workflow name.
For project flytectldemo and development domain, run:
For project flytesnacks and development domain, run:
::
flytectl delete plugin-override -p flytectldemo -d development
flytectl delete plugin-override -p flytesnacks -d development
To delete plugin override using the config file which was used to create it, run:
Expand All @@ -31,7 +31,7 @@ For example, here's the config file po.yaml:
.. code-block:: yaml
domain: development
project: flytectldemo
project: flytesnacks
overrides:
- task_type: python_task # Task type for which to apply plugin implementation overrides
plugin_id: # Plugin id(s) to be used in place of the default for the task type.
Expand All @@ -41,11 +41,11 @@ For example, here's the config file 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 and delete commands.
To delete plugin override for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command:
To delete plugin override for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command:
::
flytectl delete plugin-override -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort
flytectl delete plugin-override -p flytesnacks -d development core.control_flow.merge_sort.merge_sort
Usage
`
Expand Down
8 changes: 4 additions & 4 deletions flytectl/cmd/delete/matchable_plugin_override_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestPluginOverride(t *testing.T) {
err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_PLUGIN_OVERRIDE)
})
t.Run("successful workflow attribute deletion", func(t *testing.T) {
s := setup()
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestPluginOverride(t *testing.T) {
err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx)
assert.Nil(t, err)
s.DeleterExt.AssertCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_PLUGIN_OVERRIDE)
})
t.Run("workflow attribute deletion non existent file", func(t *testing.T) {
Expand All @@ -110,7 +110,7 @@ func TestPluginOverride(t *testing.T) {
err := deletePluginOverride(s.Ctx, []string{}, s.CmdCtx)
assert.NotNil(t, err)
s.DeleterExt.AssertNotCalled(t, "DeleteWorkflowAttributes",
s.Ctx, "flytectldemo", "development", "core.control_flow.run_merge_sort.merge_sort",
s.Ctx, "flytesnacks", "development", "core.control_flow.merge_sort.merge_sort",
admin.MatchableResource_PLUGIN_OVERRIDE)
})
t.Run("attribute deletion invalid file", func(t *testing.T) {
Expand All @@ -125,6 +125,6 @@ func TestPluginOverride(t *testing.T) {
fmt.Errorf("error unmarshaling JSON: while decoding JSON: json: unknown field \"InvalidDomain\""),
err)
s.DeleterExt.AssertNotCalled(t, "DeleteProjectDomainAttributes",
s.Ctx, "flytectldemo", "development", admin.MatchableResource_PLUGIN_OVERRIDE)
s.Ctx, "flytesnacks", "development", admin.MatchableResource_PLUGIN_OVERRIDE)
})
}
10 changes: 5 additions & 5 deletions flytectl/cmd/delete/matchable_task_resource_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const (
taskResourceAttributesLong = `
Delete task resource attributes for the given project and domain, in combination with the workflow name.
For project flytectldemo and development domain, run:
For project flytesnacks and development domain, run:
::
flytectl delete task-resource-attribute -p flytectldemo -d development
flytectl delete task-resource-attribute -p flytesnacks -d development
To delete task resource attribute using the config file which was used to create it, run:
Expand All @@ -31,7 +31,7 @@ For example, here's the config file tra.yaml:
.. code-block:: yaml
domain: development
project: flytectldemo
project: flytesnacks
defaults:
cpu: "1"
memory: "150Mi"
Expand All @@ -41,11 +41,11 @@ For example, here's the config file 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' and 'delete' commands.
To delete task resource attribute for the workflow 'core.control_flow.run_merge_sort.merge_sort', run the following command:
To delete task resource attribute for the workflow 'core.control_flow.merge_sort.merge_sort', run the following command:
::
flytectl delete task-resource-attribute -p flytectldemo -d development core.control_flow.run_merge_sort.merge_sort
flytectl delete task-resource-attribute -p flytesnacks -d development core.control_flow.merge_sort.merge_sort
Usage
`
Expand Down
Loading

0 comments on commit 9af534f

Please sign in to comment.