hi team, is it possible to get recent failed exec...
# announcements
a
hi team, is it possible to get recent failed executions across all projects using flyte admin api?
k
yes you can filter by updated_at timestamp and phase, check out the detailed instructions here: https://docs.flyte.org/en/latest/concepts/admin.html#adding-request-filters
a
thanks @katrina. Are there any sample queries? I tried adminhttp API and flytectl, but both seem to require project and domain:
Copy code
<https://avflyteadminhttp.pdx.l5.woven-planet.tech/api/v1/executions/avbasemap/dev?filters=value_in(phase,FAILED)&token=&limit=100&sort_by.direction=DESCENDING&sort_by.key=created_at>
Copy code
flytectl get execution -p avflytesim -d prod --admin.endpoint avflyteadmin.pdx.l5.woven-planet.tech:443 --filter.fieldSelector="phase=FAILED" --filter.limit=10 --filter.sortBy=updated_at
k
ah sorry I missed that. all the control plane entities are scoped by project and domain, but you can programmatically get the list of project-domain combos by querying the projects endpoint: https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/service/admin.proto#L389
👍 1
a
another question. So I'm able to get FAILED executions using this query:
Copy code
curl -s <https://avflyteadminhttp>.../api/v1/executions/project/prod?filters=value_in(phase,FAILED)&limit=5&sort_by.direction=DESCENDING&sort_by.key=updated_at
is there a way to add error kind to the filter? If I add
closure.error.kind
I get this error:
failed database operation with column executions.kind does not exist"
k
ah you can filter by error_kind (sorry this should be added to the docs!)
a
this worked, thanks!
162 Views