Hi all - is it possible to search for workflow run...
# ask-the-community
b
Hi all - is it possible to search for workflow runs based on an input argument? we trigger our launch plans programmatically and we pass in a unique training ID (that we generate) for each of these workflows. but trying to identify the corresponding workflow on flyte’s console UI is difficult esp. because we have a lot of different workflow executions
k
Why do you not use the unique training ID as the execution name?
that is a better way IMO
and today you cannot filter by inputs, but labels will be supported soon
Cc @Peeter Piegaze fyi
b
oh man didn’t realise we could specify the execution name, just seen it in the API. thanks @Ketan (kumare3). that said, being able to search/filter by what we input would also be helpful
@Ketan (kumare3) are there any constraints to the execution name? our train IDs were going fine until it came across this specific ID
"078b0145-016a-44d8-bac0-fffa2e722f9c"
and flyte complained:
Copy code
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.INVALID_ARGUMENT
        details = "invalid name format: 078b0145-016a-44d8-bac0-fffa2e722f9c"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-10-04T14:08:18.565966+08:00", 
grpc_status:3, grpc_message:"invalid name format: 078b0145-016a-44d8-bac0-fffa2e722f9c"}
don’t see any specific constraints in flytekit other than this:
Copy code
# remote.py
execution_name = execution_name or "f" + uuid.uuid4().hex[:19]
k
Error should be better - also looks like old flytekit - errors have been improved. Could be the length or hyphens.
b
upgraded to
flytekit==1.9.1
and errors still look the same. is the name constraint defined on the Go-side, or inside flytekit? can’t find any refs to it in flytekit.
our other IDs look the same and have the same lengths
k
sorry for the confusion, you are right, the error is admin side. What i was saying is the error reporting has improved client side. let me try launching one on my side
@Brian Tang i am getting
Copy code
details: invalid name format: 078b0145-016a-44d8-bac0-fffa2e722f9c
this is the regex -
^[a-z][a-z\-0-9]*$
this should return a better error message - https://github.com/flyteorg/flyte/blob/81b94a43359adb2d1055e75221048de766769174/flyteadmin/pkg/manager/impl/validation/execution_validator.go#L134 but it seems the regex matches? So i am indeed confused. cc @Katrina Rogan can you tell?
NM I see, your id begins with a
0
a digit, this is not allowed. it has to have a
alphabet
. we should explain this clearly, hard to do
but we should send back the regex for sure
b
i see - alright, thanks a lot @Ketan (kumare3). that helps immensely
k
BTw, the error message improvement just got a PR from a community member, once approve will be merged soon