How can I get total count of Workflows associated with a project? #1115
-
I can't find an easy way to get the total with Flytekit. Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
Hi @gileadslostson, Thank you for posting your question. Do you mind clarifying what do you mean by "get the total"? maybe a code snippet of what you are trying to do would help... |
Beta Was this translation helpful? Give feedback.
-
@EngHabu @gileadslostson wants to know the count of workflows associated with the project. @gileadslostson is the usecase for some programmatic display? There are multiple ways
|
Beta Was this translation helpful? Give feedback.
-
Thanks for answering. What I mean is the total count of workflows.
Pagination doesn't return the total number rather just the token for the
next set of results.
…On Fri, 11 Jun 2021, 18:54 Ketan Umare, ***@***.***> wrote:
@EngHabu <https://github.com/EngHabu> @gileadslostson
<https://github.com/gileadslostson> wants to know the count of workflows
associated with the project.
@gileadslostson <https://github.com/gileadslostson> is the usecase for
some programmatic display?
There are multiple ways
-
use the ListWorkflowIds call as described here
<https://docs.flyte.org/projects/flyteidl/en/latest/protos/docs/service/service.html#adminservice>
-
another option is to use flytectl as described here
<https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_get_workflow.html#flytectl-get-workflow>
-
A programmatic option to do this is to use the Python friendly Client
# list_workflow_ids api
<https://github.com/flyteorg/flytekit/blob/master/flytekit/clients/friendly.py#L197>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1115 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFKN2SRVDUBDMHHGZKK6T3TSI5VFANCNFSM46OCNOMQ>
.
|
Beta Was this translation helpful? Give feedback.
-
And, sorry, yes it is programmatically via the python API.
On Fri, 11 Jun 2021, 18:58 Marc-Anthony Taylor, ***@***.***>
wrote:
… Thanks for answering. What I mean is the total count of workflows.
Pagination doesn't return the total number rather just the token for the
next set of results.
On Fri, 11 Jun 2021, 18:54 Ketan Umare, ***@***.***> wrote:
> @EngHabu <https://github.com/EngHabu> @gileadslostson
> <https://github.com/gileadslostson> wants to know the count of workflows
> associated with the project.
>
> @gileadslostson <https://github.com/gileadslostson> is the usecase for
> some programmatic display?
>
> There are multiple ways
>
> -
>
> use the ListWorkflowIds call as described here
> <https://docs.flyte.org/projects/flyteidl/en/latest/protos/docs/service/service.html#adminservice>
> -
>
> another option is to use flytectl as described here
> <https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_get_workflow.html#flytectl-get-workflow>
> -
>
> A programmatic option to do this is to use the Python friendly Client
> # list_workflow_ids api
> <https://github.com/flyteorg/flytekit/blob/master/flytekit/clients/friendly.py#L197>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1115 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFKN2SRVDUBDMHHGZKK6T3TSI5VFANCNFSM46OCNOMQ>
> .
>
|
Beta Was this translation helpful? Give feedback.
-
@gileadslostson today there is no API that returns just the count. You will have to retrieve all ID's (these are only the unique ids in a project) and then perform a client side count. Another option is to directly go to the database. I would love to understand the usecase, and to see if this actually make sense as a feature? |
Beta Was this translation helpful? Give feedback.
-
We want to use Flyte for managing our tasks and it will replace existing
functionality.
At the moment it is useful to see the total count of various elements as
well as jump to specific pages.
What I could do is get the IDs on the first call and cache the count. Not
ideal but I will look into it.
If you need more info just give me a shout :)
…On Fri, 11 Jun 2021, 23:12 Ketan Umare, ***@***.***> wrote:
@gileadslostson <https://github.com/gileadslostson> today there is no API
that returns just the count. You will have to retrieve all ID's (these are
only the unique ids in a project) and then perform a client side count.
Another option is to directly go to the database.
I would love to understand the usecase, and to see if this actually make
sense as a feature?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1115 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFKN2XLLV7R7XM4YDV64XDTSJ327ANCNFSM46OCNOMQ>
.
|
Beta Was this translation helpful? Give feedback.
@EngHabu @gileadslostson wants to know the count of workflows associated with the project.
@gileadslostson is the usecase for some programmatic display?
There are multiple ways
use the ListWorkflowIds call as described here
another option is to use flytectl as described here
A programmatic option to do this is to use the Python friendly Client # list_workflow_ids api