I am having trouble seeing task runs by task in Pr...
# prefect-community
d
I am having trouble seeing task runs by task in Prefect Cloud. Here’s an example https://cloud.prefect.io/anaconda/task/b3cfcc12-9ba8-4960-8dee-7c677c23b477?runs, all of these pages that I’ve looked at are empty. I’ve tested this through the API and I can’t get it to return anything when using a
where
filter with a task id, but it works when I query by flow run id.
k
So you can see flow runs but not task runs?
d
I can see task runs if I search for them by flow run id. But if I search for them by task id I get an empty response, not an error. I’m also getting the same results when using the web UI.
k
Can you show me the query you are using?
d
Sure, one moment. I also just noticed that if you open devtools, load the task overview page and then click on runs you’ll see an uncaught javascript exception
k
What is the exception?
d
vue-router.esm.js:2065 Uncaught (in promise) Error: Redirected when going from “/task/cbdb530d-a822-41f5-846b-88d320d27b5c” to “/task/cbdb530d-a822-41f5-846b-88d320d27b5c” via a navigation guard. at $t (vue-router.esm.js206515) at _t (vue-router.esm.js202410) at vue-router.esm.js237117 at router.js51814 at v (vue-router.esm.js23577) at r (vue-router.esm.js20049) at gt (vue-router.esm.js20123) at e.Pt.confirmTransition (vue-router.esm.js23873) at e.Pt.transitionTo (vue-router.esm.js22608) at e.replace (vue-router.esm.js261310)
Here is a query that works:
Copy code
query {
	task_run(where: {flow_run: {id: {_eq: "9783352a-a6d0-48a3-b0a0-19fd539df89d"}}}) {
		task {
      name
    }
  }
}
Here is one that doesn’t:
Copy code
query {
	task_run(where: {task: {id: {_eq: "dcb8dae1-8b8b-431e-a739-5b29e53399af"}}}) {
    	id
  }
}
k
Testing some stuff with the queries. I see similar behavior so I don’t think it’s related to the UI pages not being able to load. Will ping someone from the UI team about that
I am guessing this has to do with versions. Is this task id the most recent version of the task?
I do see the same error though on the browser console too even if I am not expecting anything on the page so I don’t think it’s related. You can see the version in this tile and if you click the version it will take you to the flow page. Are you in an archived version when you do that?
Task ids are also versioned and you get a new one with each registration. If I use an old version for my query, I don’t see any runs because I lost them due to retention but if I use a right version I see some stuff
d
Ah okay I didn’t realize the task ids were versioned. Is there any way to search for old version ids?
are flow ids also versioned?
k
You also might be limiting the time frame for that page. Default is 24 hours I think
d
I tried all the range limits. I think it’s because we redeployed our flows and the ids changed.
k
Maybe a query like this will help you find them:
Copy code
query {
	flow(where: {name: {_eq: "ecs_test"}}) {
    tasks(where: {name: {_eq: "abc"}}) {
      id
      name
    }
	}
}
?
d
Yes that’s along the lines of what I was thinking. Are ids in general versioned like this for everything?
k
I can’t think of anything at the moment beyond flows and tasks because flow runs and task runs are 1:1 with ids of course
d
thanks
👍 1