-
Notifications
You must be signed in to change notification settings - Fork 94
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
schema broken (GraphQLLocatedError for 'state') #3216
Comments
Replying here so that after the PR is merged/closed the comment is still easy to find. I think this will have to wait @dwsutherland... The query can be simplified to query workflows($tIds: [ID]){
workflows(ids: "five"){
id
tasks(ids: $tIds){
name
}
}
} And that will still produce the same error with The But in TestingHere's how to get the query to work on your PR branch... though I am not confident this is a good fix. diff --git a/cylc/flow/network/schema.py b/cylc/flow/network/schema.py
index 2fa0ae641..6c37a0e8d 100644
--- a/cylc/flow/network/schema.py
+++ b/cylc/flow/network/schema.py
@@ -157,6 +157,8 @@ def_args = dict(
exids=List(ID, default_value=[]),
mindepth=Int(default_value=-1),
maxdepth=Int(default_value=-1),
+ states=List(String, default_value=[]),
+ exstates=List(String, default_value=[]),
)
all_def_args = dict(
@@ -166,6 +168,8 @@ all_def_args = dict(
exids=List(ID, default_value=[]),
mindepth=Int(default_value=-1),
maxdepth=Int(default_value=-1),
+ states=List(String, default_value=[]),
+ exstates=List(String, default_value=[]),
)
proxy_args = dict(
diff --git a/cylc/flow/ws_messages.proto b/cylc/flow/ws_messages.proto
index 4a1ff7675..72497e272 100644
--- a/cylc/flow/ws_messages.proto
+++ b/cylc/flow/ws_messages.proto
@@ -135,6 +135,7 @@ message PbTask {
int32 depth = 6;
repeated string proxies = 7;
repeated string namespace = 8;
+ string state = 9;
}
message PbPollTask { Then, run
If you are working on a Cylc UI View that needs this data, you may try this quick fix in your local branch and continue the development (assuming it works for you), but it may be easier to work on another ticket and wait for @dwsutherland to return to look if there is a better fix. Hope that helps |
@sadielbartholomew - Thanks for raising this issue (and sorry for the trouble), I've created a pull request with the appropriate fix #3219 . @kinow - Yes, it was an issue with trying to access state information of task nodes.. However task (& family) definitions are static data that only changes when the suite/workflow definition is updated (run/restart/reload), so tasks should never have a state. |
Great, thanks for the explanations @kinow & @dwsutherland, I'll ponder those so I can gain some understanding of what happened here & what the corresponding logic in the schema is trying to do. I'll test the fix PR once you are ready for it to be reviewed (as a formal reviewer or otherwise). |
Self-correction:
It could have a state, by showing/adopting the highest priority state of it's cycle children (like we do with families), but that hasn't been requested yet XD
Yes please! need more than just my own perspective on how things should be :-)
I think it's ready for review, quite a simple fix... For some reason the unit tests keep failing even though I cannot reproduce.. |
Just kicked Travis. Looks like it got stuck before even running the tests. Weird. |
This change/fix, would in no way break existing tests XD ... Works by hand (both queries and |
Query worked on this branch, with no errors in the console. One strange failure in the unit tests, but not sure how that can be related.
|
@kinow - Ah, looks like a |
I can investigate it and update your branch too @dwsutherland :-) holiday!! 🌞 🎉 |
@wxtim has hit into this one too via Rose, on his Rose packaging branch metomi/rose#2366, Travis run. Thanks for commenting here as that meant we were aware of this & avoided investigation time for debugging it! |
Comment from yesterday in the ticket about the wrong wheel
And version 2.1.7 of graphene has been release. Should we update it here too @dwsutherland ? |
Ok Will do. Separate PR I suppose. |
Your other PR passed, and fixed the issue with |
Attempting some development today I found that the end-to-end system has broken so that using the current
master
on all three repositoriescylc-flow
,cylc-ui
&cylc-uiserver
means that (at least for the several suites I tested on), the UI Tree View gives a blank page apart from the top bar with the suite name (see the screenshot below), & further digging uncovers some error messages.I have traced this via reverting commits (on each of the three repos independently until I hit the case where the full system went from working as previous to hitting the above problem) to #3211, which unfortunately has broken the schema, throwing up errors relating to 'state', as below.
I'm going to trace back the logic to work out which aspect(s) of that PR (with one commit) are to blame, & put in a PR to fix them. Thanks.
Error messages
GraphiQL
From interactive GraphQL, I got the following error response returned:
(if relevant, this was from a basic query on one of my running workflows:)
Terminal
And a traceback to the terminal was consistent with it being an issue on
state
, emerging from theschema.py
.Release version(s) and/or repository branch(es) affected?
8.0a0
.Steps to reproduce the bug
master
branches.Expected behavior
Screenshots
master
The text was updated successfully, but these errors were encountered: