Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tui: filter bug #5716

Open
oliver-sanders opened this issue Sep 4, 2023 · 1 comment
Open

tui: filter bug #5716

oliver-sanders opened this issue Sep 4, 2023 · 1 comment
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Sep 4, 2023

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 --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:

query($taskStates:[String]) {
  workflows(ids:["*"]) {
    test1: familyProxies(ids: ["*"], states: $taskStates) {
      id
      state
    }
  }
}

Produces this result:

{
  "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:

[scheduler]
    UTC mode = True
    allow implicit tasks = True
[scheduling]
    initial cycle point = 2019-12-09T09:00Z
    [[graph]]
        R1 = foo_cold => foo_start
        R1/T00 = foo_start[^] => FOO
        T00, T12 = """
            cycle_end[-PT12H] => FOO
            FOO:succeed-all => BAR
            BAR:succeed-any => wipe_bar
            BAR:succeed-all & wipe_bar => cycle_end
        """
[runtime]
    [[root]]
        script = sleep 2
    [[FOO]]
        script = sleep 2
    [[BAR]]
        script = sleep 2
    [[foo]]
        script = sleep 2
        inherit = FOO
    [[foot]]
        script = sleep 2
        inherit = FOO
    [[fool]]
        script = sleep 2
        inherit = FOO
    [[bar]]
        script = sleep 2
        inherit = BAR
    [[bool]]
        script = sleep 2
        inherit = BAR
    [[pub]]
        script = sleep 2
        inherit = BAR

Workflow state:

Screenshot from 2023-09-04 17-25-48

So either the root f

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Sep 4, 2023

Question: are the "root" families supposed to be in the store in these situations?

Or should Tui use a different approach to list cycle points?

@oliver-sanders oliver-sanders mentioned this issue Sep 14, 2023
12 tasks
@oliver-sanders oliver-sanders added this to the cylc-8.x milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant