the examples shown in flytectl docs only show task...
# ask-the-community
s
the examples shown in flytectl docs only show tasks in project.... My project has 2 worklows and I need to get the tasks only for 1 workflow
s
You can use the following command:
Copy code
flytectl get task -p <project> -d <domain> <task-name>
s
But this will give me all the tasks of all the versions of the workflows. I need only the tasks for the latest version
s
Try
flytectl get task -p <project> -d <domain> <task-name> --latest
s
does not give the latest...Gives all the tasks across all the versions
s
Oh, it's a bug then.
@Eduardo Apolinario (eapolinario), any idea who can fix this?
e
That command is slightly misnomed as it returns all tasks for a given project+domain (as specified in the docs: https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_get_task.html#synopsis)
That said, it looks like we have a bug in that specifying the version either via
--version
or
--latest
is ignored
And to expand on that, if you know the name of a specific task you can use
--version
(or
--latest
). For example, you can do:
Copy code
❯ flytectl get task  --project flytesnacks --domain development workflows.example.say_hello --latest
And that will pick up the latest version of the
workflows.example.say_hello
task.
As for your specific question (i.e. how to list tasks of a particular workflow), unfortunately that's not possible.
s
My plan was to develop a microservice for my team which would enable them to trigger multiple workflows via doing a flytectl fetch tasks latest versions and creating an exec file. Then use create executions with the above file to populate the parameters and then trigger the execution.
This was a workaround because flytekit remote is not working for me and that also I have already raised in this forum
in my org, we have different tasks in different workflows inside a same project. And we need to trigger different workflows multiple times based on the data availability
s
s
This still does not give me the latest... It gives me all the launchplans, I want the latest
100 Views