-
Notifications
You must be signed in to change notification settings - Fork 27
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
async scan updates for the UI #493
Conversation
Assigning @dwsutherland and @oliver-sanders as both are familiar with the async scan PR's. Found a few strange behaviours in the UI, that can be fixed I think, but thought it would be good to check what we should be doing about them.
This breaks the code of the UI as we were validating that the initial data burst would contain information to build the workflow tree. I think that's intentional? I've commented the The Lumino tree widget is still added. Should we not add it? Or maybe we leave as-is, until we are working on #332?
With deltas, we have a payload with data about the workflow shutdown. The query of GScan doesn't use deltas, so it never realizes that the workflow has stopped. I can add a wrapper Or we can just wait until GScan is re-written with deltas?
Here I have Here's the same view after I've stopped the workflow. And finally, here's after I refresh the page (F5). We get the last state of the workflow in the initial data burst, and the UI simply builds the tree. We could add an |
@dwsutherland the code changes here are small, but you can do just a functional test to review this PR 👍 I will update the unit tests later, after we clear the questions above. |
Yes, the burst is intentional, as registered and never run workflows won't have any data to form a tree (and never will, without a workflow DB).. But you still need the burst of whatever info we can gather about it. So I'd say either, just don't add the widget, or add it with blank data so it can spring to life when the workflow starts running (?)
IMHO - The icons for stopped workflows are fine, as it just shows the last state the workflow was in on shutdown... And can differentiate between registered but never run and run but stopped (or DB loaded) workflows.. The
Built tree is probably fine? Or is that a problem |
Thanks for the answers @dwsutherland ! All good for me. On the last one only:
That's a problem I think, because at the moment, without refreshing, you won't see anything in the lumino tab, because we are cleaning the tree when we receive a deltas indicating workflow shutdown. From your previous answers, I think we could then not remove the items when we receive a shutdown, and instead leave them in the UI and just change the workflow status in GScan? |
Yeah, sounds good 👍 One other thing, does this mean a subscription for each (dead or alive) workflow will be created? Any down sides to that? |
I don't think so. Only when you click on the workflow in GScan, then a new subscription will be created for that workflow (dead or alive 🤠 ). Otherwise you should have 1 or 2 subscriptions depending on the view you are browsing (GScan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, approved subject to tests and discussion changes 👍
Thanks @dwsutherland , will wait for @oliver-sanders to have time to take a look at the questions and code change. @hjoliver if you have time and would like to just give your opinion. Don't need to worry too much about code as @oliver-sanders can do a quick code review, just your opinion if there's anything else I should change in this PR for showing stopped workflows 👍 (all good if you don't have time, we can improve later in other PRs) |
This is an interesting one, I think you are handling it just fine.
Future work:
|
Similar answer as for the last question. This behaviour is mostly correct, this data could alternatively come from the database. We need two distinct "modes" for viewing workflows:
For live workflows it makes sense to default to From the UI perspective is shouldn't make much of a difference whether a workflow is running or not, its the UI Server which picks up all this horrible complexity and has to work out whether it can get data from a live scheduler or whether it has to go to the database instead. The UI should just display what data it gets given! So all good here I think. |
Great idea @oliver-sanders . Set it to |
Oooh, that's very nice! |
Right. I am only concerned about consistency now. If I am looking at Cylc UI with a single lumino widget showing the tree view of a workflow, and then I stop it, the lumino widget won't have anything. But if I open the same URL in another tab, then it will display the latest state of the workflow. I'm adding two more commits here:
Then it should be good to go 🤞 |
I guess we need a stopped icon (not question mark) for stopped flows in gscan. |
From RIOT (hope it's OK to copy that over here @dwsutherland / @hjoliver ) I will try to update the UI code to handle the |
6959785
to
e1493c4
Compare
All sounds/looks good to me. For follow-on it would be good to sort GScan so that active suites appear above inactive ones (some people have insane numbers of stopped suites). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ors when a workflow does not have tree data)
Codecov Report
@@ Coverage Diff @@
## master #493 +/- ##
==========================================
- Coverage 61.99% 61.79% -0.20%
==========================================
Files 41 41
Lines 942 945 +3
Branches 56 57 +1
==========================================
Hits 584 584
- Misses 340 342 +2
- Partials 18 19 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Going to merge this one as-is, and move the rest of the work for stopped workflows for another issue. That way it gets simpler to review, and also the stopped needs the two PR's that @dwsutherland created yesterday. |
Thanks @oliver-sanders ! |
Will also include the changelog for showing offline workflows in the other PR (forgot it, sorry!) |
b51564b adds the changelog for this PR retroactively |
This is a small change with no associated Issue.
Related to cylc/cylc-flow#3724 and cylc/cylc-uiserver#150
This PR contains a patch that allows the UI to show stopped workflows, added in the two issues above.
opacity: 0.5
)Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.