hi there,
just wondering if would it be possible to filter by task state in a future version of cylc tui
? the current view shows a lot of (to me) redundant tasks which are in a ‘waiting’ state.
cheers,
1 Like
Those “redundant” waiting tasks are what comes next in the graph, downstream of current running tasks.
Good news on the feature request - just hit F
for “filter” and check off the states you want to see. (Hit h
for the help screen, to see all the capabilities).
1 Like
Those “redundant” waiting tasks are what comes next in the graph, downstream of current running tasks.
ah yeah i just meant i don’t want to see them rather then redundant i guess haha
Good news on the feature request…
oh awesome, thanks
The functionality is there (F key as Hillary mentioned), but unfortunately there is an unresolved issue with task filtering at the moment.
opened 04:26PM - 04 Sep 23 UTC
bug
Sometimes, when you filter by task state in Tui, you don't see complete results.…
It would appear that this is caused by missing "root" families in the data store, demonstrated by this diff:
```diff
diff --git a/cylc/flow/network/resolvers.py b/cylc/flow/network/resolvers.py
index b6effe143..319851e75 100644
--- a/cylc/flow/network/resolvers.py
+++ b/cylc/flow/network/resolvers.py
@@ -183,7 +183,10 @@ def get_state_from_selectors(tokens):
def node_ids_filter(tokens, state, items) -> bool:
"""Match id arguments with node attributes."""
- return any(
+ print()
+ for item in items:
+ print(tokens, item)
+ ret = any(
(
# don't match an empty string (globs should be implicit)
not item.is_null
@@ -195,6 +198,7 @@ def node_ids_filter(tokens, state, items) -> bool:
# match namespace name
and (
not item['task']
+ # or item['task'] == 'root'
or fnmatchcase(tokens['task'], item['task'])
)
# match job
@@ -213,6 +217,8 @@ def node_ids_filter(tokens, state, items) -> bool:
)
for item in uniq(items)
)
+ print('$$$', ret)
+ return ret
def node_filter(node, node_type, args, state):
@@ -239,6 +245,7 @@ def node_filter(node, node_type, args, state):
else:
# live objects can be represented by a universal ID
tokens = Tokens(node.id)
+
return (
(
(
```
Which when run against this query:
```graphql
query($taskStates:[String]) {
workflows(ids:["*"]) {
test1: familyProxies(ids: ["*"], states: $taskStates) {
id
state
}
}
}
```
Produces this result:
```json
{
"data": {
"workflows": [
{
"test1": [
{
"id": "~osanders/generic/run1//20191218T1200Z/BAR",
"state": "succeeded"
}
]
}
]
}
}
```
With this stdout:
```
~osanders/generic/run1//20191218T1200Z/BAR //*
$$$ True
```
Note only the `BAR` family appears, no `root` family.
So either the `root` families aren't in the data store OR aren't being called up for filtering? Dunno.
Workflow definition:
```ini
{
"data": {
"workflows": [
{
"test1": [
{
"id": "~osanders/generic/run1//20191218T1200Z/BAR",
"state": "succeeded"
}
]
}
]
}
}
```
Workflow state:
![Screenshot from 2023-09-04 17-25-48](https://github.com/cylc/cylc-flow/assets/16705946/e4400d66-0d4f-4b7e-af71-b03a24e21495)
So either the `root` f
1 Like
OK thanks a lot @oliver.sanders